• Resolved BigFarmer

    (@bigfarmer)


    Just upgraded wordpress to 4.4.2 and I’m now getting this error when creating an event:

    Your event details are incorrect and cannot be published, please correct these errors first:

    Something went wrong saving your event to the index table. Please inform a site administrator about this.

    This is what it creates in the php error log

    [04-Feb-2016 07:23:49 UTC] WordPress database error Column ‘event_attributes’ specified twice for query INSERT INTO wp_em_events (event_id, post_id, event_slug, event_owner, event_name, event_start_time, event_end_time, event_all_day, event_start_date, event_end_date, post_content, event_rsvp, event_rsvp_time, location_id, event_status, event_private, event_attributes, group_id, recurrence, recurrence_days, event_private, event_attributes, event_date_created) VALUES (NULL, ‘239’, ‘test-event-4’, ‘1’, ‘Test event 4′, ’00:00:00′, ’00:45:00’, ‘0’, ‘2016-02-05’, ‘2016-02-05’, ‘Some content’, ‘0’, ’00:00:00′, ‘0’, ‘1’, ‘0’, ”, ‘0’, ‘0’, ‘0’, ‘0’, ‘a:11:{s:6:\”Region\”;s:2:\”EU\”;s:6:\”Stream\”;s:11:\”Àaaaaaaaaa\”;s:18:\”wp_review_location\”;s:6:\”bottom\”;s:20:\”wp_review_desc_title\”;s:7:\”Summary\”;s:15:\”wp_review_color\”;s:7:\”#1e73be\”;s:19:\”wp_review_fontcolor\”;s:7:\”#555555\”;s:18:\”wp_review_bgcolor1\”;s:7:\”#e7e7e7\”;s:18:\”wp_review_bgcolor2\”;s:7:\”#ffffff\”;s:21:\”wp_review_bordercolor\”;s:7:\”#e7e7e7\”;s:15:\”aFhfc_head_code\”;s:0:\”\”;s:17:\”aFhfc_footer_code\”;s:0:\”\”;}’, ‘2016-02-04 07:23:49’) made by edit_post, wp_update_post, wp_insert_post, do_action(‘save_post’), call_user_func_array, EM_Event_Post_Admin::save_post, EM_Event->save_meta

    It doesn’t seem to be a plugin conflict. Any ideas? I’m not sure why it would be creating the same field entry twice in the sql insert.

    https://ww.wp.xz.cn/plugins/events-manager/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter BigFarmer

    (@bigfarmer)

    Additionally if I try to create an event with no meta attributes I get this error instead

    [04-Feb-2016 07:40:38 UTC] WordPress database error Column ‘event_private’ specified twice for query INSERT INTO wp_em_events (event_id, post_id, event_slug, event_owner, event_name, event_start_time, event_end_time, event_all_day, event_start_date, event_end_date, post_content, event_rsvp, event_rsvp_time, location_id, event_status, event_private, group_id, recurrence, recurrence_days, event_private, event_attributes, event_date_created) VALUES (NULL, ‘254’, ‘test-4c’, ‘1’, ‘test 4c’, ’00:00:00′, ’01:45:00′, ‘0’, ‘2016-02-05’, ‘2016-02-06’, ‘test 4c’, ‘0’, ’00:00:00′, ‘0’, ‘1’, ‘0’, ‘0’, ‘0’, ‘0’, ‘0’, ‘a:0:{}’, ‘2016-02-04 07:40:38’) made by edit_post, wp_update_post, wp_insert_post, do_action(‘save_post’), call_user_func_array, EM_Event_Post_Admin::save_post, EM_Event->save_meta

    Thread Starter BigFarmer

    (@bigfarmer)

    I should also say Events Manager is the latest version, it’s all up to date

    If I uninstall the plugin and reinstall will it preserve existing events in the database?

    Plugin Support angelo_nwl

    (@angelo_nwl)

    this works for me, can I know if you get any error during wp upgrade and is this happen only after you upgraded wp?

    Thread Starter BigFarmer

    (@bigfarmer)

    It’s definitely only after upgrade, and the upgrade went smoothly. I’m doing some debugging and the additional values are definitely being put into the field array before it goes to the database command.

    It seems to be getting two copies of the field from the front end in at least once case, but is inserting both into the field array because one is empty and one is populated so it isn’t caught by the duplicate check.

    Bit of a puzzle but if it’s not happening for you then it’s probably my installation

    *edit
    In the case of the event_private field it seems to be added by this line:

    $event_array[‘event_private’] = ( $this->post_status == ‘private’ ) ? 1:0;

    When it has already been added to the array. Bit confused :S

    Thread Starter BigFarmer

    (@bigfarmer)

    I changed the php version I was running the site on and it’s started working.

    I think there may be a php bug or error involved. It seems like the keys being added to the array weren’t being properly processed as strings, the line cited above should merely have modified the existing array entry but it was adding another one.

    I can’t put that down to anything other than a problem with php itself as array functions are a core element.

    Thread Starter BigFarmer

    (@bigfarmer)

    I’ll tag this as resolved. No idea what it was in the other version of PHP that might have caused that behaviour, but it’s not happening now.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Error creating post’ is closed to new replies.