Skip to content

Get your Extbase data right in TYPO3 v13 Backend

You may remember this Extbase TypoScript option: "ignoreAllEnableFieldsInBe"

This was a crucial feature up until TYPO3 version 12, which ensured that any time/group or other Frontend-related restrictions were not applied in Backend context.

The few of us, using Extbase within TYPO3's backend, know the story from the past. Repositories, QuerySettings and a few - heck a lot of - options to make a mistake.

One thing, you probably had to configure at some point, was the "ignoreAllEnableFieldsInBe" TypoScript option. It made sure that within the context of the Backend module, the enable fields were ignored in all Extbase queries.
This was crucial in order to get consistent results.

With TYPO3 version 12, those TypoScript options have been deprecated [1] and got finally removed with version 13 [2]. While the decision itself to get rid of TypoScript stuff within Extbase in the Backend is the right direction, it was obvisouly forgotten that especially the aforementioned option still needs a replacement, which is not there.

The consequences are rather heavy. For illustration we have a small example:

Say you have an enitiy SeminarDate and an entity Seminar. The SeminarDate relates to the Seminar by foreign key. Both entities have start-/endtime fields, aka "enable-fields".
Now lets consider the case, where a Seminar has an endtime somewhere in the past. If your Extbase Backend now uses the SeminarDateRepository to fetch a SeminarDate, which relates exactly to this Seminar, you receive an incomplete SeminarDate object, because Extbase uses the enable-fields on the query to retrieve the related Seminar (fetchRelation).

The technical detail is, that the query to fetch the relation does not use the query settings you applied to retrieve the SeminarDates, it creates a fresh QuerySettings-object. So it does not matter what you configured in your repository, the relation is fetched "out of band". While this is technically correct for some reasons, it is now the problem. Because formerly, the "ignoreAllEnableFieldsInBe" option was adhered to by every QuerySettings-object, but now this is gone.

In our opinion, the feature option "ignoreAllEnableFieldsInBe" should have been true by default from the very beginning, and with the breaking removal in version 13, this should have been the default behavior. We provide a patch [3] in the review system. So if you're affected, feel free to use it.

[1] https://forge.typo3.org/issues/100622 
[2] https://forge.typo3.org/issues/101008 
[3] https://forge.typo3.org/issues/109937