[Resolved] Can't stop characters from getting encoded
This thread is resolved. Here is a description of the problem and solution.
Problem:
The customer reported that the single quote characters in the classic views editor are getting converted to their equivalent ASCII character.
Solution:
Guided that this only happens when the option "Disable the visual editor when writing" is checked on the user profile page.
( WP Admin -> Users -> Profile )
Relevant Documentation:
n/a
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
See attached screenshot for another example in case the text example above isn't showing the issue.
This seems to be happening only to single quotes and it just started recently. Changing the encoding to the actual ' character makes no difference, they just re-encode as & #039; The code still runs, but is very cluttery.
Disabling all plugins and switching to the default Twenty Twentytwo theme makes no difference.
I am at a loss here. This makes absolutely no sense.
To reproduce the issue, I just log in, go to the view (any view) and the problem is there.
The problem does not seem to be happening in content templates, just views. Example content template: hidden link
I've tried 4 different browsers and on my desktop and laptop and get the exact same issue with all of them. What could possibly be causing this to happen? Even if we don't know the exact cause, why would this happen at all?
To be clear, you're only experiencing this on the view's editor screen in the admin area, and the output on the front end is not affected, correct?
I've also requested another colleague of mine to test it on a different computer and browser, but he is not seeing the encoded characters either.
It would be interesting to test the website's clone on a different server for example localhost and then check the views in the same browsers as before.
You can also share a quick video/screencast of how the view shows when you load the view's editor screen.
To be clear, you're only experiencing this on the view's editor screen in the admin area, and the output on the front end is not affected, correct?
Correct.
Below is a link to a video of me logging in to the site on my localhost (192.168.1.99), showing the issue, copying the code to a code editor, changing all the encoded characters back to single quotes, showing that it works fine on the front end and also showing that the problem does not happen in content templates.
I suspect it is most likely caused by one of the browser extensions/add-ons active in the main browser that you use for accessing the admin area.
I know you've already tested this on a couple of different devices and browsers, but it could be that the actual conversion is only taking place in one of them and when you tested the others, it showed the already saved and converted content.
Two of my browsers have no extensions or add-ons (Firefox and Safari). I'm confident it has nothing to do with extensions or add-ons. Thank you for your help, but I'm getting the feeling that there's no solution so we can probably close this ticket.
Thank you for sharing this and we've recently received another report from a different user, about a similar conversion.
Interestingly, unlike your website, I could see the converted characters in the view's editor screen (but not in the content template editor), on that user's website.
I'm still gathering information to narrow down a pattern and if you allow, I can download a clone/snapshot of your website too, to test it on a different server, for this investigation.
Thank you for the permission and I've created the website's clone at: hidden link
Can you please log in with the same access details that you shared with me and see if you're able to reproduce the issue here?
( I still can't and please test using your own user and the one that you share with me )
During further troubleshooting, I noticed that I could only see the issue when logged in as the administrator user "Daniel Brasic". For the other two administrator users, the view's editor showed the content correctly.
It turns out that for this specific user, the option "Disable the visual editor when writing" was checked on the user profile page.
( WP Admin -> Users -> Profile )
Please log in as that user and disable this option and you won't see the encoded characters on the view editor screen.
That's it! That fixed the issue! Seems like it shouldn't work that way, but nonetheless, that fixed the problem! Thank you for sticking with it to the end Waqar! Thank you!!!
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.