- π©πͺGermany geek-merlin Freiburg, Germany
Is this stalled? It blocks the other issue.
- last update
over 2 years ago 30,377 pass, 2 fail - π©πͺGermany geek-merlin Freiburg, Germany
Unblocking this as the other issue is stalled, and imho no blocker for working on this.
> and I don't actually understand what this example syntax would query for:
> tid.referenced_by:tags:node.nid"Referenced by field tags of a node" ;-)
- π¬π§United Kingdom joachim
Made an issue fork, and committed the patches to it, then rebased on 11.x.
Checked that the diff to 11.x is the same as patch file 3278083-51.patch.
- Status changed to Needs review
about 1 year ago 2:59pm 2 July 2024 - π¬π§United Kingdom joachim
Made a number of tweaks -- mostly docs & formatting fixes.
Uncommented the deprecation.
Also, addressed this
> I'm a bit spooked by this class property which gets overwritten each time a new field is added to the query.
by removing the $this->joinType and using a passed parameter instead.
- π¬π§United Kingdom joachim
I'm still iffy about the EntityQueryRelationshipMultiplePropertyBaseFieldTest test class being empty, but I don't think there's a better way to do it.
I tried a PHPUnit data provider with the code from createField() in a callable... but PHPUnit didn't like that at all!!! :D
- Status changed to Needs work
about 1 year ago 2:25pm 5 July 2024 - πΊπΈUnited States smustgrave
Can the issue summary be updated to include the fix includes needing createField()
Also appears to have a repeating failing kernel test.
Left some comments on the MR.
- π§πͺBelgium kristiaanvandeneynde Antwerp, Belgium
Just ran into this bug myself using the entity_reference_revisions module.
If you have a base field called "category" and use a field type of "entity_reference", then the shared table will only contain one column called "category" and any entity query with a condition of "category.entity.name" will work because of the current code in Tables using the chunks as a guide to the column name.
If you use an entity_reference_revisions field, your shared table will have two columns:
category__target_id
andcategory__target_revision_id
. Now the code described above will try to find a field named "category" because it's parts of the chunks and fail.However, any entity query that simply queries for "category" will work, because Tables has separate code for that:
// If there are more specifiers, get the right sql column name if the // next one is a column of this field. if ($key < $count) { // THIS BROKEN CODE DOES NOT RUN IF ONLY ONE CHUNK } // If there are no additional specifiers but the field has a main // property, use that to look up the column name. elseif ($field_storage && $column) { // THIS CODE WILL CORRECTLY FETCH THE RIGHT COLUMN NAME $columns = $field_storage->getColumns(); if (isset($columns[$column])) { $sql_column = $table_mapping->getFieldColumnName($field_storage, $column); } }
The ERR module's queue has a few issues complaining about this bug, but none of them seem to correctly point to this core issue.