Skip to content

Cannot assign namespace locally in fluid files #176

@viu-x

Description

@viu-x

I'm on TYPO3 13.4.12 and fluid_components 3.8.4 and cannot assign the namespace locally in fluid files with either syntax.

{namespace sc=Viux\Sitepackage\Components}
<html
  xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
  xmlns:sc="http://typo3.org/ns/Viux/Sitepackage/Components"
  data-namespace-typo3-fluid="true"
>

In both cases an error is thrown:

PHP Warning: Undefined array key "sc" in /var/www/html/vendor/sitegeist/fluid-components/Classes/Fluid/ViewHelper/ComponentResolver.php line 133

$namespaces = (array) $this->namespaces[$namespaceIdentifier];

The only way I get it to work is if I register the namespace globally in my ext_localconf.php.

$GLOBALS['TYPO3_CONF_VARS']['SYS']['fluid']['namespaces']['sc'] = ['Viux\Sitepackage\Components'];

EDIT:
I also use the fluid-stylguide extension and get an identical error when I open the /fluid-styleguide/list for the fsc namespace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions