Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
SyntaxError on page change - bounty of €100 #132
After clicking on a page link I keep repeatedly getting the following error:
This is preventing a change in the URL, it's highlighting this error in the title tag of the site, anyway not sure what's causing it, can provide a link if needs be? If anyone could shed any light that'd be great!
EDIT: Solved in the course of this discussion at jQuery forum - The bounty of €100 went to "jakecigar"
Is this happening within an inline script? If yes, my guess is:
Because it's occuring in a for loop, that you have a "less than sign" ("<") followed directly by an alpha-character. Please try adding a space between the "<" character and the letter. This is a known error in jQuery core, which I currently don't know how to fix.
For example, it might be worth trying to:
Thanks for your swift reply and the link! Because I'm currently not at my own PC, I can't see the exact text of the error message. Please try adding the space directly after the "less than sign"...
Here - I think I've pinpointed it:
Just add a space after the "less than sign"
Glad we found the exact position of the error.
I just checked the console - very weird - no other errors...
Just another guess -> maybe Wordpress needs the inline script you disabled.
One thing that came to my attention is that the canonical URL always seems to be:
...for both "Work" and "Studio"?
Ajaxify uses the canonical URL, when it is given...
EDIT: Forget about this last comment - it was because the page wasn't re-loading
Regarding a solution to the original problem - the "less than sign" that causes the inline script to crash - it would require, in a first step, to catch the error when appending the failing inline script.
I have tried various
statements in different places, but they don't seem to prevent a "hard error" - in effect, they do nothing at all.
I believe, that would be the first step to combat the bug...
Here is the salient code explicitly: