Support » Plugin: SendPress Newsletters » Wrong table prefix on multisite sub-sites

  • I found this issue when I was looking at subscriber lists for a sub-site of a multisite installation. The “Status” dropdown was empty.

    It turns out that the plugin was trying to look at the “wp_2_sendpress_subscribers_status” table to populate the dropdown, and that table doesn’t exist. All the SendPress tables seem to be for the entire multisite installation, there aren’t any “wp_2_sendpress…” tables.

    I think that line 71 of /classes/class-sendpress-db-tables.php should use “$wpdb->base_prefix” rather than “$wpdb->prefix.” When I made that change, my dropdown menu was populated correctly.

    I haven’t verified, but this change probably needs to be made for all the lines which use “$wpdb->prefix” in that file.

    https://wordpress.org/plugins/sendpress/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Josh Lyford

    (@joshl)

    HI Robert,

    Did you network activate SendPress? I think this is a problem when it is network activated and it is not creating the sub tables for sites like it should. I am looking into why it is not.

    Josh

    Hi Josh,

    Yeah, I did have it Network Activated. When I turned that off and activated the plugin right from the subsite, it did create all the subtables, so the $wpdb->prefix would have populated the drop-down.

    For this setup, we have to have the plugin network activated so all the sites have SendPress automatically and can’t turn it off. Also, we need SP to work for pre-existing sites as well as for new sites which get created after SP is network activated. Is this possible?

    Plugin Author Josh Lyford

    (@joshl)

    Hi Robert,

    I am working on it and should have a fix for this in the next release. Should have a release out by Monday.

    Best,
    Josh

    Hi Josh,

    Any progress on this? I just tested it in version 1.0.2, it still seems to be happening.

    Thanks,
    Robert

    Plugin Author Josh Lyford

    (@joshl)

    Hi Robert,

    Did you try deactivate and reactivate? it should create the tables when activated. It was working in our tests but i will double check it.

    Best,
    Josh

    Hi Josh,

    I did deactivate and reactivate, which did create the tables for the existing subsites properly.

    When I Add a Site, however, the SendPress tables don’t get created for the new blank site. I would have to deactivate and reactivate SP to get it to create the tables for the new site.

    Sorry for the confusion, and thanks again,
    Robert

    Plugin Author Josh Lyford

    (@joshl)

    HI Robert,

    Thanks for the update. I will take a look and get that fixed in the next release.

    Best,
    Josh

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Wrong table prefix on multisite sub-sites’ is closed to new replies.