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

Also available in: Atom PDF