Help with LoadXML error

Hello,

I’m very new to this system. I just uploaded and configured the sample pages, specfically I’m trying to use /samples/01_initialization_loading/05_loading_mysql.html.

I have changed config.php to reflect my db settings, and have uploaded the table to my database. Right now I have the “events” table in the “web_data” database. However when I go to the page, I get the following error

Error type: LoadXML
Description: Incorrect XML

From reading around, it seems that this is a problem with the server-side configuration. I’ve commented the log file line, but I can’t find where log.txt is being generated.

Eventually I would like to have users be able to change and add events to the schedule, but for now, I cannot even view the preloaded events due to the error.

Thanks for the system, it looks amazing so far.

When using connectors the error can appear

  • incorrect DB config
  • incorrect paths
  • some extra output from connector’s file because of customization

Try to load samples\01_initialization_loading\php\events.php in separate window - it may show the error info.

but I can’t find where log.txt is being generated.
In same folder where events.php is placed. ( be sure that php has write access for that folder )

Thanks for your response!

Apparently my problem was a very simple one, I just needed to give php write permission to the events.php folder.

Thanks for your help!

I have another three questions.

  1. How do I get the calendar to show Sunday first in week mode?

  2. Would it be possible to increase the event editor width? Currently the second year dropdown is being bumped into a second row.

  3. Is it possible for me to add some custom text behind the Month/Week display at the very top of the page?

Thanks again!

How do I get the calendar to show Sunday first in week mode?

scheduler.config.start_on_monday = 0

Would it be possible to increase the event editor width? Currently the second year dropdown is being bumped into a second row.

Try to redefine the width in the following css class:

.dhx_cal_light {
width:580px;
}

Is it possible for me to add some custom text behind the Month/Week display at the very top of the page?

This question isn’t clear. Possibly some picture can help to understand…

Well on the top of the page, It shows the left and right arrows, the today link and the Month Year or Week Year display. Would it be possible to add some text after that?

Thanks so much for your help!

You can inject any custom HTML inside the template

Normally you have on page, something similar to the

<div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:100%;'> <div class="dhx_cal_navline"> <div class="dhx_cal_prev_button">&nbsp;</div> <div class="dhx_cal_next_button">&nbsp;</div> <div class="dhx_cal_today_button"></div>

And you can add custom blocks there - they will present inside the grid’s header, and will not affect any other logic of the scheduler.

<div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:100%;'> <div class="dhx_cal_navline"> <div class="dhx_cal_prev_button">&nbsp;</div> <div class="dhx_cal_next_button">&nbsp;</div> <div style="position:absolute; top:0px; right:300px;">Any text here </div> <div class="dhx_cal_today_button"></div>

As alternative solution, it possible to redefine template which renders the text , next to “today” button.
docs.dhtmlx.com/doku.php?id=dhtm … _templates

Thank you Stanislav. I loaded the events.php, and am getting this fatal error:

Fatal error: Uncaught exception 'Exception' with message 'MySQL operation failed Table 'ibc_calendar.events' doesn't exist' in \\boswinfs02\home\users\web\b2668\ez.theibc\codebase\connector\db_common.php:806 Stack trace: #0 \\boswinfs02\home\users\web\b2668\ez.theibc\codebase\connector\db_common.php(563): MySQLDBDataWrapper->query('SELECT event_id...') #1 \\boswinfs02\home\users\web\b2668\ez.theibc\codebase\connector\base_connector.php(341): DBDataWrapper->select(Object(DataRequestConfig)) #2 \\boswinfs02\home\users\web\b2668\ez.theibc\codebase\connector\base_connector.php(290): Connector->render() #3 \\boswinfs02\home\users\web\b2668\ez.theibc\samples\01_initialization_loading\php\events.php(10): Connector->render_table('events', 'event_id', 'start_date,end_...') #4 {main} thrown in \\boswinfs02\home\users\web\b2668\ez.theibc\codebase\connector\db_common.php on line 806

Is this an issue with the database structure?

Thanks.

Co1

Seems like

  • your config missmatches and / or your table name is different…

Try to just run the events.php and try to make a simple query to test the connection :nerd: