Skip to content
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

some common characters cause JS errors in snippet description. #254

Open
billythekid opened this issue Sep 25, 2019 · 4 comments · May be fixed by #477
Open

some common characters cause JS errors in snippet description. #254

billythekid opened this issue Sep 25, 2019 · 4 comments · May be fixed by #477

Comments

@billythekid
Copy link

billythekid commented Sep 25, 2019

Description

I'm getting a javascript issue trying to swap out an image in an SEO field and it won't allow the upload of an image, nothign happens when clicking remove image.

Percent characters in snippet description causes JS validation errors.

URIError: malformed URI sequence from Snippet.js

This doesn't seem to be the same as #188

Steps to reproduce

  1. Set an seo field to have the snippet say something like "50% off all products"
  2. Go to the saved entry
  3. View JS error in the console
  4. Click on remove image - nothing happens

Additional info

  • Craft version: Craft Pro 3.3.4.1
  • SEO version: 3.6.2
  • PHP version: 7.3.7
  • Database driver & version: MySQL 8.0.16
@billythekid
Copy link
Author

Just to say this is strangely only happening on one entry, not sure why. Other entries are working fine. I'll try to debug this further but it might not be an SEO issue.

@billythekid
Copy link
Author

OK I've found the issue I think, in the optimisation tab the snippet description had a % character in it. Once that was removed the JS error went away and I was able to use the SEO field.

Looks like something needs to be changed in the validation code?

I've re-titled this report to make more sense.

@billythekid billythekid changed the title Cannot update images some common characters cause JS errors in snippet description. Sep 25, 2019
@alexjcollins
Copy link
Member

@billythekid Thanks for investigating this for us. Will take a look internally and get something released to resolve. 👍

@walshmichael
Copy link

Hi @alexjcollins - wondering if you made any progress on this one? We are having the same issue, and it unfortunately stops any Redactor field from loading within the Craft CMS admin.

Removing % characters from SEO description content and re-saving does allow Redactor UI to load.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants