-
-
Notifications
You must be signed in to change notification settings - Fork 8
HTML character encoding issue for “ when upgrading #324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Sounds like this'll be encoding changes. Just to be clear, re-saving the entry doesn't change anything, but re-typing the encoded values (swapping I might have to provide a manual console command to run on field content to take care of this. In addition, there's actually an internal helper function to help with updating content, which handles global, Matrix and Super Table content. We use this in Hyper migrations. |
Sounds like this'll be encoding changes. Just to be clear, re-saving the entry doesn't change anything, but re-typing the encoded values (swapping & for & for example) works correctly? Yes that is correct. That command could be helpful, the other issue we had was where we have the structure - But the last one |
This is the change that surfaced the issue: 819a013 In 2.1.22 the characters showed up correctly in the editor and if you modified the field and saved it the database values would no longer have the escaped characters and that field would show up correctly in 2.1.23 in the editor. But because it only gets fixed by code in the editor resaving all entries using the cli doesn't fix the issue. |
Thanks for pointing that out @Kethatril that's a good start. |
@engram-design We’ve noticed a similar issue. After we upgraded Vizy from 2.1.20 to 2.1.23, all HTML entities present in the content have started showing up as text in the control panel. Re-saving the entry (in the CP or via the CLI) does not appear to fix the issue either. We are currently on Vizy 2.1.25 (Craft 4.14.11.1) but the issue persists. I went back a couple versions and was able to successfully isolate entities becoming visible in the editor to the point where we upgraded to Vizy 2.1.23. Here is an example: [{"type":"paragraph","attrs":[],"content":[{"type":"text","text":"We are an international development firm specializing in four pivotal domains that collectively aim to promote prosperity and resilience, specifically in "},{"type":"text","marks":[{"type":"textStyle"}],"text":"underdeveloped, fragile, and conflict-affected contexts"},{"type":"text","text":". Our expertise spans Research and Analysis, Monitoring, Evaluation, and Learning, Institutional Strengthening, and Social and Behavior Change Communication. "}]}] This is troublesome for two reasons:
Any suggestions on how to resolve this? |
If you remove those I've got a fairly comprehensive list of entities that when entered into the field are rendering correctly. While I can see the characters with your content, that would make sense as it's the literal You've always been able to write markup in Vizy fields, but we certainly protect against anything malicious making its way in there. This is commonly for when you want to write code in the editor content. |
We're seeing this issue as wel. Upgraded from craft 3 to 4 (latest). All the French text from the Globals has faulty encoding: Original Craft 3: Craft 4: Edit: this is a vizy field inside a supertable field |
Fixed for the next release. To get this early, run You can also safely apply this on your already Craft 4 upgraded site. In Vizy 1, we stored the encoded value of HTML entities, and in Vizy 2, we don't encode them - causing this issue. The migration that will run upon upgrade will convert these for you, as well as sanitize any potentially malicious content correctly and better than in Vizy 1. |
I still have the bug even with this dev update It fixed my save error but now all my contents have html tag in them |
@engram-design just to add to that front-end before update: https://l.picard.ca/ijOXJ front-end after update: https://l.picard.ca/aUOMo I restore our website to the old version of vizy, we can't save update on the page but at least the front-end is not broken. |
Right, so you have a CKEditor field inside the Vizy field content, that complicates things considerably. Just pushed another fix to address this properly. To get this early, run |
Describe the bug
Similar issue : #115
When upgrading from Vizy 1.0.23 and Craft CMS 3.9.10, to Vizy 2.1.23 and Craft CMS 4.13.1.1
Character were previously stored in the database as
“
any newly created content saves in the database as“
though on an upgrade none of these characters have been migrated. When inspecting the code in the editors html view they appear as“
- though in the database they are still stored as“
. A manual update fixes these.Are there any recommended steps to migrate these?
Steps to reproduce
“
in a Vizy Field.Craft CMS version
3.9.10 -> 4.13.1.1
Plugin version
1.0.23 -> 2.1.23
Multi-site?
No
Additional context
We have written a migration to update each entry in the database, though we've come across an issue where SuperTable content inside Vizy field, is difficult to access/update. (I'll mention that in another ticket and attach).
The text was updated successfully, but these errors were encountered: