Support » Plugin: Events Manager » bug with event_parent field

  • Resolved jamescastlegate

    (@jamescastlegate)


    When trying to create or update events using the most recent version of the plugin (5.9.7.1), I got the following error:

    WordPress database error Unknown column ‘event_parent’ in ‘field list’ for query…

    I checked the database, and this field was present in the table.
    I reverted to 5.9.6 and this fixed the problem.

Viewing 14 replies - 1 through 14 (of 14 total)
  • Same error here. Running multisite. Same error on two different sites (not sharing global table).

    Dealing with (what now appears likely to be) the same issue on a client site. Reverting to v 5.8.6 resolved this issue for me as well.

    I also get this error on a WP 4.9.11 multisite installation and Events Manager 5.9.7.1.

    I made two interesting observations:

    1. some blogs had this problem but it was somehow fixed.

    2. There are actually differences in the wp_N_em_events tables. Some tables contain the parent column others don’t. It seems that for some blogs the structure was not updated. Does anyone know how to trigger the update? Deactivating/activating the plugin?

    • This reply was modified 1 month, 1 week ago by svenseeberg.

    I created a diff between 2 tables:

    
    % diff table1.txt table2.txt
    1c1
    < MariaDB [database]> DESCRIBE wp_2_em_events;
    ---
    > MariaDB [database]> DESCRIBE wp_119_em_events;
    9c9
    < | event_status         | tinyint(1) unsigned | YES  | MUL | NULL    |                |
    ---
    > | event_status         | int(1)              | YES  | MUL | NULL    |                |
    13c13
    < | event_all_day        | tinyint(1) unsigned | YES  |     | NULL    |                |
    ---
    > | event_all_day        | int(1)              | YES  |     | NULL    |                |
    17c17
    < | event_rsvp           | tinyint(1) unsigned | NO   |     | 0       |                |
    ---
    > | event_rsvp           | tinyint(1)          | NO   |     | 0       |                |
    22c22
    < | event_private        | tinyint(1) unsigned | NO   |     | 0       |                |
    ---
    > | event_private        | tinyint(1)          | NO   |     | 0       |                |
    29c29
    < | recurrence           | tinyint(1) unsigned | YES  |     | 0       |                |
    ---
    > | recurrence           | tinyint(1)          | YES  |     | 0       |                |
    41,43d40
    < | event_parent         | bigint(20) unsigned | YES  |     | NULL    |                |
    < | event_language       | varchar(14)         | YES  |     | NULL    |                |
    < | event_translation    | tinyint(1) unsigned | NO   |     | 0       |                |
    45c42
    < 39 rows in set (0.00 sec)
    ---
    > 36 rows in set (0.00 sec)
    
    • This reply was modified 1 month, 1 week ago by svenseeberg.

    I also created a thread in the Events Manager forum: https://wordpress.org/support/topic/_n_em_events-broken-in-multisite-setup/

    Plugin Support timrv

    (@timrv)

    Hello @@jamescastlegate,

    Sorry for the late response, Could We perhaps get the full error that shows? Maybe a screenshot would help? “WordPress database error Unknown column ‘event_parent’ in ‘field list’ for query…” as it doesn’t mention what table on database it’s referring to?

    Are you also running as Single Site or a Multi-Site Installation?

    svenseeberg

    (@svenseeberg)

    @timrv the error message from the error log file is Unknown column 'event_parent' in 'field list' for query INSERT INTO 'wp_N_em_events' ('post_id', 'event_parent', 'event_slug', 'event_owner', 'event_name', 'event_timezone', 'event_start_time', 'event_end_time', 'event_start', 'event_end', 'event_all_day', 'event_start_date', 'event_end_date', 'post_content', 'event_rsvp', 'event_rsvp_date', 'event_rsvp_time', 'event_rsvp_spaces', 'event_spaces', 'location_id', 'recurrence_id', 'event_status', 'event_private', 'blog_id', 'group_id', 'event_language', 'event_translation', 'recurrence', 'recurrence_interval', 'recurrence_freq', 'recurrence_days', 'recurrence_byday', 'recurrence_byweekno', 'recurrence_rsvp_days', 'event_date_created') VALUES (...)

    svenseeberg

    (@svenseeberg)

    I went through the database. Out of 113 blogs 88 are still on an old version of the database (without the event_parent, event_language, event_translation columns).

    Plugin Support timrv

    (@timrv)

    Hello @svenseeberg,

    When you updated EM, Are you using a pretty old version of EM? I have been trying to test it on my Multisite Installation and so far I’m not experiencing the issue. I would ask our developers if for feedbacks.

    I would also post updates on this thread as it seems to be the same issue you have on: https://wordpress.org/support/topic/_n_em_events-broken-in-multisite-setup/

    Do you also perhaps have specific steps on how to replicate the said issue?

    • This reply was modified 1 month ago by timrv.
    svenseeberg

    (@svenseeberg)

    Not sure what version you would call very old. We’re doing updates at least a couple of times per year. When are updates to the database being triggered? It might happen that some blogs are using the Events Managers plugin not very often. The version we had earlier was 5.9.5.

    I did not yet try to replicate this behavior, but it might be possible. I will try to do that tomorrow.

    Can you tell if running the ALTER TABLE command I posted in the other thread is safe? Would that confuse the EM plugin somehow?

    svenseeberg

    (@svenseeberg)

    It was not possible to reproduce the issue with public test data of our project. And it would be too tedious to clean up or live database to make it available for reproducing the issue.

    Therefore I am focusing on fixing the issue in our database. I ran a script (https://gist.github.com/svenseeberg/76a8b9cb8b7efc7bd65834e27ffda4af) on a copy of our database and it fixes the issue. I cannot yet find any negative effects.

    Plugin Author Marcus

    (@netweblogic)

    Hello everyone, @jamescastlegate, @leifranden, @westcountymedia sorry the initial posts were never replied to… not sure what happened there.

    This seems to be related to MultiSite from your descriptions, I’m wondering if possibly the issue is that the specific blog you’re on didn’t execute the update…

    In theory, visiting the dashboard of a blog will trigger the update to the database of that specific blog, so I’m wondering if the bug is happening front-end only? Another thing you can do is visit Network Admin > Events Manager > Update Blogs and run the update there so all blogs get pinged to update.

    Another possible explanation is something went wrong when trying to update the DB on certain blogs. A way to trigger an update of tables (no data los should occur) is to roll back the version number in a blog table, you can do this by visiting either:

    yoursite.com/blogdir/wp-admin/options.php
    blogname.yoursite.com/wp-admin/options.php

    Find dbem_version and bring it back one digit e.g. from 5.95 to 5.94 which will force a refresh of DB fields.

    I’ll keep an eye on this thread for updates so we get to the bottom of this quickly.

    svenseeberg

    (@svenseeberg)

    Okay, the network update worked, all tables are now up to date. I never realized that this function existed. Thanks a lot.

    Plugin Author Marcus

    (@netweblogic)

    Thanks for letting us know, hopefully this’ll sort out the issue for others too.

Viewing 14 replies - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.