- Issue created by @bobburns
- πΊπΈUnited States bobburns
I changed line 163
from if (!$domain_path_data['pathauto']) {
to if (is_array(!$domain_path_data) ? $domain_path_data['pathauto'] : NULL) {
the error has not shown again when saving products
needs review
- Status changed to Needs review
about 2 years ago 12:06am 22 June 2023 - Status changed to Needs work
about 2 years ago 1:11pm 23 June 2023 - πΊπΈUnited States mradcliffe USA
Thank you for investigating this issue @bobburns.
Generally the "Needs review" status is meant for when a Merge Request β or a Patch is available to review rather than inline code. I'm going to move this back to "Needs work" status for now. I also set the Version to 8.x-1.x-dev.
I added an issue summary.
- Status changed to Closed: duplicate
about 2 years ago 1:13pm 23 June 2023 - πΊπΈUnited States mradcliffe USA
This may be related to and fixed by the patch in π Warning: Undefined array key "pathauto" in Drupal\domain_path_pathauto\DomainPathautoHelper Needs review .
On second thought, going to close this as a duplicate.
- πΊπΈUnited States bobburns
I would not call it a duplicate. The isset fix did not work for me. So I posted https://www.drupal.org/project/domain_path/issues/3315752#comment-15121818 π Warning: Undefined array key "pathauto" in Drupal\domain_path_pathauto\DomainPathautoHelper Needs review
Version 1.3 takes down my site
- Status changed to Needs review
about 2 years ago 9:24am 15 August 2023 - π³π±Netherlands idebr
This issue is not fixed by the patch in the related issue.
Attached patch adds a sanity check to DomainPathautoHelper->validateAlteredForm() to make sure the code is actually checking domain_path_data
- First commit to issue fork.
- @brian-c opened merge request.
- π¬π§United Kingdom colinstillwell
Just a note that 3358583-7.patch uses the same logic already committed in issue https://www.drupal.org/project/domain_path/issues/3315752 π Warning: Undefined array key "pathauto" in Drupal\domain_path_pathauto\DomainPathautoHelper Needs review (see commit https://git.drupalcode.org/project/domain_path/-/commit/a877fa3150e0593a...).
Looking at the latest merge request for this issue (https://git.drupalcode.org/project/domain_path/-/merge_requests/20), the only difference is that it uses is_array() instead of just isset().
If $domain_path_data is guaranteed to be an array, then is_array() is unnecessary. But including it is a safe, defensive check. Whether to include it depends on how defensively we want to code here. It may also be worth reviewing other uses of $domain_path_data if this is still a concern.