RozbehSharahi / bootstrap_grids

TYPO3 Extension "bootstrap_grids"
10 stars 38 forks source link

Elements within bootstrap_grids not properly created and positioned #28

Closed kludikovsky closed 4 years ago

kludikovsky commented 7 years ago

When I create a grid and then create an element within the grid by clicking the + Create new content element the element will be created, but as soon as I save it, it seems to loose its 'context' and is stored as invalid column. (This might be a handling issue, but I can't find it.)

Step-by-step

This is the sequence of the templates image

`

bootstrap_grids 1.3.1 T3 7.6.18 php 7.0

laxap commented 7 years ago

I've tested in on a basic test instance and it worked.

In your "edit" screenshot the "Type" field seems to be empty too. That's strange.

templates

add-element

create-element

edit-element

maechler commented 7 years ago

@kludikovsky That might be a common error when dealing with gridelements. You have to make sure that your custom element supports the columns tx_gridelements_container and tx_gridelements_columns otherwise they will not be set when the element is created in a grid column. Any element that wants to support being in gridelements has to have this configuration:

$GLOBALS['TCA']['tt_content']['types']['YOUR_CUSTOM_ELEMENT']['showitem'] = "
    //[..] whatever you need [..]
    --div--;LLL:EXT:gridelements/Resources/Private/Language/locallang_db.xlf:gridElements, tx_gridelements_container, tx_gridelements_columns,
";
kludikovsky commented 7 years ago

@maechler Just help me to understand: What do you mean with 'custom element'? I don't use anything 'custom' as self developed. I just have standard elements in use. I would assume that such settings shall be done during installation for general usage, or am I wrong?

In the TCA I have grideelements just poping up in 3 places

image

with the following entries: 1 showitem = CType,--div--;LLL:EXT:lang/locallang_tca.xlf:sys_category.tabs.category,categories,--div--;LLL:EXT:lang/locallang_tca.xlf:sys_category.tabs.category,module_sys_dmail_category,--div--;LLL:EXT:gridelements/Resources/Private/Language/locallang_db.xlf:gridElements,tx_gridelements_container,tx_gridelements_columns,--div--;LLL:EXT:lang/locallang_tca.xlf:sys_category.tabs.category, , --div--;LLL:EXT:flux/Resources/Private/Language/locallang.xlf:tt_content.tabs.relation, tx_flux_parent, tx_flux_column, tx_flux_children;LLL:EXT:flux/Resources/Private/Language/locallang.xlf:tt_content.tx_flux_children

gridelements_pi1 showitem = --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.general;general,--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.header;header,tx_gridelements_backend_layout,pi_flexform,tx_gridelements_children,--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.appearance,--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.frames;frames,media,--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.visibility;visibility,--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.access;access,--div--;LLL:EXT:lang/locallang_tca.xlf:sys_category.tabs.category,categories,--div--;LLL:EXT:gridelements/Resources/Private/Language/locallang_db.xlf:gridElements,tx_gridelements_container,tx_gridelements_columns,--div--;LLL:EXT:lang/locallang_tca.xlf:sys_category.tabs.category, , --div--;LLL:EXT:flux/Resources/Private/Language/locallang.xlf:tt_content.tabs.relation, tx_flux_parent, tx_flux_column, tx_flux_children;LLL:EXT:flux/Resources/Private/Language/locallang.xlf:tt_content.tx_flux_children

login showitem = --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.general;general,--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.header;header,rowDescription,--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.plugin,pi_flexform,--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.visibility;visibility,--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.access;access,--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.appearance,--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.frames;frames,--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.behaviour,--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.extended,module_sys_dmail_category,--div--;LLL:EXT:gridelements/Resources/Private/Language/locallang_db.xlf:gridElements,tx_gridelements_container,tx_gridelements_columns,--div--;LLL:EXT:lang/locallang_tca.xlf:sys_category.tabs.category,categories, , --div--;LLL:EXT:flux/Resources/Private/Language/locallang.xlf:tt_content.tabs.relation, tx_flux_parent, tx_flux_column, tx_flux_children;LLL:EXT:flux/Resources/Private/Language/locallang.xlf:tt_content.tx_flux_children

maechler commented 7 years ago

@kludikovsky I am sorry I did not look very closely, but it is exactly the same error I had when I created a custom content element and forgot to add the columns tx_gridelements_container AND tx_gridelements_columns.

I do not know exactly why these columns are not present, but you have to make sure that your element also has that "Grid Elements" tab and the two fields you see here:

screen shot 2017-07-15 at 15 14 14

When I compare your screenshots with them from @laxap, I see that he has these columns and you do not.