facebook-for-woocommerce icon indicating copy to clipboard operation
facebook-for-woocommerce copied to clipboard

View Content events triggering PHP server notices

Open thelogicwizards opened this issue 2 years ago β€’ 2 comments

πŸ”Ž Isolate the bug

  • [x ] I have confirmed this occurs in the most recent version of WordPress, WooCommerce, and Facebook for WooCommerce.
  • [ ] I have confirmed this occurs when only WooCommerce and Facebook for WooCommerce are active and when using a default WordPress or WooCommerce theme.

✍️ Describe the bug

This user is pulling server PHP notices on their "View Content" events from wp-content/plugins/facebook-for-woocommerce/facebook-commerce-events-tracker.php on line 193 of our plugin and wants to know if this identifies an error in our code. Their server logs indicate affected IPs with corresponding IPs listed in our plugin's logs from their site. The logs themselves are showing successes, not errors specifically, just notices, so I'm not particularly sure if this is expected behavior or not or if there may be a way to disable those notices.

@message-dimke said:

At glance, I can say that the code must be adjusted. Notice is our fault. I will also try to reproduce the issue myself, but the code clearly assumes we have posts, when we may also have post ids and we do not check that, so the Notice is more than possible.

Ref. Ticket: 4950837-zd-woothemes Slack: p1650292425964489-slack-C7U3Y3VMY

πŸšΆβ€β™€οΈ Steps to reproduce

  1. User runs a manual sync to Facebook via the plugin settings
  2. User notices these PHP notices in their server logs: Refer to ref. ticket to view information as this repo is public.
  3. These logs correspond from our plugin: Refer to ref. ticket to view information as this repo is public.
  4. When Facebook sync is paused, the server PHP notices no longer appear.

βœ”οΈ Expected behavior

The user should be able to run a manual sync without those PHP notices firing off based on the response by @message-dimke

πŸ—ƒ Logs

