• Version 3.2.7 of the plugin updated the hook for a new multisite blog from the deprecated wpmu_new_blog to wp_insert_site. This hook is too early, triggering database errors as it attempts to insert options into a database table that does not yet exist.

    Instead of:

    add_action( 'wp_insert_site', 'wpmem_mu_new_site' );

    It should be:

    add_action( 'wp_initialize_site', 'wpmem_mu_new_site', 11 );

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Chad Butler

    (@cbutlerjr)

    This hook is too early, triggering database errors as it attempts to insert options into a database table that does not yet exist.

    Actually, when the action wp_insert_site is triggered, the site has already been created and inserted into the db, and the object for the new site is passed to the action. So there shouldn’t be any non-existent tables – at least as far as what the plugin would be using.

    What are the db errors you received and which tables are non-existent when you run this?

    I’m open to making a change, but I need more info on the issues you experienced.

    • This reply was modified 4 years, 12 months ago by Chad Butler.
    • This reply was modified 4 years, 12 months ago by Chad Butler.

    I can confirm this is an issue.

    On clone (using NS Cloner), WPMembers tries to insert options before the site/tables exist. making the changes Jonathan recommended worked like a charm.

    Thanks Jonathan!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Wrong hook on new multisite blog’ is closed to new replies.