Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.



Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.


JEvents:parseerror, syntaxError: Unexpected token

JEvents:parseerror, syntaxError: Unexpected token


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 ?



Beginner Modder
4 Posts
Administrator has disabled public posting

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.


Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

3330 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
Total Topics:
Total Polls:
Total Posts:
Posts this week:
User Info:
Total Users:
Newest User:
Members Online:
Guests Online:

There are no members online

Forum Legend:

 New Sticky