benjaminkott / benjaminkott/bootstrap_package

Prevent rendering nested content elements created by `content_blocks` extension

Open
#1,554 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
PHP
Stars
355
Forks
212
Avg merge
1h 4m
Merged PRs (30d)
31

Description

# Bug Report

## Prerequisites

* [ ] Can you reproduce the problem on TYPO3 v11.5 LTS
* [x] Can you reproduce the problem on TYPO3 v12.4 LTS
* [x] Did you [perform a cursory search](https://github.com/issues?q=is%3Aissue+user%3Abenjaminkott+repo%3Abenjaminkott%2Fbootstrap_package)
to see if your bug or enhancement is already reported?

## Description

When creating nested content element with content blocks the content rendered twice on same page.
The `lib.dynamicContent ` schould be modified to prevent such case.

Possible solution:

```typoscript
# Prevent rendering nested content elements created by `content_blocks` extension
[extension.isLoaded('content_blocks') == 1]
lib.dynamicContent.20.select.where {
postUserFunc = TYPO3\CMS\ContentBlocks\UserFunction\ContentWhere->extend
}
[end]
```

I can provide a PR if needed.

## Steps to Reproduce

1. Create a simple nested content element with content blocks:

```yaml
name: example/tabs
fields:
- identifier: header
useExistingField: true
- identifier: tabs_item
type: Collection
minitems: 1
foreign_table: tt_content
```

```html




{item.content}

```

### Expected behavior
Content should be only rendered once.

### Actual behavior

Content rendered twice.

### Screenshots

![Image](https://github.com/user-attachments/assets/1082e54f-5e7e-4b48-8244-69812127c35a)

## Versions

TYPO3 v12.4.27
Content Blocks v0.7.19
PHP v8.2

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the lib.dynamicContent TypoScript configuration and reproduce the nested content-block case described in the issue with TYPO3 v12.4. Check how the Content Blocks extension contributes nested tt_content records to the selection. Done means the nested content is rendered only once without affecting ordinary dynamic content rendering.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, content
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.