svenseeberg
Forum Replies Created
-
Okay, the network update worked, all tables are now up to date. I never realized that this function existed. Thanks a lot.
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.
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?
- This reply was modified 4 years, 10 months ago by 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).
@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 (...)
The command would be:
ALTER TABLE wp_N_em_events ADD COLUMN event_parent bigint(20) unsigned NULL, ADD COLUMN event_language varchar(14) NULL, ADD COLUMN event_translation tinyint(1) unsigned NOT NULL DEFAULT 0, MODIFY recurrence tinyint(1) unsigned NULL DEFAULT 0, MODIFY event_private tinyint(1) unsigned NOT NULL DEFAULT 0, MODIFY event_rsvp tinyint(1) unsigned NOT NULL DEFAULT 0, MODIFY event_all_day tinyint(1) unsigned, MODIFY event_status tinyint(1) unsigned;
I also created a thread in the Events Manager forum: https://www.ads-software.com/support/topic/_n_em_events-broken-in-multisite-setup/
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 4 years, 10 months ago by svenseeberg.
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 4 years, 10 months ago by svenseeberg.