• Resolved jbstate

    (@jimburkestate)


    We are in the process of migrating a site from one vendor to another and in the new location we plan to use your plugin rather than MLF. We need to import the library from MLF to your plugin. Unfortunately in the new environment the import/export tab does not show up. Our new vendor has provided the info below. Can you please take a look at it at let us know if you can confirm the issue and if so when it might be able to be resolved?

    On vipca 4679, in cchcs.ca.gov, subsite 60, on this page https://cchcs.ca.gov/wp-admin/options-general.php?page=filebird-settings

    This line here

    https://github.com/wpcomvip/vip-sites-ca-gov/blob/2e6b22f912ebc7ee06d10cd402f2c0fc6444d596/plugins/filebird/includes/Classes/Helpers.php#L40

    using xdebug, we observed the code is looking for table wp_mgmlp_folders, which does not exist on the vipca database. (As noted & our assumption would be it should be looking for wp_60_mgmlp_folders, which does exist).

    A raw query showing the mgmlp_folders tables on vipca.production currently:

    > SHOW TABLES LIKE ‘%mgmlp_folders%’;
    +————————————————-+
    | Tables_in_vt_vipcagovipne4679 (%mgmlp_folders%) |
    +————————————————-+
    | wp_236_mgmlp_folders |
    | wp_252_mgmlp_folders |
    | wp_296_mgmlp_folders |
    | wp_326_mgmlp_folders |
    | wp_337_mgmlp_folders |
    | wp_60_mgmlp_folders |
    | wp_62_mgmlp_folders |
    +————————————————-+
    7 rows in set (0.003 sec)
    So the function returns, and all values here https://github.com/wpcomvip/vip-sites-ca-gov/blob/2e6b22f912ebc7ee06d10cd402f2c0fc6444d596/plugins/filebird/views/pages/html-settings.php#L31 are 0, so the import/export tab doesn’t show.

    Why this works on cdev2:

    On cdev2, looking at cchs there, subsite 181, https://cchcs.cdev2.sites.ca.gov/wp-admin/options-general.php?page=filebird-settings the wp_mgmlp_folders table does happen to exist:

    MariaDB [vt_stateof-cali4176]> SHOW TABLES LIKE ‘%mgmlp_folders%’;
    +————————————————-+
    | Tables_in_vt_stateof-cali4176 (%mgmlp_folders%) |
    +————————————————-+
    | wp_112_mgmlp_folders |
    | wp_174_mgmlp_folders |
    | wp_175_mgmlp_folders |
    | wp_181_mgmlp_folders |
    | wp_190_mgmlp_folders |
    | wp_21_mgmlp_folders |
    | wp_22_mgmlp_folders |
    | wp_62_mgmlp_folders |
    | wp_77_mgmlp_folders |
    | wp_mgmlp_folders |
    +————————————————-+
    10 rows in set (0.002 sec)
    So the code incidentally continues, though under false pretences, and the tabs appears.

    We believe the issue is a typo here

    diff –git a/plugins/filebird/includes/Classes/Helpers.php b/plugins/filebird/includes/Classes/Helpers.php
    index c0cb1c03..4f446a25 100644
    — a/plugins/filebird/includes/Classes/Helpers.php
    +++ b/plugins/filebird/includes/Classes/Helpers.php
    @@ -37,13 +37,13 @@ class Helpers {
    }
    public static function foldersFromWpmlf( $parent = 0, $flat = false ) {
    global $wpdb;
    – $table_name = $wpdb->base_prefix . ‘mgmlp_folders’;
    + $table_name = $wpdb->prefix . ‘mgmlp_folders’;
    $query = $wpdb->prepare( ‘SHOW TABLES LIKE %s’, $wpdb->esc_like( $table_name ) );
    if ( ! $wpdb->get_var( $query ) == $table_name ) {
    return array();
    }

    Looking at properties of https://developer.www.ads-software.com/reference/classes/wpdb/

    base_prefix will get the multisite root prefix as defined in wp-config (wp_)
    prefix will get the blog ID (wp_*_)
    Noting we also confirmed v4.9.8 is the latest version and is on the sites.

    # wp plugin list | grep filebird
    filebird inactive none 4.9.8
    We also briefly looked at https://www.ads-software.com/support/plugin/filebird/ and could not find any similar issues yet reported.

    This issue should be patched, tested, andor reported to the plugin authors / third party vendor.

    Please let us know if there’s any questions.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Missing Import/Export Tab’ is closed to new replies.