#106483Exception 1546632293 Could not get value of property [model] make sure the property is either public or has a getter
Description
This exception is also thrown when the extbase model has a public getter and or the property is public but the TCA for the field is missing.
Can we detect this case and give a more specific error message? If not I would suggest to change the error message to also include TCA
Reviews 1
Related issues 2
History 914
-
Gerrit Code Review pushed patch set 1 for main to change 89055 status
NewUnder Review <span data-processor="relativetime" data-value="2025-04-11T11:59:39+00:00" > 04/11/25, 11:59 </span> -
Gerrit Code Review pushed patch set 2 for main to change 89055 <span data-processor="relativetime" data-value="2025-04-11T12:17:46+00:00" > 04/11/25, 12:17 </span>
-
Georg Ringer commented <span data-processor="relativetime" data-value="2025-04-25T10:35:41+00:00" > 04/25/25, 10:35 </span>
Getters can still be called, see e.g. https://github.com/georgringer/news/blob/main/Classes/Domain/Model/News.php#L384-L391 ext:news models got a lot of additional methods which are called via fluid, in v12/v13 working. so your issue might be something else!
-
Lina Wolf commented <span data-processor="relativetime" data-value="2025-04-25T14:32:57+00:00" > 04/25/25, 14:32 </span>
If a property cannot be persisted, it needs to be marked as transient [Transient](https://docs.typo3.org/permalink/t3coreapi:extbase-annotation-transient) then Extbase expects not TCA definition
-
S P commented <span data-processor="relativetime" data-value="2025-04-25T16:40:08+00:00" > 04/25/25, 16:40 </span>
Lina Wolf wrote in #note-5:
> If a property cannot be persisted, it needs to be marked as transient [Transient](https://docs.typo3.org/permalink/t3coreapi:extbase-annotation-transient) then Extbase expects not TCA definitionI was talking about plain methods named
getSometing(), not properties.Georg Ringer wrote in #note-4:
> Getters can still be called, see e.g. https://github.com/georgringer/news/blob/main/Classes/Domain/Model/News.php#L384-L391 ext:news models got a lot of additional methods which are called via fluid, in v12/v13 working. so your issue might be something else!Interesting. Need to investigate further, then.
Still, something (probably undocumented) between v11 and v12 regarding this behaviour changed/got more strict, if we now get this hard failing Exception when previously everything worked without any warning at all.
-
S P commented <span data-processor="relativetime" data-value="2025-04-28T05:57:33+00:00" > 04/28/25, 05:57 </span>
Did some further analysis and could narrow it down to a very specific situation. The exception occurs if the model has any
ObjectStoragethat is not TCA-bound, even if it is not called by Fluid and even if it isprivate! Marking such a property as#[\TYPO3\CMS\Extbase\Annotation\ORM\Transient]did not help. It is enough for the Exception to be thrown if the property exists when Extbase constructs the instance.It seems for PHP built-in typed non-TCA properties (like
intorarray) this Exception is not thrown, after all. And it seems also not to happen for Domain-typed properties (likeprivate Domain\Model\Product $product). It seems only to be thrown for non-TCA-boundObjectStorage.Some of our non-property methods store results in
privateproperties (for runtime-caching). The ones beingObjectStorageare the ones that throw the exception. In our case I luckily can convert them easily to plain arrays.A trimmed down example:
final class Product extends AbstractEntity { // The pure existance of this line causes the exception! No matter if called from anyhwere or not. private ObjectStorage $nonTcaBoundObjectStorage; }This still sounds like a real bug to me (a less drastic one, now, but still not just an unclear Exception message). I totally expect models to be able to have any properties of any type, especially protected/private ones. Why does Extbase in v12 care about whether a protected/private
ObjectStorageis DB/TCA-bound? That still is an undocumented regression and it seems totally random to have this behaviour just forObjectStorage(and not for either none or all possible types). -
Gerrit Code Review pushed patch set 3 for main to change 89055 <span data-processor="relativetime" data-value="2025-06-06T06:04:24+00:00" > 06/06/25, 06:04 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 89055 <span data-processor="relativetime" data-value="2025-06-06T08:25:07+00:00" > 06/06/25, 08:25 </span>
-
S P commented <span data-processor="relativetime" data-value="2025-06-11T05:23:39+00:00" > 06/11/25, 05:23 </span>
I added a relation #105843 because there’s another curious problem with ObjectStorages (language overlay in ObjectStorage does not work reliably).
-
Benni Mack changed Related to #108986 <span data-processor="relativetime" data-value="2026-02-15T17:20:02+00:00" > 02/15/26, 17:20 </span>
-
Gerrit Code Review pushed patch set 5 for main to change 89055 <span data-processor="relativetime" data-value="2026-04-22T06:33:50+00:00" > 04/22/26, 06:33 </span>
-
Benni Mack changed Sprint Focus On Location Sprint <span data-processor="relativetime" data-value="2026-08-06T16:02:28+00:00" > 08/06/26, 16:02 </span>
I found this issue while just researching for an undocumented(?) breaking change in behaviour after upgrading from v11 to v12.
Why isn’t it possible to call property- less methods from Fluid anymore? From our POV this is a massive breaking change.
We often access domain model methods in Fluid that have no underlying property (or TCA entry) at all. Just to separate logic from view.
The following example worked totally fine up to TYPO3 11. In TYPO3 12 it stopped working without any changelog/deprecation/migration documentation or warning and throws the mentioned exception. This basically degrades domain models to simple DTOs if they are not allowed to have any self-relating logic inside them which can be passed on to the view. And to prevent this discussion: no, this is no case for a ViewHelper, because of course a model is totally allowed to know/calculate everything it can about itself and pass it on to the View. That’s the one single essence of DDD MVC architecture. A ViewHelper is used for domain-external formatting/data-retrieval.
Now the example (worked in v11, throws this exception in v12):
Fluid:
PHP Model
Product: