verbb / hyper

A Craft CMS plugin for managing links, focusing on user experience.
Other
24 stars 15 forks source link

Wrong encoding when running content migration from typed link field #191

Open torgeirbeyer opened 2 months ago

torgeirbeyer commented 2 months ago

Describe the bug

After running content migration script from typed link field on Craft 4 install some query strings on urls are not encoded correctly. &region= ended up as ®ion=

Steps to reproduce

  1. Add urls with query params to typed link field with &region=
  2. Run content migration script

Craft CMS version

4.11.1

Plugin version

1.2.1

Multi-site?

No

Additional context

No response

engram-design commented 2 months ago

I can't seem to replicate that, sorry! Does it show the character in the control panel, when rendering the link, or both?

Does updating the Hyper field value manually cause the issue, and it's just the process if migration?

And just to confirm what kind of links they are, are they URLs, Custom or Element fields with suffix enabled (for Typed Link)?

torgeirbeyer commented 1 month ago

They were urls, and at some point they were also switching when updating them manually, but I can't seem to replicate them anymore. You can close this, and I'll open it again if the problem comes back.

torgeirbeyer commented 1 month ago
Skjermbilde 2024-09-16 kl  15 02 26

Here is an example. Everytime we update one, the other one changes back.

engram-design commented 1 month ago

What's the outer field, as it seems like you're nesting things. Is it a Matrix, Neo or Vizy field?

torgeirbeyer commented 1 month ago

It is Vizy

torgeirbeyer commented 1 month ago

When saving the entry again the problems appears again, and the url is changed back to the R-symbol.

I can try to remove them completely and then save them again to see if it helps, but something odd is happening.

engram-design commented 1 month ago

So I'll say this is most likely Vizy's doing being the owner of the field, and how content is encoded as JSON.