Problem/Motivation
The titleQuery() function in web/core/modules/node/src/Plugin/views/argument/Vid.php returns titles for all revisions of all nodes. On a large site with lots of nodes and revisions, this produces a slow query. It also means that the views argument title substitution is wrong.
Proposed resolution
Including a patch to limit Vid->titleQuery() to the provided vid - this mirrors the code in Drupal 7.
This was broken in #2628130: SQL error on revision export from view
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | 3259671-10.x-13.patch | 6.72 KB | alexpott |
| #13 | 3259671-9.x-13.patch | 6.72 KB | alexpott |
| #13 | 3259671-9.x-13.test-only.patch | 6.23 KB | alexpott |
| #11 | 3259671-11.patch | 6.72 KB | alexpott |
| #11 | 3259671-11.test-only.patch | 6.23 KB | alexpott |
Issue fork drupal-3259671
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
_kash_ commentedComment #3
cilefen commentedComment #4
_kash_ commentedComment #7
jrglasgow commentedThis is working for me
Comment #8
krzysztof domańskiComment #9
ramarajuk commentedThis patch works for us.
Comment #11
alexpott@jrglasgow it seems your MR is exactly the same as @_KASH_'s patch. So removing credit.
Here's a test - this is not just a performance fix it is also a bug fix. Note that Views in Drupal 7 already does:
So it already has the fix or perhaps we broke this when converting to a plugin.
Comment #12
alexpottLink to the views Drupal 7 code... https://git.drupalcode.org/project/views/-/blame/7.x-3.x/modules/node/vi...
Comment #13
alexpottWe need different patches on 10.x and 9.x here they all are...
Comment #15
lendudeYeah, we broke this in the issue @_KASH_ linked: #2628130: SQL error on revision export from view
Looks like a good fix and test to me.
Comment #22
catchCommitted/pushed to 10.1.x, cherry-picked to 10.0.x, then the same for 9.5.x and 9.4.x, thanks!