Support » Plugin: Visual Form Builder » Visual Form Builder calls ALTER TABLE on each request with WordPress Multisite

  • Resolved tigertech

    (@tigertech)


    While investigating high MySQL writes on a server, I found that when used on WordPress Multisite, Visual Form Builder 2.9.8 constantly sends “ALTER TABLE” commands to the database.

    This is because of a bug in file “inc/class-install.php”. It checks if the database has already been updated with this:

    if ( get_site_option( 'vfb_db_version' ) != $current_db_version )
        $this->install_db();

    And then saves the database version with:

    update_option( 'vfb_db_version', VFB_WP_DB_VERSION );

    This is mixing up get_option() vs. get_site_option() or update_option() vs. update_site_option(). Under WordPress multisite, the update_option() function does not set the same value that get_site_option() checks (and vice-versa).

    To prevent this, either get_site_option() should be changed to get_option(), or update_option() should be changed to update_site_option().

Viewing 1 replies (of 1 total)
  • Plugin Author Matthew Muro

    (@mmuro)

    Yep, that’s a mixup. Probably happened when I refactored the code.

    I don’t really have a preference one way or the other. Seems like the easiest thing to do is just change the get_site_option to get_option.

    Thanks, I’ll get it fixed in the next version 🙂

Viewing 1 replies (of 1 total)
  • The topic ‘Visual Form Builder calls ALTER TABLE on each request with WordPress Multisite’ is closed to new replies.