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
Function generateResultsKey under Core/modules/views/src/Plugin/views/cache/CachePluginBase.php is not compatible with SelectExtender object.
instanceof Select is used instead of instanceof SelectInterface
Steps to reproduce
- Create one custom Extender which extends SelectExtender
- Use that newly created extender via hook_views_pre_execute
- Enable tag based caching in view which is using that newly created Extender
- generateResultsKey function is expecting Select object which is actually now the new extender object which extends SelectExtender
Proposed resolution
"instanceof Select" should be replaced with "instanceof SelectInterface"
Comment | File | Size | Author |
---|---|---|---|
#16 | select_interface_3299800-16.patch | 1 KB | Munavijayalakshmi |
#14 | select_interface_3299800-14.patch | 1.08 KB | shubhamporwal14@gmail.com |
Issue fork drupal-3299800
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
shubhamporwal14@gmail.com CreditAttribution: shubhamporwal14@gmail.com as a volunteer and at Infosys commentedComment #3
shubhamporwal14@gmail.com CreditAttribution: shubhamporwal14@gmail.com as a volunteer and at Infosys commentedComment #6
immaculatexavier CreditAttribution: immaculatexavier as a volunteer and at Srijan | A Material+ Company for Drupal India Association commentedCommitted and completed MR in accordance with the proposed resolution
Comment #7
LendudeSounds fair.
MR review: Should in not also update the use statement to use the Interface?
Comment #9
Munavijayalakshmi CreditAttribution: Munavijayalakshmi at Valuebound for Valuebound commentedComment #10
Munavijayalakshmi CreditAttribution: Munavijayalakshmi at Valuebound for Valuebound commentedComment #11
shubhamporwal14@gmail.com CreditAttribution: shubhamporwal14@gmail.com as a volunteer and at Infosys commentedCommitted MR in as per the review comments. Adding patch also if need to be applied before it gets added to next release.
Comment #12
shubhamporwal14@gmail.com CreditAttribution: shubhamporwal14@gmail.com as a volunteer and at Infosys commentedComment #13
shubhamporwal14@gmail.com CreditAttribution: shubhamporwal14@gmail.com as a volunteer and at Infosys commentedReapplying patch with trailing whitespace
Comment #14
shubhamporwal14@gmail.com CreditAttribution: shubhamporwal14@gmail.com as a volunteer and at Infosys commentedPatch re-roll - Update patch name for better reach to issue
Comment #15
Munavijayalakshmi CreditAttribution: Munavijayalakshmi at Valuebound for Valuebound commentedComment #16
Munavijayalakshmi CreditAttribution: Munavijayalakshmi at Valuebound for Valuebound commentedRe-rolled #14 patch.
Comment #17
Munavijayalakshmi CreditAttribution: Munavijayalakshmi at Valuebound for Valuebound commentedtest passed.
Comment #18
smustgrave CreditAttribution: smustgrave at Mobomo commentedThis may require it's own test but will let the committer decide that.
Looks like an enhancement more then anything. Comfortable marking RTBC
Comment #19
alexpottDiscussed with @catch and we agreed that a test here is unnecessary.
Committed and pushed c0d2542d45 to 10.1.x and 4060207549 to 10.0.x and 2e883f7a83 to 9.5.x. Thanks!