Not saving to database anymore

I’m not exactly certain when it started doing this, but my calendar does not save to the database anymore. I think it might have something to do with the POST because every item in there is prepended with a long number (please see attachment). Has anyone else experienced something like this before? Thank you for any input.

That is correct data request. Long number is the item’s id.
Check that you have autoincrement id field in DB.
If you are using custom code on server side, that expect to receive field without id added to all fields, you can add the next line after dp.init

dp.setTransactionMode("POST", false);

The id field in DB table is auto incremented.

I’m not using any custom code server side; the last thing I remember changing was turning recurring on in config.lightbox.sections:

{ name: ‘recurring’, height: 115, type: ‘recurring’, map_to: ‘rec_type’, button: ‘recurring’ }

It’s not reading from the database either.

I tried to recreate the simple sample from the Guides and that wont even load inline data. I must be doing something wrong? Could it be php related with my host?

Simple example with inline data (not working) -

in your example the format of dates in JSON does not mathes the format declared in scheduler.config.xml_date:

start_date:"04/11/2013 14:00"
scheduler.config.xml_date="%Y-%m-%d %H:%i";

So the events durations are parsed incorrectly. Additionally, it seems that you pass a ‘events’ string instead of the events variable to the scheduler.parse method[code]var events = …;

scheduler.parse(“events”, “json”);[/code] … parse.html … onfig.html

Okay that makes sense. I will update my code and see if it works, but to be fair I coped all of that code from the guide so obviously it’s wrong as well -

Ok I got the simple example working again on my server, but still can’t get the server data one to work. Can someone please take a look? Thanks!

Can you share a serve side code ? Currently it returns an empty dataset. You can check it by opening the next url in the browser

Also, you can try to enable logging for the connector and check is it generates the valid sql query for events retrieving. … #enablelog

I tried to turn on the logging, but got this error:

<?xml version='1.0' encoding='utf-8' ?>

Warning: error_log( [function.error-log]: failed to open stream: HTTP wrapper does not support writeable connections<br />
HTTP wrapper does not support writeable connections in /home3/felix822/public_html/house/connector/tools.php on line 205

You can see it here -

I tried to recreate it, but still get nothing returned and/or saved to DB.

What part of server-side code should I post here? Thanks for the help.

The valid log command will be the next


without http url, just local file name.

Ah thank you that worked. I see what I’m doing wrong now. I switched my DB connection type from mysql_connect to mysqli and the internal functions did not like that. I switched it back to mysql_connect and it’s working again. Here are the errors from the log:

SELECT id,start_date,end_date,text FROM events2

mysql_query() expects parameter 2 to be resource, object given at /home3/felix822/public_html/calendar/codebase/connector/db_common.php line 1090

mysql_fetch_assoc() expects parameter 1 to be resource, null given at /home3/felix822/public_html/calendar/codebase/connector/db_common.php line 1100

Can we not use mysqli as the connection type since mysql_connect will soon be deprecated?

Never mind, sorry I should have read the documentation better :slight_smile: I found the answer to my question here - … ample.html

Thanks again for all your help!