flux
flux copied to clipboard
allowedContentTypes doesn't work for page templates
No matter what I do, I always get all content elements displayed in the new content element wizard.
This is my setup:
TYPO3 8.7.26 flux 9.2.0 fluidpages 5.0.0
Page.html
<f:layout name="Page" />
<f:section name="Configuration">
<flux:form id="standardWithMenuTeasers">
<flux:grid>
<flux:grid.row>
<flux:grid.column colPos="1337" name="menuTeaserFirst">
<flux:form.variable name="allowedContentTypes" value="fluidcontent_content"/>
<flux:form.variable name="Fluidcontent" value="{allowedContentTypes: 'Ueberdosis.Ueberdosisprovider:Box.html'}"/>
</flux:grid.column>
<flux:grid.column colPos="1338" name="menuTeaserSecond">
<flux:form.variable name="allowedContentTypes" value="fluidcontent_content"/>
<flux:form.variable name="Fluidcontent" value="{allowedContentTypes: 'Ueberdosis.Ueberdosisprovider:Box.html'}"/>
</flux:grid.column>
</flux:grid.row>
<flux:grid.row>
<flux:grid.column colspan="2" colPos="0" name="main" />
</flux:grid.row>
</flux:grid>
</flux:form>
</f:section>
<f:section name="Main">
<f:render partial="Page" arguments="{_all}" />
</f:section>
This doesn't work either by the way:
<f:layout name="Page" />
<f:section name="Configuration">
<flux:form id="standardWithMenuTeasers">
<flux:grid>
<flux:grid.row>
<flux:grid.column colPos="1337" name="menuTeaserFirst">
<flux:form.variable name="allowedContentTypes" value="textmedia"/>
</flux:grid.column>
<flux:grid.column colPos="1338" name="menuTeaserSecond">
<flux:form.variable name="allowedContentTypes" value="textmedia"/>
</flux:grid.column>
</flux:grid.row>
<flux:grid.row>
<flux:grid.column colspan="2" colPos="0" name="main" />
</flux:grid.row>
</flux:grid>
</flux:form>
</f:section>
<f:section name="Main">
<f:render partial="Page" arguments="{_all}" />
</f:section>
Did I do something wrong?
I'm very grateful for your help. Thanks in advance!
Kind regards Sebastian
It looks like Flux doesn't like the value of colPos. Try <=99
$this->registerArgument('colPos', 'integer', 'Column number - between 0 and 99, should be unique.', true);
Thanks for the hint! Unfortunately a smaller colPos doesn't work either.
I've just tested this again:. TYPO3 9.5.7, Flux 9.2.0
- Very new page layout with your settings => I can confirm the issue, all CEs are allowed;
- Change colPos within first row: 1337 => 99
- Clear all caches
- Reload Page in BE => only textmedia is allowed within colPos 99
Either you didn't clear the caches or there is different behaviour of Flux 9.2.0 with TYPO 3 8.7.26 & TYPO3 9.5.7
My version of fluidpages is likely 4.3.0, which also may play a role
I cleared every possible cache. ;-) All CEs are still allowed. I also tried the older version 4.3.0. Same result. :/
'Fluidcontent' is not longer supported since some time. how are the content-elements are stored in the database? do they use the field tx_fed_fcefile (fluidcontent) with values like yourext:TwoColumns.html or do they use the field CType with values like: yourext_twowolumns?
If the CType field is used you can use something like:
<flux:grid.column colPos="13" name="headerText" label="LLL:EXT:yourext/Resources/Private/Language/locallang.xlf:flux.ControlPage.columns.headerText">
<flux:form.variable name="allowedContentTypes" value="yourext_infotext" />
</flux:grid.column>
I don't use the fluidcontent extension. And I already tested your example. It's not working.
In your example code you use
<flux:form.variable name="Fluidcontent" value="{allowedContentTypes: 'Ueberdosis.Ueberdosisprovider:Box.html'}"/>
I think since the migration to actual CType-style content elements this syntax is no longer valid.
For me, for some reason it only works with core elements but not with Flux content elements from my provider extension:
<flux:form.variable name="allowedContentTypes" value="myprovider_mycontentelement"/>
<flux:form.variable name="allowedContentTypes" value="textpic"/>
allowedContentTypes doesn't work for page templates
still in Flux 9.3.2 without fluidpages
I can confirm that allowedContentTypes for pages...
- does not work on TYPO3 v8.7.32 with flux 9.5.0 and fluidpages 5.0.0.
- does work on TYPO3 v10.4.23 with flux 9.5.0 and without fluidpages.