`

WordPress Environment

WordPress address (URL): https://www.kathryncallaghan.co.uk Site address (URL): https://www.kathryncallaghan.co.uk WC Version: 6.4.0 REST API Version: βœ” 6.4.0 WC Blocks Version: βœ” 7.2.1 Action Scheduler Version: βœ” 3.4.0 WC Admin Version: βœ” 3.3.2 Log Directory Writable: βœ” WP Version: 5.9.3 WP Multisite: – WP Memory Limit: 256 MB WP Debug Mode: βœ” WP Cron: – Language: en_GB External object cache: –

Server Environment

Server Info: nginx/1.21.3 PHP Version: 7.4.28 PHP Post Max Size: 128 MB PHP Time Limit: 300 PHP Max Input Vars: 10000 cURL Version: 7.68.0 OpenSSL/1.1.1g

SUHOSIN Installed: – MySQL Version: 5.5.5-10.3.31-MariaDB-0ubuntu0.20.04.1 Max Upload Size: 128 MB Default Timezone is UTC: βœ” fsockopen/cURL: βœ” SoapClient: βœ” DOMDocument: βœ” GZip: βœ” Multibyte String: βœ” Remote Post: βœ” Remote Get: βœ”

Database

WC Database Version: 6.4.0 WC Database Prefix: jf5v9_ Total Database Size: 190.91MB Database Data Size: 131.63MB Database Index Size: 59.28MB jf5v9_woocommerce_sessions: Data: 7.02MB + Index: 0.20MB + Engine InnoDB jf5v9_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB jf5v9_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB jf5v9_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB jf5v9_woocommerce_order_items: Data: 1.52MB + Index: 0.28MB + Engine InnoDB jf5v9_woocommerce_order_itemmeta: Data: 5.52MB + Index: 7.03MB + Engine InnoDB jf5v9_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB jf5v9_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.05MB + Engine InnoDB jf5v9_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB jf5v9_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.05MB + Engine InnoDB jf5v9_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB jf5v9_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB jf5v9_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB jf5v9_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB jf5v9_actionscheduler_actions: Data: 3.02MB + Index: 2.44MB + Engine InnoDB jf5v9_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB jf5v9_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB jf5v9_actionscheduler_logs: Data: 2.02MB + Index: 2.14MB + Engine InnoDB jf5v9_aelia_dismissed_messages: Data: 0.02MB + Index: 0.00MB + Engine InnoDB jf5v9_aelia_exchange_rates_history: Data: 0.02MB + Index: 0.00MB + Engine InnoDB jf5v9_commentmeta: Data: 0.09MB + Index: 0.11MB + Engine InnoDB jf5v9_comments: Data: 3.52MB + Index: 3.16MB + Engine InnoDB jf5v9_e_events: Data: 0.02MB + Index: 0.02MB + Engine InnoDB jf5v9_e_submissions: Data: 0.02MB + Index: 0.27MB + Engine InnoDB jf5v9_e_submissions_actions_log: Data: 0.02MB + Index: 0.11MB + Engine InnoDB jf5v9_e_submissions_values: Data: 0.02MB + Index: 0.03MB + Engine InnoDB jf5v9_frmt_form_entry: Data: 0.02MB + Index: 0.05MB + Engine InnoDB jf5v9_frmt_form_entry_meta: Data: 0.09MB + Index: 0.08MB + Engine InnoDB jf5v9_frmt_form_views: Data: 0.06MB + Index: 0.06MB + Engine InnoDB jf5v9_itsec_bans: Data: 0.02MB + Index: 0.03MB + Engine InnoDB jf5v9_itsec_dashboard_events: Data: 0.05MB + Index: 0.05MB + Engine InnoDB jf5v9_itsec_distributed_storage: Data: 0.02MB + Index: 0.02MB + Engine InnoDB jf5v9_itsec_fingerprints: Data: 0.02MB + Index: 0.03MB + Engine InnoDB jf5v9_itsec_geolocation_cache: Data: 0.02MB + Index: 0.03MB + Engine InnoDB jf5v9_itsec_lockouts: Data: 0.02MB + Index: 0.08MB + Engine InnoDB jf5v9_itsec_logs: Data: 1.02MB + Index: 0.11MB + Engine InnoDB jf5v9_itsec_mutexes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB jf5v9_itsec_opaque_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB jf5v9_itsec_temp: Data: 0.02MB + Index: 0.06MB + Engine InnoDB jf5v9_itsec_user_groups: Data: 0.02MB + Index: 0.00MB + Engine InnoDB jf5v9_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB jf5v9_mailchimp_carts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB jf5v9_mailchimp_jobs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB jf5v9_mw_wc_qbo_sync_customer_pairs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB jf5v9_mw_wc_qbo_sync_log: Data: 0.09MB + Index: 0.00MB + Engine InnoDB jf5v9_mw_wc_qbo_sync_paymentmethod_map: Data: 0.02MB + Index: 0.00MB + Engine InnoDB jf5v9_mw_wc_qbo_sync_payment_id_map: Data: 0.02MB + Index: 0.00MB + Engine InnoDB jf5v9_mw_wc_qbo_sync_product_pairs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB jf5v9_mw_wc_qbo_sync_qbo_customers: Data: 0.09MB + Index: 0.00MB + Engine InnoDB jf5v9_mw_wc_qbo_sync_qbo_items: Data: 0.08MB + Index: 0.00MB + Engine InnoDB jf5v9_mw_wc_qbo_sync_real_time_sync_history: Data: 0.41MB + Index: 0.00MB + Engine InnoDB jf5v9_mw_wc_qbo_sync_real_time_sync_queue: Data: 0.02MB + Index: 0.00MB + Engine InnoDB jf5v9_mw_wc_qbo_sync_shipping_product_map: Data: 0.02MB + Index: 0.00MB + Engine InnoDB jf5v9_mw_wc_qbo_sync_tax_map: Data: 0.02MB + Index: 0.00MB + Engine InnoDB jf5v9_mw_wc_qbo_sync_variation_pairs: Data: 0.05MB + Index: 0.00MB + Engine InnoDB jf5v9_mw_wc_qbo_sync_wq_cf_map: Data: 0.02MB + Index: 0.00MB + Engine InnoDB jf5v9_options: Data: 14.36MB + Index: 1.23MB + Engine InnoDB jf5v9_postmeta: Data: 65.58MB + Index: 28.95MB + Engine InnoDB jf5v9_posts: Data: 10.44MB + Index: 1.23MB + Engine InnoDB jf5v9_rank_math_404_logs: Data: 0.02MB + Index: 0.02MB + Engine InnoDB jf5v9_rank_math_analytics_ga: Data: 1.50MB + Index: 1.50MB + Engine InnoDB jf5v9_rank_math_analytics_gsc: Data: 2.44MB + Index: 4.59MB + Engine InnoDB jf5v9_rank_math_analytics_inspections: Data: 1.52MB + Index: 0.11MB + Engine InnoDB jf5v9_rank_math_analytics_keyword_manager: Data: 0.02MB + Index: 0.00MB + Engine InnoDB jf5v9_rank_math_analytics_objects: Data: 0.09MB + Index: 0.05MB + Engine InnoDB jf5v9_rank_math_internal_links: Data: 0.19MB + Index: 0.05MB + Engine InnoDB jf5v9_rank_math_internal_meta: Data: 0.02MB + Index: 0.02MB + Engine InnoDB jf5v9_rank_math_redirections: Data: 0.13MB + Index: 0.02MB + Engine InnoDB jf5v9_rank_math_redirections_cache: Data: 0.08MB + Index: 0.02MB + Engine InnoDB jf5v9_rank_math_schema: Data: 0.02MB + Index: 0.02MB + Engine InnoDB jf5v9_rank_math_schema_cache: Data: 0.02MB + Index: 0.02MB + Engine InnoDB jf5v9_smush_dir_images: Data: 0.02MB + Index: 0.03MB + Engine InnoDB jf5v9_termmeta: Data: 0.13MB + Index: 0.11MB + Engine InnoDB jf5v9_terms: Data: 0.16MB + Index: 0.16MB + Engine InnoDB jf5v9_term_relationships: Data: 0.39MB + Index: 0.25MB + Engine InnoDB jf5v9_term_taxonomy: Data: 0.16MB + Index: 0.17MB + Engine InnoDB jf5v9_usermeta: Data: 5.48MB + Index: 1.95MB + Engine InnoDB jf5v9_users: Data: 0.06MB + Index: 0.05MB + Engine InnoDB jf5v9_vtwpr_purchase_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB jf5v9_vtwpr_purchase_log_product: Data: 0.02MB + Index: 0.02MB + Engine InnoDB jf5v9_vtwpr_purchase_log_product_rule: Data: 0.02MB + Index: 0.02MB + Engine InnoDB jf5v9_wc_admin_notes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB jf5v9_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB jf5v9_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB jf5v9_wc_customer_lookup: Data: 0.22MB + Index: 0.22MB + Engine InnoDB jf5v9_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB jf5v9_wc_gpf_render_cache: Data: 0.02MB + Index: 0.02MB + Engine InnoDB jf5v9_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB jf5v9_wc_order_product_lookup: Data: 0.45MB + Index: 0.48MB + Engine InnoDB jf5v9_wc_order_stats: Data: 0.33MB + Index: 0.28MB + Engine InnoDB jf5v9_wc_order_tax_lookup: Data: 0.14MB + Index: 0.16MB + Engine InnoDB jf5v9_wc_product_attributes_lookup: Data: 0.05MB + Index: 0.09MB + Engine InnoDB jf5v9_wc_product_meta_lookup: Data: 0.16MB + Index: 0.20MB + Engine InnoDB jf5v9_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB jf5v9_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB jf5v9_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB jf5v9_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB jf5v9_woocommerce_extra_flat_rates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB jf5v9_woocommerce_gpf_google_taxonomy: Data: 1.52MB + Index: 0.13MB + Engine InnoDB jf5v9_wpr_rucss_resources: Data: 0.02MB + Index: 0.06MB + Engine InnoDB jf5v9_wpr_rucss_used_css: Data: 0.02MB + Index: 0.06MB + Engine InnoDB jf5v9_yith_wapo_addons: Data: 0.02MB + Index: 0.00MB + Engine InnoDB jf5v9_yith_wapo_blocks: Data: 0.02MB + Index: 0.00MB + Engine InnoDB jf5v9_yith_wapo_groups: Data: 0.02MB + Index: 0.00MB + Engine InnoDB jf5v9_yith_wapo_types: Data: 0.02MB + Index: 0.00MB + Engine InnoDB jf5v9_yith_wccl_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB jf5v9_yith_ywpar_points_log: Data: 0.06MB + Index: 0.00MB + Engine InnoDB

Post Type Counts

attachment: 2057 bnfw_notification: 1 custom_css: 3 elementor_library: 18 envira: 1 et_pb_layout: 1 foogallery: 7 forminator_forms: 1 gp_elements: 15 itsec-dash-card: 7 itsec-dashboard: 1 mc4wp-form: 2 nav_menu_item: 34 oembed_cache: 8 page: 58 post: 16 postman_sent_mail: 250 product: 239 product_variation: 620 revision: 36 shop_coupon: 102 shop_order: 2888 shop_order_refund: 19 vtwpr-rule: 2 wp_global_styles: 1 ywar_reviews: 258 ywpar-earning-rule: 2

Security

Secure connection (HTTPS): βœ” Hide errors from visitors: βœ”

Active Plugins (46)

Query Monitor: by John Blackbourn – 3.8.2 Antispam Bee: by pluginkollektiv – 2.11.0 Disable Cart Fragments: by Optimocha – 2.0 Doofinder for WooCommerce: by doofinder – 1.5.20 Elementor Pro: by Elementor.com – 3.6.5 Elementor: by Elementor.com – 3.6.4 Facebook for WooCommerce: by Facebook – 2.6.12 Forminator Pro: by WPMU DEV – 1.15.12 Gift Up!: by Gift Up! – 2.17 GP Premium: by Tom Usborne – 2.1.2 If Menu - Visibility control for menu items: by Layered – 0.16.2 iThemes Security Pro: by iThemes – 7.1.1 Klarna Order Management for WooCommerce: by klarna krokedil – 1.6.10

Klarna Payments for WooCommerce: by krokedil klarna automattic – 2.9.0

Login Designer: by wpexpertsio – 1.2.5 Mailchimp for WooCommerce: by Mailchimp – 2.6.2 Members: by MemberPress – 3.1.7 Metorik Helper: by Metorik – 1.5.1 WooCommerce Sync for QuickBooks Online - by MyWorks Software: by MyWorks Software – 2.5.4 Post SMTP: by Post SMTP – 2.0.25 Recently Registered: by Mika Epstein – 3.4.4 Rank Math SEO PRO: by Rank Math – 3.0.10.1 Rank Math SEO: by Rank Math – 1.0.87 SVG Support: by Benbodhi – 2.4.2 Visibility Logic for Elementor: by StaxWP – 2.3.0 Aelia Foundation Classes for WooCommerce: by Aelia – 2.2.5.220330 Aelia Currency Switcher for WooCommerce: by Aelia – 4.13.3.220224 WooCommerce DYMO Print: by WP Fortune – 6.0.3 WooCommerce EU VAT Assistant: by Aelia – 2.0.29.220330 WooCommerce Stripe Gateway: by WooCommerce – 6.3.0 WooCommerce Google Analytics Integration: by WooCommerce – 1.5.8 WooCommerce Google Product Feed: by Ademti Software Ltd. – 10.6.0 WooCommerce Wholesale Lead Capture: by Rymera Web Co – 1.17 WooCommerce Wholesale Prices Premium: by Rymera Web Co – 1.27.8 WooCommerce Wholesale Prices: by Rymera Web Co – 2.0.2 WooCommerce: by Automattic – 6.4.0 WP Rocket: by WP Media – 3.11.0.4 Smush Pro: by WPMU DEV – 3.9.8 WP YouTube Lyte: by Frank Goossens (futtta) – 1.7.19 WPMU DEV Dashboard: by WPMU DEV – 4.11.12 Custom Product Tabs for WooCommerce: by YIKES Inc. – 1.7.7

YITH WooCommerce Advanced Reviews Premium: by YITH – 1.14.0 YITH WooCommerce Customize My Account Page: by YITH – 3.10.0 YITH WooCommerce Points and Rewards Premium: by YITH – 3.8.0 YITH WooCommerce Product Add-ons & Extra Options: by YITH – 2.8.0 YITH WooCommerce Product Bundles Premium: by YITH – 1.11.0

Inactive Plugins (2)

Extras for Elementor: by Namogo – 2.2.51 WP Fortune: by WP Fortune – 1.0.8

Dropin Plugins (1)

advanced-cache.php: advanced-cache.php

Must Use Plugins (1)

Kinsta Must-use Plugins: by Kinsta Team – 2.3.3

Settings

API Enabled: – Force SSL: βœ” Currency: GBP (Β£) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable)

Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5)

Connected to WooCommerce.com: βœ”

WC Pages

Shop base: #5523 - /shop/ Basket: #5 - /cart/ Checkout: #6 - /checkout/ My account: #7 - /account/ Terms and conditions: #207968 - /delivery-policy/

Theme

Name: Kathryn Callaghan Version: 3.9.1 Author URL: https://srhdesign.co.uk Child Theme: βœ” Parent Theme Name: GeneratePress Parent Theme Version: 3.1.3 Parent Theme Author URL: https://tomusborne.com WooCommerce Support: βœ”

Templates

Overrides: kathryncallaghan/woocommerce/emails/customer-processing-order.php /www/kathryncallaghanfineart_424/public/wp-content/plugins/yith-woocommerce-advanced-reviews-premium/templates/ywar-rating.php

WooCommerce Google Product Feed feeds

google: Google merchant centre product feed Β Β Type: google Β Β Category filter: - Β Β Categories: - googlereview: Google merchant centre product review feed Β Β Type: googlereview Β Β Category filter: - Β Β Categories: -

WooCommerce Google Product Feed options

Include variations in feed: Enabled Send "item group ID": - Expanded schema markup: - Debug key: ea76aec7-6861-4bcf-8368-19fb42e7021c

WooCommerce Google Product Feed fields

Title: Pre-populates from product product_title. Product description: Main product description (full preferred) plus variation description Availability (in stock products): Defaults to "in stock". Availability (backordered products): Defaults to "in stock". Availability (out of stock products): Defaults to "out of stock". Condition: Defaults to "new". Brand: Defaults to "Kathryn Callaghan". Manufacturer Part Number (MPN): Product Type: Defaults to "Home & Garden > Decor > Artwork > Posters Prints & Visual Artwork".

Google Product Category: Defaults to "Home & Garden > Decor > Artwork > Posters Prints & Visual Artwork".

Gender: Defaults to "unisex". Colour: Size: Multipack: Material: Product highlight(s):

WooCommerce Google Product Feed DB status

Database version: 15 Active database version: 15 wc_gpf_render_cache: Empty woocommerce_gpf_google_taxonomy (en-GB): 5595 items

Klarna Payments Request Log

2022-04-14 17:58:44: KP Create Session Response code: 401 Response message: {"headers":[],"body":"

401 Authorization Required</title></head>

401 Authorization Required</h1></center></body></html>","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID:

2022-04-14 17:57:52: KP Create Session Response code: 401 Response message: {"headers":[],"body":"

401 Authorization Required</title></head>

401 Authorization Required</h1></center></body></html>","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID:

2022-04-14 17:56:19: KP Create Session Response code: 401 Response message: {"headers":[],"body":"

401 Authorization Required</title></head>

401 Authorization Required</h1></center></body></html>","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID:

2022-04-14 17:56:12: KP Create Session Response code: 401 Response message: {"headers":[],"body":"

401 Authorization Required</title></head>

401 Authorization Required</h1></center></body></html>","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID:

2022-04-14 17:54:34: KP Create Session Response code: 401 Response message: {"headers":[],"body":"

401 Authorization Required</title></head>

401 Authorization Required</h1></center></body></html>","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID:

2022-04-14 17:54:27: KP Create Session Response code: 401 Response message: {"headers":[],"body":"

401 Authorization Required</title></head>

401 Authorization Required</h1></center></body></html>","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID:

2022-04-14 17:54:20: KP Create Session Response code: 401 Response message: {"headers":[],"body":"

401 Authorization Required</title></head>

401 Authorization Required</h1></center></body></html>","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID:

2022-04-14 17:53:58: KP Create Session Response code: 401 Response message: {"headers":[],"body":"

401 Authorization Required</title></head>

401 Authorization Required</h1></center></body></html>","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID:

2022-04-14 12:34:22: KP Create Session Response code: 401 Response message: {"headers":[],"body":"

401 Authorization Required</title></head>

401 Authorization Required</h1></center></body></html>","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID:

2022-04-14 12:34:20: KP Create Session Response code: 401 Response message: {"headers":[],"body":"

401 Authorization Required</title></head>

401 Authorization Required</h1></center></body></html>","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID:

2022-04-14 12:10:31: KP Create Session Response code: 401 Response message: {"headers":[],"body":"

401 Authorization Required</title></head>

401 Authorization Required</h1></center></body></html>","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID:

2022-04-14 12:10:28: KP Create Session Response code: 401 Response message: {"headers":[],"body":"

401 Authorization Required</title></head>

401 Authorization Required</h1></center></body></html>","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID:

Klarna Countries

Production Countries: GB Test Countries: GB

Action Scheduler

Canceled: 4 Oldest: 2022-03-29 14:37:28 +0100 Newest: 2022-04-13 16:41:25 +0100

Complete: 4,749 Oldest: 2022-03-19 09:35:10 +0000 Newest: 2022-04-15 16:16:09 +0100

Pending: 2 Oldest: 2022-04-16 10:30:19 +0100 Newest: 2022-04-16 12:51:32 +0100

Status report information

Generated at: 2022-04-15 16:22:12 +01:00 `

