Bug #77918
openimagecols = 1 doesn't work, if disabled in BE interface
0%
Description
TCEFORM.tt_content.imagecols = 1 in PageTS doesn't work. A workaround with
mod.wizards.newContentElement.wizardItems.common.elements.textmedia.tt_content_defValues.imagecols = 1
only works if you start with the textmedia. If you start with custom ce or any other ce, imagecols = 2.
With the same workaround for the custom ce slider
mod.wizards.newContentElement.wizardItems.common.elements.slider{
icon = slider.gif
title = Slider
description = Slider
tt_content_defValues {
CType = Slider
imagecols = 1
}
}
you can change the value to 1, but if the gallerySettings are invisible, mod.wizard... don't work, imagecols is 2. Same behavior, if you change between the content elements.
So, there is no way to make custom content elements with only one image and without the gallerySettings. The imagecols are always 2.
TYPO 7.6.10 and fluid_styled_content
Updated by Freddy Tripold about 8 years ago
As described here http://stackoverflow.com/questions/39393978/typo3-v7-6-default-value-for-number-of-columns , this is a bug since 6.2
A workaround will be to add $GLOBALS['TCA']['tt_content']['columns']['imagecols']['config']['default'] = 1;
Updated by Freddy Tripold about 8 years ago
The correct syntax for TCEFORM should be TCEFORM.tt_content.imagecols.config.default = 1 as described here https://docs.typo3.org/typo3cms/TSconfigReference/7.6/PageTsconfig/TCEform/
But this make no difference only TCAdefaults.tt_content.imagecols = 1 works as expected.
Updated by Riccardo De Contardi over 7 years ago
I can confirm that only
TCAdefaults.tt_content.imagecols = 1
is working on latest master
Updated by taywa gmbh almost 5 years ago
- Subject changed from imagecols = 1 doesn't work to imagecols = 1 doesn't work, if disabled in BE interface
- TYPO3 Version changed from 7 to 9
Still present in 9.5.7:
In page config:
TCEFORM.tt_content.imagecols.removeItems = 2,3,4,5,6,7,8 # ## 1 imagecols is default TCAdefaults.tt_content.imagecols = 1 or #TCEFORM.tt_content.imagecols.config.default = 1 TCEFORM.tt_content.imagecols.disabled = 1
In CType "image" content, this leads to imagecols = 2, if imagecols.disabled = 1
To set $GLOBALS['TCA']['tt_content']['columns']['imagecols']['config']['default'] = 1; I would need to make a new, own extension for this project.
Workaround for me is just not disable it, then on save it will be set to the desired imagecols = 1.
Updated by Benni Mack over 1 year ago
- Status changed from New to Needs Feedback
This bug has been solved, I think with at least v11 as we set the TCAdefaults properly in DataHandler.
I cannot reproduce this in a v12 installation anymore.
Updated by Riccardo De Contardi over 1 year ago
I performed the following test on TYPO3 11.5.30 and 12.4.5
1) Create a Page
2) Modify its Page TSConfig (See table below for all the configurations tested)
3) Create the following CE:
- Images Only
- Text and Images
- Text and Media
4) I looked on both the content of the dropdown "Number of columns [imagecols]" AND on the actual value saved on the DB on the "imagecols" field of the "tt_content" table.
The results are listed on the following table
- the results are the same for all the three CE tested
- the results are the same for both TYPO3 versions.
TS Config | Option selected on the [imagecols] dropdown in backend | actual value of the [imagecols] field on DB |
---|---|---|
TCEFORM.tt_content.imagecols.removeItems = 2,3,4,5,6,7,8 TCAdefaults.tt_content.imagecols = 1 |
1 (only option available) | 1 |
TCEFORM.tt_content.imagecols.removeItems = 2,3,4,5,6,7,8 TCEFORM.tt_content.imagecols.config.default = 1 |
1 (only option available) | 1 |
TCEFORM.tt_content.imagecols.removeItems = 2,3,4,5,6,7,8 TCAdefaults.tt_content.imagecols = 1 TCEFORM.tt_content.imagecols.disabled = 1 |
(not visible) | 1 |
TCEFORM.tt_content.imagecols.removeItems = 2,3,4,5,6,7,8 TCEFORM.tt_content.imagecols.config.default = 1 TCEFORM.tt_content.imagecols.disabled = 1 |
(not visible) | 2 (*) |
(*) Note:
If I remove the line TCEFORM.tt_content.imagecols.disabled = 1
from the TS Config, the backend dropdown Number of Columns [imagecols]
shows 1 as value !!!! the value shown is wrong , as the value saved on the DB is actually 2 Only when you save the CE the value will be updated and becomes 1.