Problems loading data from database

I’m using Scheduler on a Yii Framework project and I got stucked trying to load events from a database. I followed all the instructions on the website so i don’t have a clue about what I’m doing wrong.

The funny thing is that if i load from a xml file there are any problems. The scheduler shows all the events, but if i try to do it loading with the functions from a database it doesn’t show anyone.

I’m using this on my index.php


And on connector.php we can find this code:



$calendar = new SchedulerConnector($res);


If i put this code on index.php it shows this error: This XML file does not appear to have any style information associated with it. The document tree is shown below.

Any suggestions?

this XML file does not appear to have any style information associated with it.
Does it shows some real xml data below ? The message itself is expected and not a sign of the error.

Be sure that path in scheduler.load("…/dhtmlx/scheduler/data/connector.php"); really points to the connector.php ( as you are using YII - the routing may interfere )

Check that generated xml data has start_date and end_date fields, and they are really formatted as “%Y-%m-%d” ( you can use different format, by changing scheduler.config.xml_date )

Well it actually get the data from the database. I used the events from one of the examples that I have download.

There’s some of the information returned:






The path it seems correct, because as you can see there is the other xml file with I can load all the events…

And the fields are formated like “%Y-%m-%d %H:%i:%s”.

The data looks valid, and if path is valid as well - I don’t see any problems that can prevent valid data loading.

If issue still occurs - please provide any kind of sample or demo link where issue can be checked.

Well, i tryied to test it in another one simple application (I just created a new one with yii) and I’ve got the same problem. Loading from the file it shows everything but when i try to load from database… Nothing.

I used the files from the samples (filling all the databases with the script and copying code) and I don’t know what i’m doing wrong :cry:

I will attach the files (index.php, connect.php and events.xml) to see if there’s the mistake.

Thanks! (6.13 KB)

Are you using default scheduler’s example as a “sample” or special example for the YII …

There is no major difference, though.
The above link contains full yii demo app with the working scheduler.

Hi there! Long time not visiting the forum.

Well I actually did some ‘patch’ and now it is loading events from the database. I just created a new class and controller and put the code into ‘index.php’.

In my function of events i just call to that class (or direction) and it works. Loading looks fine, but there’s still a problem trying to save directly from the calendar. :confused:

I don’t know what I’m doing wrong but I hope to solve it! :stuck_out_tongue: