Support » Plugin: Events Manager » Table names should not be defined v2

  • edward_plainview


    Two years ago I sent in a patch to you guys to make EM dynamically retrieve the SQL table names:

    What happened to that patch? Ignored?

    I’m asking because I’ve got a Broadcast user that is using recurring events and any attempt I make at telling EM to regenerate all of the recurrences is going to result in the rows being created in the wrong table.

    If the table name was correctly fetched, it would put the rows into the table that WordPress is currently on – which would be incorrect after a switch_to_blog() call.

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


    Hi Edward,
    EM user here too 🙂

    I guess it depends on your EM Global settings (lots of ways to configure EM MS, I found). I have been using WPMS with EM for years. All my events are stored in wp_em_events, not in tables on the subblogs. Then in column blog_id is where the residing blog is defined.

    So, where are those events created? Which blog? If I create an event on blog 2 it will stored like that in wp_em_events blog_id = ‘2’. I don’t even have wp_2_em_event or 3 or 4, for that matter.

    So, I am curious for your settings that make wp_2_em_events, etc.

    I’m testing using the default values, with EM activated on a per blog basis.



    But EM is also activated on your main blog, right? Otherwise the global tables do not work. Then you would have to add and delete events from that specific blog. You (then) cannot delete events on blog 2 from the main blog is Global Tables are off.

    In my case EM is only activated on blogs 64 and 65.



    And when does it go wrong? If events are created on blog 64, they should be editable from blog 64. So as a Super Admin, you will need to go to blog 64 to do the editing. Right? 😉

    The problem is, during an event broadcast from 64 to 65, after a switch_to_blog() command, EM still thinks it’s on blog 64 and is therefore using the wrong tables.

    This is because the table names are in defines, instead of being generated dynamically using $wpdb->prefix.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Table names should not be defined v2’ is closed to new replies.