FullCalendar Vis fails to load data when J! debug is enables

achartier

Administrator
Staff member
I ran into this in my testing. If you change the J! debug level to anything higher than minimum, the FullCalendar vis will not display any of the data. Also, if you open the vis in the admin side it will not load the database details, it just sits there spinning.

Works OK when debug is set to Minimum or None.
 
Have you checked the network responses from the AJAX calls? Usually means that there's a notice of some sort getting injected into JSON responses which is breaking the JSON decode.

-- hugh
 
FYI, I can't replicate this, but that might be that you are using some element I'm not which is tossing a notice.

-- hugh
 
Ooops, slash the wrong way. Xampp not happy with it. And for confirmation it is the ALG-Test site.
 
Can't login ..

"Another plugin has redirected the page on login, Please check your plugins system"

-- hugh
 
Ah, yes, reduce the size of the browser window and you will get the mobile menu, choose the login from there. I don't know why this is happening on the wampp system, it doesn't under ubuntu. You should be able to log in normally to the admin side which is probably where you want to go. Set debug to maximum and then open the vis.

On the front end you want the Club Administration menu and choose Security/Pool Signups.
 
Yup, as I said up there ^^ it's because you have PHP notices being injected into the JSON response to the AJAX calls ...

http://screencast.com/t/TX7oMy9ht

In this case from a Jumi plugin. As you can see, the AJAX response with the JSON event data in it has exactly the same set of PHP notices in it as the page itself does on load.

Having those PHP logging msgs in the JSON response causes the Javascript JSON decoding to blow up with "Unexpected token <", because that's HTML, not JSON.

This is problematic for us, because we are AJAX / JSON (so technically AJAJ) heavy, and anything which tosses a PHP warning, error or notice will cause this problem in JSON responses, if error logging is enabled. Not just from our code, but anything in J! or any 3rd party system plugin (as in this case).

One of these days we might attempt to work round this. Convert all our Request.json() calls (which automatically parse the response, so nothing we can do to prevent the error) to plain Request(), which doesn't automatically JSON decode, then strip out any HTML from before the JSON, before manually JSON.decode()'ing it. Also probably don't do that if debug mode is enabled in J! or Fabrik, otherwise it would make debugging a lot harder.

But that's a lot of work.

-- hugh
 
Chrome's Dev Tools.

I used to use FF with Firebug exclusively, until FF got bloated enough it just couldn't keep up enough. I switched to Chrome for all my debugging, and after a short period of adjusting to the Dev Tools UI, I've never looked back.

The only issue I have with it really is that it is obviously designed for large monitors, and gets a little cramped on a laptop screen. Undocking the debug window solves that, it just means more windows knocking around, adds a keystroke to find it (ctrl-shift-i to bring up devtools), and means a bit of window juggling when trying to inspect the page (the undocked debug window invariably covers the elements you are trying to inspect).

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top