Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First Tab in NewContentElementWizard not selected #123

Open
KlickUndKlar opened this issue Feb 4, 2023 · 2 comments
Open

First Tab in NewContentElementWizard not selected #123

KlickUndKlar opened this issue Feb 4, 2023 · 2 comments

Comments

@KlickUndKlar
Copy link

KlickUndKlar commented Feb 4, 2023

Hi @IchHabRecht

I just installed your great Extension and found a Problem with the new content element wizard.

In my case i've got a Backendlayout with the following config:

backend_layout {
        colCount = 1
        rowCount = 2
        rows {
          1 {
            columns {
              1 {
                name = LLL:EXT:myext/Resources/Private/Language/locallang_backend_layout.xlf:content.column.header
                colPos = 0
                maxitems = 1
                allowed {
				  CType = hero_text, hero_text_image, hero_text_video
				}
              }
            }
          }
          2 {
            columns {
              1 {
                name = LLL:EXT:myext/Resources/Private/Language/locallang_backend_layout.xlf:content.column.content
                colPos = 1
                disallowed {
				 CType = hero_text, hero_text_image, hero_text_video
				}
              }
            }
          }
        }
      }

If i open the new content element wizard in colPos = 1 the first tab is selected.

Bildschirm­foto 2023-02-04 um 00 18 19

If i open the new content element wizard in colPos = 0 there is no tab selected.

Bildschirm­foto 2023-02-04 um 00 18 43

Is this an issue of your extension or the TYPO3 Core?

Thanks for your help

Ben

@KlickUndKlar
Copy link
Author

KlickUndKlar commented Feb 6, 2023

I found a solution, it's not the prettiest one, but it solves the problem.

[request.getQueryParams() ['colPos'] == 0]
    mod.wizards.newContentElement.wizardItems {
      hero_text.before = text
    }
[end]

@kitzberger
Copy link

I can confirm this issue with this setup here:

  • TYPO3 11.5
  • EXT:content_defender 3.4.1

I debugged it down to the fact that my custom CEs are being grouped in a tab whose key is containing an underscore:

mod.wizards.newContentElement.wizardItems.my_mask_elements {
  header = My mask elements
  show = my_mask_element_1, my_mask_element_2
  ...
}

This seems to be a problem for how EXT:content_defender/Hooks/WizardItemsHook manipulates the wizard items.

After changing my_mask_elements to my-mask-elements everything is being processed correctly 🥳

kitzberger added a commit to kitzberger/content_defender that referenced this issue Sep 23, 2023
kitzberger added a commit to kitzberger/content_defender that referenced this issue Sep 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants