• Hi there and thanks for your plugin.

    On a customer website, they have noticed that when editing a specific woocommerce product in a different language (they use WPML), they can’t see the metabox. They get this error:

    Uncaught TypeError: array_key_first(): Argument #1 ($array) must be of type array, string given in /home2/XXXXX/public_html/wp-content/plugins/google-listings-and-ads/src/Product/ProductHelper.php:615
    Stack trace:
    #0 /home2/XXXXX/public_html/wp-content/plugins/google-listings-and-ads/src/Product/ProductHelper.php(615): array_key_first('a:4:{i:4213;a:1...')
    #1 /home2/XXXXX/public_html/wp-content/plugins/google-listings-and-ads/src/Admin/MetaBox/ChannelVisibilityMetaBox.php(127): Automattic\WooCommerce\GoogleListingsAndAds\Product\ProductHelper->get_validation_errors(Object(WC_Product_Variable))
    #2 /home2/XXXXX/public_html/wp-content/plugins/google-listings-and-ads/src/Admin/MetaBox/AbstractMetaBox.php(107): Automattic\WooCommerce\GoogleListingsAndAds\Admin\MetaBox\ChannelVisibilityMetaBox->get_view_context(Object(WP_Post), Array)
    #3 /home2/XXXXX/public_html/wp-admin/includes/template.php(1456): Automattic\WooCommerce\GoogleListingsAndAds\Admin\MetaBox\AbstractMetaBox->handle_callback(Object(WP_Post), Array)
    #4 /home2/XXXXX/public_html/wp-admin/edit-form-advanced.php(716): do_meta_boxes(Object(WP_Screen), 'side', Object(WP_Post))
    #5 /home2/XXXXX/public_html/wp-admin/post.php(206): require('/home2/XXXXX...')
    #6 {main}

    It happens on a few products so they can’t edit the meta of those. Can you please assist with this?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hey there, @pixael! Thanks for contacting us. I’m happy to help you.

    As I understand the issue only happens when using WPML, correct?

    Have you reached out to their support? Since the issue only happens when using their plugin, we are not able to help with it and they would be more suited to assist you in figuring out what is happening ??

    If the issue is also happening without using WPML, please let us know so we can assist you further.

    Please let us know if there’s anything else we can do to help or if you have any questions.

    Have a wonderful day!

    Thread Starter Giuseppe Milo

    (@pixael)

    Thanks I will.

    Plugin Support ckadenge (woo-hc)

    (@ckadenge)

    Hi @pixael,

    Sounds like a plan.

    Please keep us updated on how it goes. In the meantime, I’ll go ahead and mark this thread as solved.

    Should you still need further assistance, feel free to open a new thread.

    Thread Starter Giuseppe Milo

    (@pixael)

    Hi, I’ve found that your plugin was saving postmeta with broken serialized data. This was braking the whole editing page. My customer wasn’t able to modify woocommerce products.

    In particular the broken postmeta had meta_key _wc_gla_errors with values like these:
    s:118:"a:2:{i:4143;a:1:{s:13:"internalError";s:14:"Internal error";}i:4144;a:1:{s:13:"internalError";s:14:"Internal error";}}";

    This will unserialize in a string, not an array.

    You may look into this.

    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello Giuseppe Milo

    Thank you for your reply.

    To confirm are you using the latest version of Google Listings & Ads 2.7.6?

    May I ask in which table did you find these values?
    This will help me create a report so the dev team and look into it.

    Looking forward to your response. ??

    Best regards.

    Thread Starter Giuseppe Milo

    (@pixael)

    Hi
    yes, I’m using the latest version. Post meta are stored in the wp core table PREFIX_postmeta.

    Thank you for reaching back, clarifying things further @pixael .

    Best if you go ahead with creating a report, over at GitHub, via this screen.

    Thank you.

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