Issue Bug Closed

#77918imagecols = 1 doesn't work, if disabled in BE interface

Freddy Tripold 09/12/16, 16:57 updated 04/18/25, 06:06

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

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 10

  1. Freddy Tripold commented 09/20/16, 20:27

    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;

  2. Freddy Tripold commented 09/26/16, 17:54

    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.

  3. Riccardo De Contardi commented 06/04/17, 11:45

    I can confirm that only

    TCAdefaults.tt_content.imagecols = 1

    is working on latest master

  4. Riccardo De Contardi changed category 09/01/17, 11:56

  5. taywa gmbh commented and changed subject imagecols = 1 doesn't work imagecols = 1 doesn't work, if disabled in BE interface TYPO3 Version 7 9 12/16/19, 15:06

    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.

  6. Benni Mack changed Sprint Focus On Location Sprint 08/02/23, 14:57

  7. Benni Mack commented and changed status New Needs Feedback 08/09/23, 23:16

    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.

  8. Riccardo De Contardi commented 08/13/23, 14:40

    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.

  9. Benni Mack commented 03/23/25, 20:12

    Hey Riccardo,

    obviously your last example cannot work. Because your PageTS options ONLY touch FormEngine, DataHandler (Persistence) does not care about this.

    However, TCAdefaults works (now, since v11 I guess) properly, and matches the issue as described.

  10. Georg Ringer commented and changed status Needs Feedback Closed 04/18/25, 06:06

    I am closing this issue as TCAdefaults solves it and also because this issue is highly related to the old content elements which should/must be renewed some time in future anyway and imagecols is one of those properties which need to vanish (IMHO)