Author Topic: Can't create event in calendar.  (Read 11235 times)

Offline andries78

  • Newbie
  • *
  • Posts: 5
Can't create event in calendar.
« on: February 11, 2011, 05:03:11 PM »
Goodevening!
I am a beginner but hope that you can help me

I have installed Roundcube Roundcube 0.5.1 and it works correctly.
Then I have copy the "calendar" and "jqueryui" folder in the plugins folder of "roundcube".
Then I have add the line

$rcmail_config['plugins'] = array(
  'jqueryui',
  'calendar'
  );

in the "main.inc.php" in the "roundcube\config" folder

And I have run the followed SQL:
Code: [Select]

CREATE TABLE `events` (
  `event_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uid` text,
  `recurrence_id` text,
  `user_id` int(10) unsigned NOT NULL DEFAULT '0',
  `start` int(10) unsigned NOT NULL DEFAULT '0',
  `end` int(10) unsigned NOT NULL DEFAULT '0',
  `expires` int(10) unsigned NOT NULL DEFAULT '0',
  `rr` varchar(1) default NULL,
  `recurring` text NOT NULL,
  `occurrences` int(11) DEFAULT '0',
  `byday` text,
  `bymonth` text,
  `bymonthday` text,
  `summary` varchar(255) NOT NULL,
  `description` text NOT NULL,
  `location` varchar(255) NOT NULL DEFAULT '',
  `categories` varchar(255) NOT NULL DEFAULT '',
  `all_day` tinyint(1) NOT NULL DEFAULT '0',
  `group` text,
  `timestamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `del` int(1) NOT NULL DEFAULT '0',
  `notified` int(1) NOT NULL default '0',
  `client` text,
 PRIMARY KEY (`event_id`),
 CONSTRAINT `user_id_fk_events` FOREIGN KEY (`user_id`)
   REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
)  ENGINE=INNODB   CHARACTER SET utf8 COLLATE utf8_general_ci

CREATE TABLE `events_cache` (
  `event_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uid` text,
  `recurrence_id` text,
  `user_id` int(10) unsigned NOT NULL DEFAULT '0',
  `start` int(10) unsigned NOT NULL DEFAULT '0',
  `end` int(10) unsigned NOT NULL DEFAULT '0',
  `expires` int(10) unsigned NOT NULL DEFAULT '0',
  `rr` varchar(1) default NULL,
  `recurring` text NOT NULL,
  `occurrences` int(11) DEFAULT '0',
  `byday` text,
  `bymonth` text,
  `bymonthday` text,
  `summary` varchar(255) NOT NULL,
  `description` text NOT NULL,
  `location` varchar(255) NOT NULL DEFAULT '',
  `categories` varchar(255) NOT NULL DEFAULT '',
  `all_day` tinyint(1) NOT NULL DEFAULT '0',
  `group` text,
  `timestamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `del` int(1) NOT NULL DEFAULT '0',
  `notified` int(1) NOT NULL default '0',
  `client` text,
 PRIMARY KEY (`event_id`),
 CONSTRAINT `user_id_fk_events_cache` FOREIGN KEY (`user_id`)
   REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
)  ENGINE=INNODB   CHARACTER SET utf8 COLLATE utf8_general_ci



I think, so far so good.

Now I can clicked on the "Calendar" button right from the webpage and it loads correctly

But now the problem.
If I clicked on a day/time there is a popup where I can fill a event.
The I clicked "save".
But in the calendar I can't see the event!
What's wrong?


Greetings,
Andries

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,879
    • SKaero - Custom Roundcube development
Can't create event in calendar.
« Reply #1 on: February 11, 2011, 06:24:56 PM »
In the /plugins/calendar/config/config.inc.php file did you change $rcmail_config['backend'] to database?

Offline AmpSys

  • Newbie
  • *
  • Posts: 3
Can't create event in calendar.
« Reply #2 on: February 11, 2011, 09:12:15 PM »
Quote from: skaero;33129
In the /plugins/calendar/config/config.inc.php file did you change $rcmail_config['backend'] to database?


Not to steal the OPs thunder here, but I'm having the exact same issue, except that changing the backend to 'database' results in the message:

Server Error! (SERVICE CURRENTLY NOT AVAILABLE!)

I also get the same thing when trying to import any of the test .ics appts.

I have to be missing something - is webcalendar supposed to be installed in a subdirectory of the rc folder with its db named as the backend?

Thanks for any help!

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,879
    • SKaero - Custom Roundcube development
Can't create event in calendar.
« Reply #3 on: February 12, 2011, 02:09:58 AM »
What's in your error log?

Offline andries78

  • Newbie
  • *
  • Posts: 5
Can't create event in calendar.
« Reply #4 on: February 12, 2011, 05:27:03 AM »
Thanks for your reply.:)

Quote
In the /plugins/calendar/config/config.inc.php file did you change $rcmail_config['backend'] to database?


If have checked the "/plugins/calendar/config/" folder and there is one file, "config.inc.php.dst".
Mhh.. ok, I have renamed the file in "config.inc.php" and change the "backend" param to the correct Database.

