Closed sukafia closed 2 years ago
Possibly: 5482211-zen
2022-08-09T05:46:19+00:00 CRITICAL Uncaught ArgumentCountError: Too few arguments to function AutomatticWooCommerceGoogleListingsAndAdsGoogleGlobalSiteTag::AutomatticWooCommerceGoogleListingsAndAdsGoogle{closure}(), 2 passed in /homepages/19/d834533523/htdocs/itemly.co.uk/clickandbuilds/Itemly/wp-includes/class-wp-hook.php on line 307 and exactly 3 expected in /homepages/19/d834533523/htdocs/itemly.co.uk/clickandbuilds/Itemly/wp-content/plugins/google-listings-and-ads/src/Google/GlobalSiteTag.php:153
@kaushikasomaiya Thanks for the report. The hook into woocommerce_loop_add_to_cart_link
was indeed added in version 2.0.3. However WooCommerce itself passes 3 arguments to this hook, see here.
Which means it's most likely a conflict in one of their theme templates, or possibly a plugin. They must make sure this matches the hook as it's run in WooCommerce.
Thanks for the report @sukafia
Thanks for the added info @kaushikasomaiya
@sukafia (I realise you didn't have bandwidth yesterday) - When you get a free moment do you think you improve the hygiene of the issue and include some more details about what the actual symptoms are etc. (breaking sites is quite generic).
As its a public repo it's always useful to include / copy across as much info as possible from shortlinks (so it doesn't come across as we hiding anything). It also helps with searching/history later. Cheers!
@sukafia (I realise you didn't have bandwidth yesterday) - When you get a free moment do you think you improve the hygiene of the issue and include some more details about what the actual symptoms are etc. (breaking sites is quite generic).
I'll definitely take a deeper look and add more info. You're right that breaking site doesn't quite describe the issue. It appears to be conflicting with the site theme so I've reworded the title. I'll add more info based on my findings.
The changes have been released in 2.0.4
As it wasn't 100% clear what issues the sites were experiencing since they reverted before us being able to see the messages on the sites, feel free to reopen this issue if there are remaining reports of theme conflicts.
Seems the issue resurfaced again.
5538041-zd-woothemes
Reopened for the above
@dev-sabbir I think this is actually more the issue @mikkamp mentions here
If you look at the logs the error is...
2022-08-09T04:11:14+00:00 CRITICAL Uncaught ArgumentCountError: Too few arguments to function Automattic\WooCommerce\GoogleListingsAndAds\Google\GlobalSiteTag::Automattic\WooCommerce\GoogleListingsAndAds\Google\{closure}(), 2 passed in /wordpress/core/6.0.1/wp-includes/class-wp-hook.php on line 307 and exactly 3 expected in /srv/htdocs/wp-content/plugins/google-listings-and-ads/src/Google/GlobalSiteTag.php:153
Stack trace:
#0 /wordpress/core/6.0.1/wp-includes/class-wp-hook.php(307): Automattic\WooCommerce\GoogleListingsAndAds\Google\GlobalSiteTag->Automattic\WooCommerce\GoogleListingsAndAds\Google\{closure}('<a href="?add-t...', Object(WC_Product_Simple))
#1 /wordpress/core/6.0.1/wp-includes/plugin.php(191): WP_Hook->apply_filters('<a href="?add-t...', Array)
#2 /srv/htdocs/wp-content/themes/rehub-theme/inc/parts/woocolumnpart.php(214): apply_filters('woocommerce_loo...', '<a href="?add-t...', Object(WC_Product_Simple))
#3 /srv/htdocs/wp-content/themes/rehub-theme/woocommerce/content-product.php(86): include('/srv/htdocs/wp-...')
#4 /wordpress/core/6.0.1/wp-includes/template.php(772): require('/srv/htdocs/wp-...')
#5 /wordpress/plugins/woocommerce/6.7.0/includes/wc-core-functions.php(284): load_template('/srv/htdocs/wp-...', false)
#6 /srv/htdocs/wp-content/themes/rehub-theme/woocommerce/archive-product.php(127): wc_get_template_part('content', 'product')
#7 /wordpress/plugins/woocommerce/6.7.0/includes/wc-core-functions.php(345): include('/srv/htdocs/wp-...')
#8 /wordpress/plugins/woocommerce/6.7.0/templates/taxonomy-product-tag.php(22): wc_get_template('archive-product...')
#9 /wordpress/core/6.0.1/wp-includes/template-loader.php(106): include('/wordpress/plug...')
#10 /wordpress/core/6.0.1/wp-blog-header.php(19): require_once('/wordpress/core...')
#11 /wordpress/core/6.0.1/index.php(17): require('/wordpress/core...')
#12 {main}
thrown in /srv/htdocs/wp-content/plugins/google-listings-and-ads/src/Google/GlobalSiteTag.php on line 153
#2
is pointing to the woocommerce_loop_add_to_cart_link
hook.
And then checking the theme template part, the theme is only using 2 arguments
So I think it would be more appropriate for the theme to be updated.
Just mentioning this ticket here 5524351-zen because it has the same error. Can't confirm the bug unless we perform conflict testing ourselves.
Just mentioning this ticket here 5524351-zen because it has the same error. Can't confirm the bug unless we perform conflict testing ourselves.
Thanks for the additional report, although their status report shows they have a template override wp-dentaq/woocommerce/loop/add-to-cart.php
, which indicates it would be their theme. I've added a note to the ticket.
5861765-zen
Describe the bug:
There are reports of Google Listings & Ads 2.0.3 breaking sites. This issue has already been reported on Slack and is being Investigated.
I'm creating this report to help keep track and follow up on affected users.
Forum threads
https://wordpress.org/support/topic/checkout-not-loading-after-update/ https://wordpress.org/support/topic/version-2-0-3-broke-headerst-but-2-0-2-works-fine/ https://wordpress.org/support/topic/last-update-caused-problems-in-sites-functions/ https://wordpress.org/support/topic/latest-update-has-broken-the-site/
Additional details:
p1660563720862579-slack-C01E9LB4X61