Skip to content

Plugin TS Setting are empty in Scheduler nor Console Command #92

@pfuju

Description

@pfuju

Problem:
Defining some TS Variables and add these to to plugin.settings:

plugin.tx_luxletter_fe {
    settings {
        header = Company Newsletter
        subheader = Company Slogon 
        unsubscribePid = 123
        logos {
            logoNormal = {$page.logo.file}
            logoInverted = {$page.logo.fileInverted}
        }
    }
}

In Backend Preview as well as in Frontend Preview (calling Newsletter Page with /?type= 1560777975) everything works fine.
However if the Newsletter will be send via Scheduler (CLI) the debugging the variable "settings" will be empty.
Checked with simple <f:debugger>{settings}</f:debugger> in Layout Fluid Template.

Solution 1:
Using Simple Viewhelper in Template Layout
<v:variable.set name="systemEmailSettings" value="{v:variable.typoscript(path: 'lib.systemEmailSettings')}" />

Solution 2:
Maybe changes in Configuration Utility can help.

/**
     * Get TypoScript settings
     *
     * @return array
     * @throws InvalidConfigurationTypeException
     * @throws Exception
     */
    public static function getExtensionSettings(): array
    {
       $ts = ObjectUtility::getConfigurationManager()->getConfiguration(
            ConfigurationManagerInterface::**CONFIGURATION_TYPE_FULL_TYPOSCRIPT**,
            'luxletter'
        return    GeneralUtility::removeDotsFromTS(
                    $ts['plugin.']['tx_luxletter_fe.']
                );
        );
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions