justbetter / magento2-sentry

Magento 2 module to log to Sentry
MIT License
165 stars 70 forks source link

Bug: wrong product link if groups[seo][fields][product_use_categories][value] = 0 #88

Closed in-session closed 2 years ago

in-session commented 2 years ago

Today we tested the module under Magento 2.4.4 with PHP 7.4, we noticed that if "Use Categories Path for Product URLs" is disabled + multistore the product links within the categories are not correct in the frontend.

Output without PHP tracking: domain.com/en/category/subcategory domain.com/en/product-item-url

Output with PHP tracking: domain.com/en/category/product-item-url

indykoning commented 2 years ago

The Magento 2 Sentry integration doesn't actually listen nor has to listen to any of these Magento settings. The url that is sent to Sentry with the Exception is actually handled by the sentry php package itself https://github.com/getsentry/sentry-php/blob/87f620b455db96c73987cb1008040f0d2cfb9e17/src/Integration/RequestIntegration.php#L130

It takes it straight from the current request. The fact that that url did end up in Sentry might suggest that either that setting is still set to yes somewhere at a deeper level, that this might be an old exception before that setting was changed, or that this url is actually stil available in Magento and is being visited.

I'm afraid we can't change anything in the Sentry integration for this