- π³π±Netherlands ekes
It's making the assumption earlier too. Updated check for that line as well.
- Status changed to Needs review
over 1 year ago 8:40pm 3 May 2023 - πΊπΈUnited States mradcliffe USA
I set π Warning: Trying to access array offset on value of type int in Drupal\domain_path_pathauto\DomainPathautoHelper->validateAlteredForm() Needs review as a duplicate because I think the current patch may address that as well.
- πΊπΈUnited States bobburns
Version 1.3 takes down the site
I authored the change in https://www.drupal.org/project/domain_path/issues/3358583 π Warning: Trying to access array offset on value of type int in Drupal\domain_path_pathauto\DomainPathautoHelper->validateAlteredForm() Needs review and I had previously tried the isset fix on line 163, which did not work. I admit I did not do the DomainPathHelper.php fix of patch 3 here.
I had used
if (!isset($domain_path_data['pathauto']) && !$domain_path_data['pathauto']) {
which did not work
So . . .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
Now version 1.3 throws this instead
The website encountered an unexpected error. Please try again later.
ParseError: syntax error, unexpected token "public" in Composer\Autoload\{closure}() (line 209 of modules/domain_path/modules/domain_path_pathauto/src/DomainPathautoHelper.php).WHICH TAKES DOWN THE SITE
so, I went back to version 1.2 and marked it as 1.3 which does not throw this error to keep calm and carry on
- πΊπ¦Ukraine _tarik_ Lutsk
Hi, bobburns
I checked the problem that you described in the issue π Warning: Trying to access array offset on value of type int in Drupal\domain_path_pathauto\DomainPathautoHelper->validateAlteredForm() Needs review . And it looks like this patch should fix it.
Could you provide more details about how you tried to apply the patch?The website encountered an unexpected error. Please try again later.
ParseError: syntax error, unexpected token "public" in Composer\Autoload\{closure}() (line 209 of modules/domain_path/modules/domain_path_pathauto/src/DomainPathautoHelper.php).I almost sure that you got this error because erased a curly bracket somewhere in the file.
- π³π±Netherlands Lendude Amsterdam
As far as I can tell the modification to the check here in DomainPathautoHelper is wrong and the check from π Warning: Trying to access array offset on value of type int in Drupal\domain_path_pathauto\DomainPathautoHelper->validateAlteredForm() Needs review is correct, we only want to run validation if $domain_path_data['pathauto'] is set (so pathauto is enabled for this content type) but is not true, which is what the comment point to when we should be validating.
The other modification here look good.
- πΊπΈUnited States BBC Madison, WI
Patch from #9 seems to be working well. Thanks!
- First commit to issue fork.
- First commit to issue fork.
- πΊπ¦Ukraine quadrexdev Lutsk
Thanks everyone for putting some effort here. I have created a merge request with changes from the attached patches.
We have some failing jobs and appropriate issues to resolve:
1. Drupal 11 compatibility (PHPUnit) - https://www.drupal.org/project/domain_path/issues/3429923 π Automated Drupal 11 compatibility fixes for domain_path Needs review
2. Validation jobs (PHPUnit, phpcs, eslint) - https://www.drupal.org/project/domain_path/issues/3409106 π Resolve phpcs failing test ActiveThose two should be resolved first