Issue with recursion in related fields

Created on 8 March 2024, 10 months ago

Problem/Motivation

In some cases, we can get a recursion. For example, we have 2 pagebuilder entities, which have pagebuilder fields with related content. In related content, we have references to each other. For example:

node/1->node/2 and node/2->node/1.

We have a set of fields e.g. from node(64). Most of them are handled by apachesolr_entityreference_content_indexing_callback, except field field_page_builder(node). It is handled by apachesolr_paragraphs_add_paragraph_fields, which calls all fields(32) from Paragraph. In this set of fields, we have field_related_content that is handled by apachesolr_entityreference_content_indexing_callback again. As a result, we have some kind of recursion.

Steps to reproduce

Create 2 entities, that have reference to each other in related fields. For example node/1->node/2 and node/2->node/1 More details above.

Proposed resolution

I would suggest to handle it by adding a static variable.

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇧🇾Belarus Andrei Haurukovich Minsk

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024