Project

General

Profile

Actions

Bug #69941

closed

slide of cObject CONTENT don't work properly

Added by Arno Dudek over 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
-
Target version:
Start date:
2015-09-18
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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!


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #73733: CONTENTs slide.collect = -1 is not working correctlyClosed2016-02-29

Actions
Actions #1

Updated by Tanel Põld about 8 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.

Actions #2

Updated by Gerrit Code Review about 8 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

Actions #3

Updated by Gerrit Code Review about 8 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

Actions #4

Updated by Gerrit Code Review about 8 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

Actions #5

Updated by Gerrit Code Review about 8 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

Actions #6

Updated by Jo Hasenau about 8 years ago

  • Assignee set to Jo Hasenau
Actions #7

Updated by Gerrit Code Review about 8 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

Actions #8

Updated by Gerrit Code Review about 8 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

Actions #9

Updated by Gerrit Code Review about 8 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

Actions #10

Updated by Gerrit Code Review about 8 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

Actions #11

Updated by Jo Hasenau about 8 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #12

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF