hyper icon indicating copy to clipboard operation
hyper copied to clipboard

Wrong encoding when running content migration from typed link field

Open torgeirbeyer opened this issue 1 year ago • 7 comments

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

torgeirbeyer avatar Sep 09 '24 16:09 torgeirbeyer

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)?

engram-design avatar Sep 11 '24 14:09 engram-design

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 avatar Sep 16 '24 12:09 torgeirbeyer

Skjermbilde 2024-09-16 kl  15 02 26 Here is an example. Everytime we update one, the other one changes back.

torgeirbeyer avatar Sep 16 '24 13:09 torgeirbeyer

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

engram-design avatar Sep 17 '24 02:09 engram-design

It is Vizy

torgeirbeyer avatar Sep 17 '24 08:09 torgeirbeyer

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.

torgeirbeyer avatar Sep 19 '24 10:09 torgeirbeyer

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

engram-design avatar Sep 19 '24 11:09 engram-design