Bug #77918
open
imagecols = 1 doesn't work, if disabled in BE interface
Added by Freddy Tripold about 8 years ago.
Updated over 1 year ago.
Sprint Focus:
On Location Sprint
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
I can confirm that only
TCAdefaults.tt_content.imagecols = 1
is working on latest master
- Category set to TypoScript
- 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.
- Sprint Focus set to On Location Sprint
- 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.
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.
Also available in: Atom
PDF