Issue with recursion in related fields

Created on 8 March 2024, 4 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

Closed: cannot reproduce

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

Comments & Activities

Production build 0.69.0 2024