But when I rename the file, the roundcube mail is DOWN!
(Error http:500)

no error log found.

If I change the file back to "config.inc.php.dst" the roundcube mail is worked correctly.

Is there perhaps a install script to install the calendar correctly?
(When I install roundcube, there is a installer folder with a simple wizard!)
« Last Edit: February 12, 2011, 05:31:00 AM by andries78 »

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Can't create event in calendar.
« Reply #5 on: February 12, 2011, 07:44:23 AM »
Error 500 indicates there is something wrong with database settings.

What did you change in renamed config.inc.php exactly?
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline andries78

  • Newbie
  • *
  • Posts: 5
Can't create event in calendar.
« Reply #6 on: February 12, 2011, 03:31:21 PM »
I have change two lines.

$rcmail_config['backend'] = "roundcube";
(I have create a database "roundcube")

And
$rcmail_config['cron_rc_url'] = 'http://www.webadress.com/roundcube/';

Offline dshepherd

  • Jr. Member
  • **
  • Posts: 87
Can't create event in calendar.
« Reply #7 on: February 12, 2011, 03:51:42 PM »
Your backend variable is incorrect and likely to be your problem.

You need to change
$rcmail_config['backend'] = "roundcube";

to
$rcmail_config['backend'] = "database";

Offline andries78

  • Newbie
  • *
  • Posts: 5
Can't create event in calendar.
« Reply #8 on: February 12, 2011, 03:58:18 PM »
Thanks!

I have changed the param "roundcube" back to "database" and now..

It works!:)


I'm happy!

Offline andries78

  • Newbie
  • *
  • Posts: 5
Can't create event in calendar.
« Reply #9 on: February 12, 2011, 05:19:08 PM »
oops, there is another error.
If I try it on a windows 7 pc with IE8, the calendar works great!
But if I open the calendar with windows xp and ie7 there is a error.
below the ie7 page with "Common_agenda not defined." :-(
« Last Edit: February 12, 2011, 05:21:11 PM by andries78 »

Offline AmpSys

  • Newbie
  • *
  • Posts: 3
Can't create event in calendar.
« Reply #10 on: February 13, 2011, 12:35:49 PM »
Quote from: skaero;33133
What's in your error log?


Here's what shows in the log when trying to add a calendar event:

Code: [Select]

[13-Feb-2011 12:31:53] PHP Fatal error:  Call to undefined function curl_init() in /var/www/clients/client1/web14/web/plugins/calendar/program/utils.php on line 23
[13-Feb-2011 12:32:13] MDB2 Error: no such field (-19): _doQuery: [Error message: Could not execute statement]
[Last executed query: PREPARE mdb2_statement_mysql_30899b38b21d5662d2343cc0191623dc692d05a39 FROM 'INSERT INTO `events`\r\n         (`user_id`, `start`, `end`, `summary`, `description`, `location`, `categories`, `all_day`, `recurring`, `rr`, `expires`, `occurrences`, `byday`, `bymonth`, `bymonthday`, `recurrence_id`, `uid`, `client`, `timestamp`)\r\n         VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)']
[Native code: 1054]
[Native message: Unknown column 'location' in 'field list']

[13-Feb-2011 12:32:13 -0500]: DB Error: _doQuery: [Error message: Could not execute statement]
[Last executed query: PREPARE mdb2_statement_mysql_30899b38b21d5662d2343cc0191623dc692d05a39 FROM 'INSERT INTO `events`\r\n         (`user_id`, `start`, `end`, `summary`, `description`, `location`, `categories`, `all_day`, `recurring`, `rr`, `expires`, `occurrences`, `byday`, `bymonth`, `bymonthday`, `recurrence_id`, `uid`, `client`, `timestamp`)\r\n         VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)']
[Native code: 1054]
[Native message: Unknown column 'location' in 'field list']
 in /var/www/clients/client1/web14/web/program/include/rcube_mdb2.php on line 268 (POST /?_task=dummy&_action=plugin.newEvent?_task=&_action=)

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Can't create event in calendar.
« Reply #11 on: February 13, 2011, 01:26:39 PM »
The first step is to install PHP module CURL.
Without CURL it won't run at all.

The database errors indicate that there is something wrong with
'events' and/or 'events_cache' table.

Which script did you use to create the tables?
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline AmpSys

  • Newbie
  • *
  • Posts: 3
Can't create event in calendar.
« Reply #12 on: February 13, 2011, 01:45:28 PM »
Quote from: rosali;33192
The first step is to install PHP module CURL.
Without CURL it won't run at all.

The database errors indicate that there is something wrong with
'events' and/or 'events_cache' table.

Which script did you use to create the tables?


Thanks, Rosali.

I ran my info.php file and you're right - CURL module not listed.

So I installed CURL, listed the extension in my php.ini file and restarted apache.

Tested again - same problem.

I was running the script that was included in the "bug fix" release from a couple days ago.

I dropped the events table and re-ran the events portion of the mysql.sql file in that bug-fix release.

Tested again and now all is working.

Thanks so much for your help - not sure how the events table got borked the first time, but dropping it and re-creating it seemed to do the trick and not having CURL was a definite miss on my part. :-\