Problem/Motivation

The automated tests in the 8.x-1.x branch are failing since 26 Aug 2017, see https://www.drupal.org/pift-ci-job/892585

Proposed resolution

Fix the automated tests

Remaining tasks

  1. Write a patch
  2. Review
  3. Commit

User interface changes

None.

API changes

None.

Data model changes

None.

Comments

idebr created an issue. See original summary.

idebr’s picture

Status: Active » Needs review
StatusFileSize
new2.7 KB

Attached patch updates the expected urls after #2767857: Add destination to edit, delete, enable, disable links in entity list builders was committed in Drupal core. I have not yet completed debugging on the failures in PathautoEntityWithStringIdTest

Status: Needs review » Needs work

The last submitted patch, 2: pathauto-fix_test_failures-2945734-2.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

berdir’s picture

Status: Needs work » Needs review
StatusFileSize
new7.67 KB

Yeah, those tests were interesting to fix. This might also fix a bunch of other issues that people were reporting since 8.4, did quite a bit of cleanup and shuffling things around.

Also made sure the destination tests work with different base paths.

Status: Needs review » Needs work

The last submitted patch, 4: pathauto-84-updates-2945734-4.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

idebr’s picture

Changes look great!

Regarding the test failures when testing against 8.4.x: The webform module had a similar problem where the destination query parameter is available in 8.5.x but not in 8.4.x. This was fixed by manually adding the destination parameter in the EntityListBuilder, so the assertion is correct against both 8.4.x and 8.5.x. Would you consider this a viable approach?

Related issue in Webform: #2904683: [Drupal 8.5.x+] EntityListBuilder now adds destination query argument to edit, delete, enable/disable operations / http://cgit.drupalcode.org/webform/commit/?id=3a9c4113cef8bc9efb874224b2...

berdir’s picture

8.5 will come out very soon, my plan was to simply set testing to 8.5 already once I commit this. The whole point of doing that change by default was that we do *not* need to do it for every single list builder :)

Berdir credited rbayliss.

berdir’s picture

Status: Needs work » Needs review
StatusFileSize
new8.55 KB

Adding the additional test coverage from #2946273: Alias is not generated when Pathauto widget is hidden, with credits.

  • Berdir committed 9206016 on 8.x-1.x
    Issue #2945734 by Berdir, idebr, rbayliss: Fix automated test failures...
berdir’s picture

Status: Needs review » Fixed

Committed.

littlethoughts’s picture

It seems that the workaround regarding https://www.drupal.org/project/drupal/issues/2946289 breaks compatibility with 8.3.

On saving an entity:

Error: Call to undefined method Drupal\pathauto\PathautoFieldItemList::ensureComputedValue() in Drupal\pathauto\PathautoFieldItemList->delegateMethod() (line 15 of modules/contrib/pathauto/src/PathautoFieldItemList.php).
Drupal\pathauto\PathautoFieldItemList->delegateMethod('preSave') (Line: 202)
Drupal\Core\Field\FieldItemList->preSave() (Line: 479)
Drupal\Core\Entity\ContentEntityStorageBase->invokeFieldMethod('preSave', Object) (Line: 429)
Drupal\Core\Entity\ContentEntityStorageBase->invokeHook('presave', Object) (Line: 435)
Drupal\Core\Entity\EntityStorageBase->doPreSave(Object) (Line: 298)
Drupal\Core\Entity\ContentEntityStorageBase->doPreSave(Object) (Line: 389)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 364)
Drupal\Core\Entity\Entity->save() (Line: 283)
Drupal\Core\Entity\EntityForm->save(Array, Object) (Line: 498)
berdir’s picture

Yes it does. 8.3 is not supported by pathauto 1.1, I forgot to add a dependency, there is an existing issue about that.

Drupal 8.3 is no longer supported, you are using an outdated and insecure version.

Status: Fixed » Closed (fixed)

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