thelogicwizards avatar Apr 18 '22 23:04 thelogicwizards

Hello, I think this could also be related. I'm getting a Notice on line 202 of the same file:

[03-Jun-2022 20:22:14 UTC] PHP Notice: Trying to get property 'ID' of non-object in /home/www/webapps/public/wp-content/plugins/facebook-for-woocommerce/facebook-commerce-events-tracker.php on line 202

zeinnicholas avatar Jun 03 '22 20:06 zeinnicholas

Hi there,

I haven't been able to reproduce the issue. From what I can see, it's probable that another plugin might be modifying the global $wp_query variable. I suggest running a conflict check on a staging site, and if the issue still persists, please open a support ticket on woocommerce.com or the wordpress.org forums if you need further assistance.

rawdreeg avatar Jun 08 '22 15:06 rawdreeg

I believe the conflict is between Elementor and Facebook for WooCommerce, as all of the sites in these support requests are using them together:

https://wordpress.org/support/topic/warning-attempt-to-read-property-id-on-int/ https://wordpress.org/support/topic/warning-attempt-to-read-property-id-on-int-2/ https://wordpress.org/support/topic/warning-attempt-to-read-property-id/ ticket in 6037972-zen

The error is when viewing a product category, and printed once for each product on the page.

Warning: Attempt to read property "ID" on int in /home/redacted/public_html/wp-content/plugins/facebook-for-woocommerce/facebook-commerce-events-tracker.php on line 186

When using PHP 7, the errors were hidden in the logs as per the original report. It looks like when using PHP 8, the errors are printed on the page.

As the error seems to come from Facebook for WooCommerce, can we take another look into this, @message-dimke and @rawdreeg ?

darcie avatar Mar 17 '23 00:03 darcie

Thanks, Darcie, for helping reproduce this. This is due to Elementor Pro modifying the $wp_query global. I have submitted a patch: https://github.com/woocommerce/facebook-for-woocommerce/pull/2501

rawdreeg avatar Mar 17 '23 13:03 rawdreeg