• Resolved WPJohn

    (@wordpressjohn)


    Hello,
    I also had updater problems. Probably because I hide wp-admin behind NinjaFirewall. So the new updater failed.
    Now I lost about 400 category images. They are still on the server but not ‘connected’ to the categories anymore.

    I tried the manual fixes:
    1. Finding the cronjob with crontrol: I could not see the cronjob.
    2. Adding alternate cron to wp-config: doesnt help.
    3. Adding workaround code to functions.php and opening the specific url: it gives white screen. Maybe because it cannot find the cronjob anymore?

    I hope I can get the categories images back with the 2.6.1 update. Or that someone else knows a fix.
    Thanks in advance!

    https://www.ads-software.com/plugins/woocommerce/

Viewing 15 replies - 1 through 15 (of 26 total)
  • Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    Run the function/link I posted a few times. It may time out. You can also enable debug https://www.ads-software.com/support/topic/how-to-debug-issues-after-updates?replies=1

    Thread Starter WPJohn

    (@wordpressjohn)

    Thanks. One plugin (optimize seo image) blocked the process.
    After disabling this plugin it worked.

    But.. the missing category images aren’t back.
    Also I tried the WooCommerce 2.6.1 upgrade, but that didn’t help.
    I hope the missing images can be restored somehow.

    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    Are there missing tables in your system status report?

    Thread Starter WPJohn

    (@wordpressjohn)

    All checked green.

    woocommerce_sessions: ?
    woocommerce_api_keys: ?
    woocommerce_attribute_taxonomies: ?
    woocommerce_downloadable_product_permissions: ?
    woocommerce_order_items: ?
    woocommerce_order_itemmeta: ?
    woocommerce_tax_rates: ?
    woocommerce_tax_rate_locations: ?
    woocommerce_shipping_zones: ?
    woocommerce_shipping_zone_locations: ?
    woocommerce_shipping_zone_methods: ?
    woocommerce_payment_tokens: ?
    woocommerce_payment_tokenmeta: ?

    WC Update log:
    06-15-2016 @ 17:05:14 – Queuing 2.6.0 – wc_update_260_options
    06-15-2016 @ 17:05:14 – Queuing 2.6.0 – wc_update_260_termmeta
    06-15-2016 @ 17:05:14 – Queuing 2.6.0 – wc_update_260_zones
    06-15-2016 @ 17:05:14 – Queuing 2.6.0 – wc_update_260_zone_methods
    06-15-2016 @ 17:05:14 – Queuing 2.6.0 – wc_update_260_refunds
    06-15-2016 @ 17:05:14 – Queuing 2.6.0 – wc_update_260_db_version
    06-15-2016 @ 17:05:16 – Running wc_update_260_options callback
    06-15-2016 @ 17:05:16 – Finished wc_update_260_options callback
    06-15-2016 @ 17:05:16 – Running wc_update_260_termmeta callback
    06-15-2016 @ 17:05:16 – Finished wc_update_260_termmeta callback
    06-15-2016 @ 17:05:16 – Running wc_update_260_zones callback
    06-15-2016 @ 17:05:16 – Finished wc_update_260_zones callback
    06-15-2016 @ 17:05:16 – Running wc_update_260_zone_methods callback
    06-15-2016 @ 17:05:16 – Finished wc_update_260_zone_methods callback
    06-15-2016 @ 17:05:16 – Running wc_update_260_refunds callback
    06-15-2016 @ 17:05:16 – Finished wc_update_260_refunds callback
    06-15-2016 @ 17:05:16 – Running wc_update_260_db_version callback
    06-15-2016 @ 17:05:16 – Finished wc_update_260_db_version callback
    06-15-2016 @ 17:05:16 – Data update complete

    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    wc_update_260_termmeta ran so should be fine. Is there content in your termmeta table if you look in your database?

    Thread Starter WPJohn

    (@wordpressjohn)

    Yes, it’s filled with a lot of data. 5089 rows. I see product attribute lines, lines like: a:3:{i:0;s:5:”46448″;i:1;s:5:”46449″;i:2;s:5:”46468″;} and lines like display_type and thumbnail_id

    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    This means the data was successfully ported. That should have been everything. Maybe look at the term meta for a category ID you know had data before and see whats there. thumbnail_id is the important one.

    Thread Starter WPJohn

    (@wordpressjohn)

    Okay thanks, that gives still some hope!

    For example this one?
    [Termmeta table]

    metaid  | termid | metakey | metavalue
    1026 | 2637 | thumbnail_id | 30141

    Termid corresponds to a category.
    The metavalue (30141) is my image.
    [POSTmeta table]:

    667053	30141	_wp_attached_file	aanbiedingen.jpg
     edit	667054	30141	_wp_attachment_image_alt	aanbiedingen
     edit	667055	30141	_wp_attachment_metadata	a:6:{s:5:"width";i:360;s:6:"height";i:230;s:4:"file";s:16:"aanbiedingen.jpg";s:5:"sizes";a:5:{s:9:"t...

    That looks as if it still exists and is okay, if I am correct?
    (the image data above is the correct category image)

    Still the category images are gone after the update. In frontend and in backend.

    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    If you edit the category description say, does it change at all? And you’re looking at wp_termmeta right?

    Thread Starter WPJohn

    (@wordpressjohn)

    The first data is from wp_termmeta table indeed.
    The second data is from the postmeta table. Which seems to be my category image.

    Also in the backend > products > categories > my-category I see the Name, description, thumbnail and more fields. The ‘Category Term meta field’ also shows a thumbnail id. But the thumbnail field (where you should see an image) is empty. Really strange. Maybe this information helps already.

    I will go try and change the description and report back if it really changes at all.

    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    You know the term ID right?

    If you were to run this in your theme somewhere (header or footer), what does it show?

    <?php var_dump( get_term_meta( TERM_ID, 'thumbnail_id', true ) ); ?>

    Replace TERM_ID with your term.

    Thread Starter WPJohn

    (@wordpressjohn)

    It shows:

    string(0) ""

    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    Thats a problem then. WordPress is not seeing the values.

    Out of interest, what happens if you flush cache first:

    <?php
    wp_cache_flush();
    var_dump( get_term_meta( TERM_ID, 'thumbnail_id', true ) );
    ?>
    Thread Starter WPJohn

    (@wordpressjohn)

    Still the same:
    string(0) ""

    BUT:
    Good news ?? The images are back! In frontend and backend! So it seems to be fixed again.
    It seems the wp_cache_flush(); did the trick.

    Very strange, still wondering what happened or what I missed in the process. As far as I might suspect the following happened:
    1. update failed (probably because of blocking wp-admin with security tools);
    2. the database upgrade was not finished;
    3. Tried the fixes with cronjob and forced upgrade;
    4. Cleared cloudflare cache, wp-supercache and autoptimize cache;
    5. Restarted apache to clear opcache;
    6. Did all things you said;
    7. wp_cache_flush() worked;

    I am running memcached, could it be the situation that memcached kept the object cache from the failed database upgrade all this time in the cache? This is what I suspect now, but could be wrong. I share this to help you and other readers.
    I am really interested in your conclusion.

    But I am glad it works again:) Thanks!

    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    I’ll add a wp_cache_flush to our routine. Thanks.

Viewing 15 replies - 1 through 15 (of 26 total)
  • The topic ‘Category images gone after upgrade to WC 2.6’ is closed to new replies.