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
#2165989: Add a Views field handler for multiple entity operations contained a bug where the 'destination' query parameter is not set correctly.
Proposed resolution
In EntityOperations, modify $operation['query']
rather than $operation['options']['query']
.
Remaining tasks
Patch EntityOperations
Make sure it is tested
User interface changes
None
API changes
None
Comment | File | Size | Author |
---|---|---|---|
#14 | operations-destination-2419905-14.interdiff.txt | 878 bytes | Arla |
#14 | operations-destination-2419905-14.patch | 7.56 KB | Arla |
#11 | operations-destination-2419905-11.patch | 7.8 KB | Arla |
#7 | operations-destination-2419905-7.interdiff.txt | 1.55 KB | Arla |
#7 | operations-destination-2419905-7.patch | 8.13 KB | Arla |
Comments
Comment #1
ArlaThe tests missed this bug because they are using the Node entity type, which adds the destination parameter anyway in the list builder. This patch modifies one of the tests to check for the destination parameter, using another entity type that does not set the parameter by itself.
Comment #5
ArlaOops, bad tests.
Comment #7
ArlaEr.. not sure why I thought
$entity->url('collection')
would be appropriate to use there.Comment #8
andypostlooks good, +1 rtbc
Comment #9
jibran@Arla thanks for the bug report and patch
Comment #11
ArlaRerolled.
Comment #12
jibranBack to RTBC.
Comment #13
alexpottWhy are we removing the sorts? This kind of thing can break running the test on postgres.
Comment #14
ArlaI think there was no reason other than clean code. I know nothing about Postgres, but if you say so :)
Comment #15
dawehnerAlso the filter removal kinda looks out of scope, but I agree, its not needed to be as part of the test.
Comment #16
alexpottre the filter removal - I'm not a huge fan of unrelated changes in patches but given I've knocked this back once I'm not inclined to again since it is test code and the tests pass.
This issue is a normal bug fix, and doesn't include any disruptive changes, so it is allowed per https://www.drupal.org/core/beta-changes. Committed c2f9434 and pushed to 8.0.x. Thanks!
Comment #18
ArlaThank you! Point taken about unrelated changes, sorry for the inconvenience.