The 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.
Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.
Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.
Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)
Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)
Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)
Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)
Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.
I 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.
Comments
Comment #1
larowlanLooks good
Comment #2
catchIs there a reproducible bug from this query that could be tested?
Comment #3
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 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 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.nidthis 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.nidComment #15
thursday_bw 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.