Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When attempting to run a Bulk Generate to content for some changes to patterns, I am encountering an AJAX error page:
An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /batch?id=18289&op=do_nojs&op=do
StatusText: parsererror
ResponseText:
( ! ) Warning: max(): Array must contain at least one element in /home/vagrant/Code/seic/modules/contrib/pathauto/src/Plugin/pathauto/AliasType/EntityAliasTypeBase.php on line 185
Call Stack
...
The line of code is $context['sandbox']['current'] = max($ids);
. Changing it to $context['sandbox']['current'] = !empty($ids) ? max($ids) : 0;
should help.
Comment | File | Size | Author |
---|---|---|---|
#2 | pathauto-2932432-2.patch | 770 bytes | dbgilbert |
|
Comments
Comment #2
dbgilbert CreditAttribution: dbgilbert at SEI Global Services Inc. commentedupdated org
Comment #3
BerdirComment #4
DrColossos CreditAttribution: DrColossos at CYLEDGE commentedHad the same issue, the patch fixed it without problems and applied cleanly
Comment #5
BerdirFeels like this fixes the visible error and not a possible underlying problem, but if it helps, committed.