• Resolved stevesand

    (@stevesand)


    Hi Product Feed Pro.

    Just noticed that all my feeds are gone for my multisites, only the main site in the network has the feeds intact, all other sites are missing the feeds. This happened to two different multisites where all sub sites are missing its feed. Looks like you have done some migration in the last upgrades. Both multisites were running 13.3.7.

    Checked the posts table and the rows for the feeds are just gone, there are now rows with “adt_product_feed” (except for the main site). Probably caused by failed migration.

    Missing about 30 feeds for many shops and platforms, how do I restore this quick?

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter stevesand

    (@stevesand)

    Hi again.

    After spending some hours I found the bug in your update script.
    You have a fantastic plugin, better than the competitors, but please please be more careful with your updates, this is the 4-5 time in the last 6 months that this plugin crashed from an update and my whole business goes down.

    In your file:
    Version_13_3_5_Update.php

    This is only migrating the main site in a multisite setup, not taking other sites into account.
    Your update function should look something like this:

    public function run()
    {
        // Check if we are in a multisite installation
        if (is_multisite()) {
            // Get all blogs/sites in the multisite
            $sites = get_sites();
    
            // Loop through each site
            foreach ($sites as $site) {
                // Switch to the subsite
                switch_to_blog($site->blog_id);
    
                // Perform the version check for each subsite
                if (
                    (
                        version_compare(get_option(WOOCOMMERCESEA_OPTION_INSTALLED_VERSION), $this->version, '<=') ||
                        ! get_option(WOOCOMMERCESEA_OPTION_INSTALLED_VERSION)
                    ) || $this->force_update
                ) {
                    $this->update();
                }
    
                // Restore the current site after the update
                restore_current_blog();
            }
        } else {
            // Single-site update logic remains the same
            if (
                (
                    version_compare(get_option(WOOCOMMERCESEA_OPTION_INSTALLED_VERSION), $this->version, '<=') ||
                    ! get_option(WOOCOMMERCESEA_OPTION_INSTALLED_VERSION)
                ) || $this->force_update
            ) {
                $this->update();
            }
        }
    }


    Plugin Support Jeff Alvarez

    (@superlemon1998)

    Hi @stevesand ,

    Thanks for that, I’ll raise this bug with our developers and get this sorted out.

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