I’m trying to use Scheduler inside of the CakePHP framework. Unfortunately, trying to load/display data from the server is causing problems.
The view file is very basic. I’ve been able to load data if I use an inline js variable, but trying to get json data from the server has been a problem. The response in Firebug appears to be accurate, the format of the dates returned by the server match the format specified in scheduler.config.xml_date and there is no issue with the response status.
Because we have so many of our own functions already coded, we aren’t using the dhtmlx connectors. (Although I’ve tried to integrate them using the tutorial found here: docs.dhtmlx.com/tutorials__conne … index.html)
Here is the data that is being returned in Firebug.
Here is the js that I use to call the function
scheduler.config.xml_date="%m-%d-%Y %H:%i";
scheduler.init(‘scheduler_here’,new Date(2013,3,10),“month”);
scheduler.load("<?=Router::url(array('action' => 'data', 'ext' => 'json'))?>", “json”);
We really like what Scheduler does and we ant to use it, but if we can’t get it to integrate into CakePHP that’s a pretty severe roadblock. If there is any other information that would be helpful for me to include, let me know!
I’m not getting any sort of errors in the console and I can use the same data in a page outside of the framework, so I don’t think that it’s a data issue. The content type is application/json; charset=UTF-8. I don’t see anything extra that the function could possibly be returning - I have another plugin that uses JSON data and that one works without any problems.
The data works outside of the framework, which makes me think that something in Cake is the issue. But I can make other JSON calls which work just fine, so I’m not sure what I’m doing wrong when making this JSON request. scheduler.getEvents() returns an empty array, but I’m not sure how to use that information in continuing to debug this…
Not sure how I ended up with such an old version of Scheduler since I’ve only been working with this for about a month, but updating it did the trick. Thanks!
Here’s a quick list of features you’ll enjoy when usingCakePHP:
Active, friendly community
Flexible licensing
Compatible with versions 4 and 5 of PHP
Integrated CRUD for database interaction
Application scaffolding
Code generation
MVC (Model, View, Controller) architecture
Request dispatcher with clean, custom URLs and routes
Built-in validation
Fast and flexible templating (PHP syntax, with helpers)
View Helpers for AJAX, JavaScript, HTML Forms and more
Email, Cookie, Security, Session, and Request Handling Components
Flexible ACL (Access Control List)
Data Sanitization
Flexible Caching
Localization
Works from any web site directory, with little to no Apache configuration involved
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan