Bug #69941

slide of cObject CONTENT don't work properly

Added by Arno Dudek about 4 years ago. Updated about 2 years ago.

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

100%

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

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

Associated revisions

Revision 18fa6a9b (diff)
Added by Jo Hasenau almost 4 years ago

[BUGFIX] Fix slide function of cObject

Move variable value association to correct position.

Resolves: #69941
Releases: master, 7.6
Change-Id: I8bca6203f4e994a86b11f5d3be54b83e7dfdd73c
Reviewed-on: https://review.typo3.org/47089
Reviewed-by: Mathias Schreiber <>
Tested-by: Mathias Schreiber <>
Reviewed-by: Daniel Goerz <>
Reviewed-by: Benni Mack <>
Tested-by: Benni Mack <>

Revision 40682616 (diff)
Added by Jo Hasenau almost 4 years ago

[BUGFIX] Fix slide function of cObject

Move variable value association to correct position.

Resolves: #69941
Releases: master, 7.6
Change-Id: I8bca6203f4e994a86b11f5d3be54b83e7dfdd73c
Reviewed-on: https://review.typo3.org/47116
Reviewed-by: Benni Mack <>
Tested-by: Benni Mack <>

History

#1 Updated by Tanel Põld almost 4 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.

#2 Updated by Gerrit Code Review almost 4 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

#3 Updated by Gerrit Code Review almost 4 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

#4 Updated by Gerrit Code Review almost 4 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

#5 Updated by Gerrit Code Review almost 4 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

#6 Updated by Jo Hasenau almost 4 years ago

  • Assignee set to Jo Hasenau

#7 Updated by Gerrit Code Review almost 4 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

#8 Updated by Gerrit Code Review almost 4 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

#9 Updated by Gerrit Code Review almost 4 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

#10 Updated by Gerrit Code Review almost 4 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

#11 Updated by Jo Hasenau almost 4 years ago

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

#12 Updated by Riccardo De Contardi about 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF