ACSD-47444: You experience the following error: _Trying to access array offset on value of type bool_…
You experience the following error: _Trying to access array offset on value of type bool_ when accessing certain non-existing category paths for known products, on PHP 7.4. Quality patch ACSD-47444 for magento/module-catalog-url-rewrite applies to Magento Open Source and Adobe Commerce 2.4.0 to 2.4.2-p2.
- Categories
- Catalog/Product
- Components
- magento/module-catalog-url-rewrite
- Origin
- adobe-commerce-support
- Since QPT
- 1.1.22
Issue
You experience the following error: _Trying to access array offset on value of type bool_ when accessing certain non-existing category paths for known products, on PHP 7.4.
Steps to reproduce
1. Create a new product - with the name "test". 1. Go to Stores > Settings > Configuration > CATALOG > Catalog > Search Engine Optimization > set Generate "category/product" URL Rewrites = _No_. 1. Go to the storefront and visit the URL like ../abc/test.html ("abc" - should not exist).
Adobe's page lists 2.4.0 - 2.4.2-p2 as compatible; the versions below are resolved from the current QPT constraints and are the ones the tool will offer.
Install
Install the Quality Patches Tool with composer require magento/quality-patches, apply the prerequisites listed for all files applicable to your distribution and version first, then run vendor/bin/magento-patches apply ACSD-47444. On Cloud, add ACSD-47444 under stage.build.QUALITY_PATCHES in .magento.env.yaml.
For cweagans/composer-patches, choose a compatible version below and download the bundle. Copy its ACSD-47444/ folder into patches/composer/, merge composer.patches.json into composer.json, then run composer install. Bundle prerequisites the same way and list them first. Paths are relative to each package root, using the default -p1 level. Prefer local files when configuring composer-patches; a remote URL can change.
Patch files and compatible versions
magento/magento2-base >=2.4.0 <2.4.3
- Patch file
- patches/os/ACSD-47444_2.4.2-p1.patch
- vendor/magento/module-catalog-url-rewrite/Model/Storage/DynamicStorage.php
