Bug #69941
closedslide of cObject CONTENT don't work properly
100%
Description
Hi!
I use a slide option in my extension https://forge.typo3.org/projects/extension-adx_twitter_bootstrap
with following TS setup:
styles.content.get { select.pidInList = {field: mount_pid // field: this} select.pidInList.insertData = 1 select.andWhere.dataWrap = ( tt_content.tx_adxtwitterbootstrap_inherit = 1 OR ( tt_content.tx_adxtwitterbootstrap_inherit = 2 AND tt_content.pid != {TSFE: contentPid} ) OR ( tt_content.tx_adxtwitterbootstrap_inherit = 0 AND tt_content.pid = {TSFE: contentPid} ) ) slide = -1 slide.collect = -1 slide.collectReverse = 0 slide.collectFuzzy = 0 }
This worked up to v6.2 properly. In v7.4.0 the content will be rendered twice even the option is not set.
The solution will be to reset the "$cobjValue" on the right place:
File: typo3/sysext/frontend/Classes/ContentObject/ContentContentObject.php
Line: 72
search:
if (!empty($records)) { $this->cObj->currentRecordTotal = count($records); $this->getTimeTracker()->setTSlogMessage('NUMROWS: ' . count($records)); /** @var $cObj ContentObjectRenderer */ $cObj = GeneralUtility::makeInstance(ContentObjectRenderer::class); $cObj->setParent($this->cObj->data, $this->cObj->currentRecord); $this->cObj->currentRecordNumber = 0; $cobjValue = '';
replace:
$cobjValue = ''; if (!empty($records)) { $this->cObj->currentRecordTotal = count($records); $this->getTimeTracker()->setTSlogMessage('NUMROWS: ' . count($records)); /** @var $cObj ContentObjectRenderer */ $cObj = GeneralUtility::makeInstance(ContentObjectRenderer::class); $cObj->setParent($this->cObj->data, $this->cObj->currentRecord); $this->cObj->currentRecordNumber = 0;
Thanks a lot!
Updated by Tanel Põld about 9 years ago
- Target version set to 7.6.3
Still present in 7.6 LTS.
Was trying to get ext:ad_contentslide to work with the 7.6 LTS but out of luck for the very same reason.
And Arnos solution above works, at least in this certain case.
Updated by Gerrit Code Review about 9 years ago
- Status changed from New to Under Review
Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/46456
Updated by Gerrit Code Review about 9 years ago
Patch set 2 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/46456
Updated by Gerrit Code Review almost 9 years ago
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/46786
Updated by Gerrit Code Review almost 9 years ago
Patch set 3 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/46456
Updated by Gerrit Code Review almost 9 years ago
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47089
Updated by Gerrit Code Review almost 9 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47089
Updated by Gerrit Code Review almost 9 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47089
Updated by Gerrit Code Review almost 9 years ago
Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47116
Updated by Jo Hasenau almost 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 18fa6a9b573b82497edd6542389de002e8d94d3a.
Updated by Riccardo De Contardi over 7 years ago
- Status changed from Resolved to Closed