#107524Extending SiteLanguage - Configuration access via Fluid
Description
I’ve extended the site language config with a custom field and wanted to access this field via Fluid.
{language.configuration.customfield}
This leads to following error.
Cannot access protected property TYPO3\CMS\Core\Site\Entity\SiteLanguage::$configuration
The problem seems to be the missing getConfiguration method in typo3\cms-core\Classes\Site\Entity\SiteLanguage.php which is e.g. existend in typo3\cms-core\Classes\Site\Entity\Site.php
/**
* Returns the whole configuration for this site
*/
public function getConfiguration(): array
{
return $this->configuration;
}Reviews 2
History 49
-
Garvin Hicking commented and changed status
NewNeeds Feedback 09/25/25, 18:54 -
Robert Winter commented 09/29/25, 13:17
Direct access is not possible but the cast to an array in fluid would help to tackle the problem temporarily.
-
Gerrit Code Review pushed patch set 1 for main to change 90849 status
Needs FeedbackUnder Review 09/30/25, 20:32 -
Gerrit Code Review pushed patch set 2 for main to change 90849 10/07/25, 13:15
-
Gerrit Code Review pushed patch set 3 for main to change 90849 10/07/25, 13:27
-
Gerrit Code Review pushed patch set 4 for main to change 90849 10/08/25, 13:23
-
Gerrit Code Review pushed patch set 1 for 13.4 to change 90961 10/09/25, 07:50
-
Garvin Hicking commented and changed status
Under ReviewResolved done0 %100 % 10/09/25, 08:10Applied in changeset commit:7909a22cfb049d6a44d717a93a1684a57d67578f.
-
Benni Mack changed status
ResolvedClosed 12/02/25, 13:04
Have you tried to just access
{language.customfield}? (could not try myself yet, but reading the code, everything in$this->configurationseems accessible through thetoArray()functionality.Hhhm, thinking about this; it seems
{language}will always access the object and not invoke the array casting. With{language as array}you would have to assign it to another variable temporarily to accesss it like that.