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.
make sure it use the right target, simple fix, see patch :)
Comment | File | Size | Author |
---|---|---|---|
forum_alias.patch | 514 bytes | droplet | |
Comments
Comment #1
larowlanLooks good
Comment #2
catchIs there a reproducible bug from this query that could be tested?
Comment #3
droplet CreditAttribution: droplet commentedexist query doesn't bring a bug but may have problem after query rewrite or other alters. can't be tested I thought
Comment #4
catchTests were added for the same general issue in #766382: Column 'nid' is ambiguous when using node access modules, so it should be possible to re-use that work here.
Comment #5
droplet CreditAttribution: droplet commentedumm #766382: Column 'nid' is ambiguous when using node access modules is a bug in exist Drupal Core.
This one made it better for contribute modules, may need some self custom query & alter the form/displays to test it, do it allowed/needed?
Comment #6
catchThe node_access_test module ought to be enough to trigger the bug I think. If it's not, then I'm fine with committing this without a test, but please try it first in case it does.
Comment #7
droplet CreditAttribution: droplet commentedI have no idea.
#766382 join a node_access table which contains NID. NID is ambiguous at that case. but here we need to join a table with status cloumn.
#766382 query looks like:
SELECT n.nid, status FROM node n INNER JOIN node_access c ON n.nid = c.nid
this issue needs a query looks like this (comment table has status column):
SELECT n.nid, status FROM node n INNER JOIN comment c ON n.nid = c.nid
Comment #15
thursday_bw CreditAttribution: thursday_bw as a volunteer commentedI dare say that with the function that this patch affects now deprecated and replaced, this issue is fixed for D8.
Changelog: https://www.drupal.org/node/2079767
I haven't checked but it probably still requires a backport to D7, so leaving open and changing the version.
Also tagging as bugsmash initiative because that's what brought me here.
Comment #16
Kristen PolTriaging for Bug Smash Initiative.
This was already fixed in #1431452: Tests for 'status' in where clause is ambiguous so closing this.