Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » Chameleon / ChameleonLite
- » Chameleon
- » JEvents:parseerror, syntaxError:...
JEvents:parseerror, syntaxError: Unexpected token
JEvents:parseerror, syntaxError: Unexpected token
Greetings,
I'm using a Chameleon rule to insert the following CSS code into some JEvents event display and edit pages based on User Group.
#edit_event, #edit_eventcopy, .ev_adminpanel, .jevaccess{display:none !important;}
Chameleon is doing it's thing adding the code properly and giving me the desired display.
However, when I attempt to Save edits I get the following error:
parseerror, syntaxError: Unexpected token < in JSON at position 0
Whether the rule succeeds or fails, (depending on user group) I get the same error.
When Chameleon is turned off, the edit page saves without error.
When I insert the same CSS code via the template's custom css.... the edit page saves without error.
Turning on Chameleon debug yields messages that indicate everything is performing properly.
Switching to the beez template yields the same results.
Got any ideas ?
Thanks
Dave
Re: JEvents:parseerror, syntaxError: Unexpected token
Hi Dave,
it looks like the editor is doing its work via AJAX calls, and Chameleon is probably adding some output to the AJAX page response, that it shouldn't. Chameleon tries to only affect HTML pages but in this case it may be doing the wrong thing.
Can I suggest that you take a look at the AJAX response using your browser's debugging tools, and see what Chameleon is actually adding to the response?
e.g. in Chrome you can right-click on the page and select "Inspect", then click on the "Network" tab and look for the list of additional HTTP requests being generated. Click on one of these and you'll have the option to examine Headers/Preview/Response. The Response is the interesting one here: that should contain some JSON code, and somewhere in that I bet you'll find either a PHP error message or something else added by Chameleon (perhaps debug output?).
So if you can follow that and find it, I should be able to advise on how to get around it.
It is possible that to fix it all you need to do is to include a condition that isolates the page types that you want to add the CSS to. i.e. perhaps the CSS is being added to the AJAX calls. So if it's a JEvents page then we can design a little PHP code to go in the main PHP tab that will ensure that the rule only triggers on the JEvents page load, and not on the AJAX call.
Cheers
Stephen
- Index
- » Chameleon / ChameleonLite
- » Chameleon
- » JEvents:parseerror, syntaxError:...
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5944
- Posts this week:
- 2
- User Info:
- Total Users:
- 7660
- Newest User:
- marino9885
- Members Online:
- 0
- Guests Online:
- 129
- Online:
- There are no members online
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked