Error when posting new Event

Support for the WordPress Calendar plugin
uticamaennerchor
Posts: 6
Joined: Sun Aug 09, 2009 6:43 pm

Error when posting new Event

Unread post by uticamaennerchor » Sun Aug 09, 2009 6:51 pm

Hello,

I have been reading through some of the other posts and have tried many of the suggestions, but I am still getting an error.

I am using Wordpress 2.8.3 on Yahoo! Small Business. I have downloaded the latest developer version of Calendar 1.2.2 and have cleared my DB of all calendar before installing the Development version.

When I go to post the event, I get the following error:
Error: An event with the details you submitted could not be found in the database. This may indicate a problem with your database or the way in which it is configured.
Wondering what I may be doing wrong here that could be causing this error. I have tried disabling everything else from my site and just had the Calendar, but still get the error. Could I have something wrong with permissions somewhere, or could my DB be messed up?

Any help is very much appreciated! Thank you!

User avatar
Kieran
Posts: 2067
Joined: Sat May 26, 2007 1:55 pm
Location: London
Contact:

Re: Error when posting new Event

Unread post by Kieran » Mon Aug 10, 2009 6:09 pm

This error is caused when an attempt is made to save the event and a subsequent query to the database to check the event was saved properly reveals it wasn't.

Given that Calendar makes use of valid, standards compliant SQL queries, this error usually indicates a problem with your database or that the version of the database you are using is not recent enough. What version of MySQL are you running?

uticamaennerchor
Posts: 6
Joined: Sun Aug 09, 2009 6:43 pm

Re: Error when posting new Event

Unread post by uticamaennerchor » Mon Aug 10, 2009 6:41 pm

I am using Yahoo as the host as that was what the previous Site Admin picked.

From what I can tell, it looks like we have MySQL 4.1.14, MySQL client version: 3.23.49, and phpMyAdmin - 2.11.9.

This was what was the default when installing from Yahoo.

User avatar
Kieran
Posts: 2067
Joined: Sat May 26, 2007 1:55 pm
Location: London
Contact:

Re: Error when posting new Event

Unread post by Kieran » Mon Aug 10, 2009 6:59 pm

Hmm, seems OK. And you are definitely using the version available from here:
http://downloads.wordpress.org/plugin/calendar.zip

uticamaennerchor
Posts: 6
Joined: Sun Aug 09, 2009 6:43 pm

Re: Error when posting new Event

Unread post by uticamaennerchor » Mon Aug 10, 2009 7:26 pm

Yes, I am using this version of the Calendar as posted above.

I made sure I removed any traces of the 1.2.2 I originally installed and have uploaded and installed that one.

Any other thoughts?

The page itself is http://www.uticamaennerchor.com/

I am testing the Calendar on the "Events" page.

User avatar
Kieran
Posts: 2067
Joined: Sat May 26, 2007 1:55 pm
Location: London
Contact:

Re: Error when posting new Event

Unread post by Kieran » Mon Aug 10, 2009 9:25 pm

There doesn't seem anything wrong with the install from the users perspective. Try running the following query against your database and let me know what happens.

Code: Select all

INSERT INTO wp_calendar SET event_title='Test', event_desc='Test Content', event_begin='2009-08-10', event_end='2009-08-10', event_time='23:00', event_recur='S', event_repeats='0', event_author=1, event_category=1, event_link='http://www.google.co.uk'
For the record, on my development system, I see the following after executing that query

Code: Select all

Query OK, 1 row affected (0.27 sec)
Given the failure you are seeing I would expect you to see some kind of error or warning here. If I can see what that is then I'll have more of an idea about what might be going wrong.

uticamaennerchor
Posts: 6
Joined: Sun Aug 09, 2009 6:43 pm

Re: Error when posting new Event

Unread post by uticamaennerchor » Tue Aug 11, 2009 1:35 pm

I get the following:
Error
SQL query:

INSERT INTO wp_calendar
SET event_title = 'Test',
event_desc = 'Test Content',
event_begin = '2009-08-10',
event_end = '2009-08-10',
event_time = '23:00',
event_recur = 'S',
event_repeats = '0',
event_author =1,
event_category =1,
event_link = 'http://www.google.co.uk'

MySQL said:

#1054 - Unknown column 'event_category' in 'field list'
When I look at the the SQL Table, I see:
Field Type Collation Attributes Null Default Extra Action
event_id int(11) No auto_increment
event_begin date No 0000-00-00
event_end date No 0000-00-00
event_title varchar(30) latin1_swedish_ci No
event_desc text latin1_swedish_ci No
event_time time Yes NULL
event_recur char(1) latin1_swedish_ci Yes NULL
event_repeats int(3) Yes NULL
event_author bigint(20) UNSIGNED Yes NULL

User avatar
Kieran
Posts: 2067
Joined: Sat May 26, 2007 1:55 pm
Location: London
Contact:

Re: Error when posting new Event

Unread post by Kieran » Tue Aug 11, 2009 5:19 pm

Ah right, well from that I gather that the alter statements used when setting up the plugin haven't run, or more specifically failed when they ran. Please try the following in SQL.

Code: Select all

ALTER TABLE wp_calendar ADD COLUMN event_category BIGINT(20) UNSIGNED;
Let me know the result

uticamaennerchor
Posts: 6
Joined: Sun Aug 09, 2009 6:43 pm

Re: Error when posting new Event

Unread post by uticamaennerchor » Tue Aug 11, 2009 6:06 pm

Still got an error, this time it was on event_link, so I did the same thing as you gave me above for category to see if that would work, and it did. I can now post events in the Calendar, and it seems to be working.

Just out of curiosity, should event_link be any different?

Thanks for all of your help!

User avatar
Kieran
Posts: 2067
Joined: Sat May 26, 2007 1:55 pm
Location: London
Contact:

Re: Error when posting new Event

Unread post by Kieran » Tue Aug 11, 2009 6:13 pm

Er, well that's why I was asking you to do things one by one. The next query would have been

Code: Select all

ALTER TABLE wp_calendar ADD COLUMN event_link TEXT;
As you can see, it has a different data type in order to support the storing of hyperlinks.

What I meant was that you should post the results of the alter statement but I have deduced that it succeeded. In which case I would suggest that the reason this problem arose in the first place is that you still had one or more of the 3 calendar database tables when you re-installed. Otherwise, in the absence of any of the tables, they are all created from scratch with the correct attributes and you would have been able to add events from the word go.

Anyway, it is working for you now which is a good thing :)

Post Reply