dbDelta shouldn't be executed on every page load

Support Meta Box AIO dbDelta shouldn't be executed on every page loadResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #28825
    AXEL PARATREAXEL PARATRE
    Participant

    Hi,

    On some server configuration alter table can be very long -> https://ibb.co/G3x5083

    in loader.php (vendor / meta-box / mb-relationships / inc )
    /**
    * If plugin is embed in another plugin, the table is not created during activation.
    * Thus, we have to create it while initializing.
    */
    if ( ! $this->is_table_created ) {
    $this->create_table();
    }

    "is_table_created" doesn't seem to work as it should. You should add an option value like
    update_option('mb_is_table_created', 1); when create_table function is successfully executed.
    and change init function with :
    if (get_option('mb_is_table_created', true) {
    $this->is_table_created = true;
    }

    Hope it will help.

    Regards,

    Axel

    #28838
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Thank you for your feedback.

    I've escalated this case to the development team to improve the code to prevent execute the function create table on load every time.

    #29501
    Long NguyenLong Nguyen
    Moderator

    The option is added in the new version of MB Relationships 1.10.6 and MB AIO 1.14.1

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.