Prevent rendering nested content elements created by `content_blocks` extension
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
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.
Description
Bug Report
Prerequisites
- Can you reproduce the problem on TYPO3 v11.5 LTS
- Can you reproduce the problem on TYPO3 v12.4 LTS
- Did you perform a cursory search
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:
# 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
- Create a simple nested content element with content blocks:
name: example/tabs
fields:
- identifier: header
useExistingField: true
- identifier: tabs_item
type: Collection
minitems: 1
foreign_table: tt_content
<f:for each="{data._grids.tabs_item}" as="item" iteration="i">
<f:comment><!-- {item.data} contains the Content Block data object. --></f:comment>
<div class="tab-item" data-uid="{item.data.uid}">
<f:comment><!-- {item.content} contains the rendered html. --></f:comment>
<f:format.raw>{item.content}</f:format.raw>
</div>
</f:for>
Expected behavior
Content should be only rendered once.
Actual behavior
Content rendered twice.
Screenshots
Versions
TYPO3 v12.4.27
Content Blocks v0.7.19
PHP v8.2
- Dominant language
- PHP
- Stars
- 354
- Forks
- 209
- Avg merge
- 1m
- Merged PRs (30d)
- 2
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from benjaminkott/bootstrap_package
-
Difficulty 1/5 Under an hour Newbie friendliness 91/100
benjaminkott/bootstrap_package#1675 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
benjaminkott/bootstrap_package#1633 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 68/100
benjaminkott/bootstrap_package#1617 · 1 comment ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 68/100
benjaminkott/bootstrap_package#1575 · 4 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
benjaminkott/bootstrap_package#1484 ·
All issues in benjaminkott/bootstrap_package
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Automattic/static-site-importer#2958 ·
Maintainers usually reply within 1 day
-
Patient Portal
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
asdf-community/asdf-php#213 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
php/pecl-networking-ssh2#111 ·