I've just upgraded my site from 2.8.1 to 2.9.3 and now certain bits of it are failing. It seems that a new "Template Runtime Annotation Class" introduced in 2.9.0 is randomly dumping comment markers into rendered templates (for reasons I still don't truly fathom) and it's causing all the parts of my site which are expecting good json to fail. Is there any way I can turn this "feature" off, even if it's only conditionally?

And help here is much appreciated.



I don't think it can I'm afraid.

Those comments are placeholder markers. With the new Layout template system it's necessary to pre-parse or extrract parts of templates for later substitusion, these markers are what you're seeing I belive, do they look somethnig like this : {!-- rsa9234458637 --}??

You might have got an exit or end in your JSON handler (I call this the endpoint, the URL that if called in the AJAX call), after its finished writing output, if your using PHP, if this is the case you'll have to get rid of that as it stops the template evaluation 'mid flow' and those placeholders wont get parsed out.

I would guess the problem is somewhere like this, in the JSON Endpoint. if you can supply code/examples we can perhaps help out more specifically. Or you could always debug this with the hello world technique, replace your endpoint with a simple JSON string `{'test':'hello world'} and test that you get that reponse, then add your logic back in until you find the bit thats causing the template engine to fail early.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.