• Resolved David Borrink

    (@davidborrink)


    We have an error message showing up in the dashboard in the Product Gallery area. It says (and I’m ommitting domain names here)…

    Warning: implode(): Invalid arguments passed in /home/---------/public_html/----------.com/wp-content/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-product-images.php on line 69

    Here are lines 67 through 70 from that file.

    67   // need to update product meta to set new gallery ids
    68   if ( $update_meta ) {
    69   update_post_meta( $post->ID, '_product_image_gallery', implode( ',', $updated_gallery_ids ) );
    70   }

    What would this mean? We have product galleries that are working fine on other products. So this isn’t a universal problem. These were working fine until recently when we discovered product galleries not showing up on some. We entered new images, but they didn’t show up.

    We’re running on a child theme based on TwentyTwelve.

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

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

    (@mikejolley)

    Thread Starter David Borrink

    (@davidborrink)

    Hi Mike,

    I assume that I replace the code from lines 67-70 with the code you posted and put a child copy of class-wc-meta-box-product-images.php in my theme folder?

    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    No, themes cannot change core files. You’d have to edit woocommerce.

    Thread Starter David Borrink

    (@davidborrink)

    Okay, so this is a core file edit that you’ll roll out in the next update? Got it. I’ll edit my core files.

    Thread Starter David Borrink

    (@davidborrink)

    I just implemented it, and have a new error message for you. Looks like it needs more tweaking.

    Parse error: syntax error, unexpected 'continue' (T_CONTINUE) in /home/-------/public_html/--------.com/wp-content/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-product-images.php on line 56

    Thread Starter David Borrink

    (@davidborrink)

    The above appeared in the Product Galleries box in the dashboard sidebar.

    We just tried adding five new related products under “Linked products”. We clicked “update” and we had a white screen show up with the message I mentioned in the last posting above.

    Then we attempted to edit another product. The content in the product editor is not showing, the visual editor buttons are gone as well as the dashboard panels for SEO, excerpts, and the Product listings.

    This is affecting the display of products on the front end, though. Just the display of the dashboard on Products. It doesn’t affect Posts or Pages.

    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    It does not need more tweaking – it works. Maybe you made a mistake in your edits..

    Thread Starter David Borrink

    (@davidborrink)

    Okay, I see what happened. I didn’t copy the code correctly from GitHub. I didn’t click “view” and get the final finished code. My bad for never having done a pickup from GitHub before.

    We just tried an item and it works. Thanks so much for looking into this Mike.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Product galleries have error message with "implode"’ is closed to new replies.