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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

penyaskito created an issue. See original summary.

penyaskito’s picture

Surprisingly this is in drupal core, I cannot move the issue tho.

Berdir’s picture

Project: Pathauto » Drupal core
Version: 8.x-1.x-dev » 9.1.x-dev
Component: Code » base system

You 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 :)

penyaskito’s picture

Version: 9.1.x-dev » 8.9.x-dev
Status: Active » Needs review
FileSize
1.47 KB

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

organicwire’s picture

The 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.

Berdir’s picture

Version: 9.1.x-dev » 8.9.x-dev
Status: Needs review » Reviewed & tested by the community

Note 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.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work

Thanks for the patch @penyaskito. 1 v small nit.

+++ b/core/modules/system/system.install
@@ -1098,14 +1098,16 @@ function system_requirements($phase) {
+      if ($info['version']) {
+        if (version_compare($info['version'], '8.x-1.5') <= 0) {
+          $requirements['pathauto_module_incompatibility'] = [
+            'title' => t('Pathauto'),
+            'description' => t('The Pathauto module is not compatible with the current version of Drupal core. Update the <a href=":url">Pathauto</a> module to 8.x-1.6 or later.', [
+              ':url' => 'https://drupal.org/project/pathauto',
+            ]),
+            'severity' => REQUIREMENT_ERROR,
+          ];
+        }

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.

penyaskito’s picture

Status: Needs work » Needs review
FileSize
897 bytes

Attached patch with the one-liner.

Berdir’s picture

Status: Needs review » Reviewed & tested by the community

That is indeed nicer.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Discussed 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!

  • alexpott committed 7b198e4 on 8.9.x
    Issue #3117396 by penyaskito, Berdir: Pathauto requirements confusing...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.