Unable to display list of children in views

Created on 17 July 2017, over 7 years ago
Updated 13 July 2023, over 1 year ago

Hi,

Thank you for creating this module. But it looks like I have some problem using it.

My content structure is:

  • content type Tutorial (machine name: how_to),
  • entity hierarchy field called Series (machine name: field_series)

My content node is:

  • node 14
    • node 20
      • node 3
    • node 7

I have created views with configuration:
- Sort criteria: Entity hierarchy: Content - Series: Hierarchy order (asc)
- Contextual filters: Entity hierarchy: Content - Series: Hierarchy: Is child of. Provide default value: Content ID from URL.

Expected result:
When I put value 14 on field Preview with contextual filters, I see all children of node 14 displayed.

Actual result:
Currently it display nothing.

When I check the sql query:

SELECT nested_set_field_series_node.left_pos AS nested_set_field_series_node_left_pos, node_field_data.nid AS nid
FROM 
{node_field_data} node_field_data
LEFT JOIN {nested_set_field_series_node} nested_set_field_series_node ON node_field_data.vid = nested_set_field_series_node.revision_id
WHERE ((nested_set_field_series_node.left_pos BETWEEN '1' and '2' AND nested_set_field_series_node.left_pos <> '1')) AND ((node_field_data.status = '1') AND (node_field_data.type IN ('how_to')))
ORDER BY nested_set_field_series_node_left_pos ASC
LIMIT 11 OFFSET 0

Question:
Is my views confguration correct or am I missing something?

Feature request
Status

Needs work

Version

2.0

Component

Code (module)

Created by

🇮🇩Indonesia permanaj Bali

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Patch #11 fixed a critical breaking issue for us. This should be merged as is.

  • question regarding the 3 patches (7, 9, and 11) noted above

    1. patches 7 and 9 change the same file, do both need to be done or done in a particular order?
    2. patch 11 is for the file named "entity_hierarchy.install", but i don't have that file! i'm using the latest 3.3.6 version
Production build 0.71.5 2024