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.
Problem/Motivation
The Pathauto module is not compatible with the current version of Drupal core. Update the Pathauto module to 8.x-1.6 or later.
is shown when running drush updb --yes
if using dev.
Proposed resolution
Ignore if the info version if not set. You should know what you are doing if running -dev.
Remaining tasks
Patch
User interface changes
Confusing message removed.
API changes
None
Data model changes
None
Release notes snippet
None
Comment | File | Size | Author |
---|---|---|---|
#9 | 3117396-pathauto-requirements-9.patch | 897 bytes | penyaskito |
#4 | 3117397-core-pathauto-requirements-2.patch | 1.47 KB | penyaskito |
Comments
Comment #2
penyaskitoSurprisingly this is in drupal core, I cannot move the issue tho.
Comment #3
BerdirYou should be able to move it, works for me?
But yes, it is in core, wouldn't help if it were in pathauto as the old version wouldn't have the check, which is the whole point here :)
Comment #4
penyaskitoComment #6
organicwire CreditAttribution: organicwire at Zebralog commentedThe patch works for me very well.
It adds only check for
if ($info['version']) {...}
, which makes sense as Drupal does not have any version info about modules when using composer. I am not aware of any side effects this patch might have.Comment #7
BerdirNote that #3123326: Remove pathauto version check from 9.0, no incompatible version is Drupal 9 compatible already removed this check for D9.
Not sure if we still want to bother with this in 8.9, but I suppose it doesn't hurt.
Comment #8
alexpottThanks for the patch @penyaskito. 1 v small nit.
No need for the extra nesting...
if ($info['version] && version_compare($info['version'], '8.x-1.5') <= 0) {
Which makes this a 1- liner and easier to review too.
I somewhere there is an issue to use composer to get the installed version if not set which would also help in this instance. But out-of-scope here.
Comment #9
penyaskitoAttached patch with the one-liner.
Comment #10
BerdirThat is indeed nicer.
Comment #11
alexpottDiscussed with @catch - we agreed this is good for 8.9.x since it could prevent you from updating in the event of a security release.
Committed 7b198e4 and pushed to 8.9.x. Thanks!