Skip to content

The "successMessage" parameter is not passed to the $modx->placeholders array in the FetchIt::HandleFormIt method #5

@konqueror7

Description

@konqueror7

The 'successMessage' parameter specified when declaring the snippet in the template is replaced with the default value from the extension lexicon.
This is reproduced in snippet versions 1.0.0 and 1.1.1.
The site has the following configuration:
MODX version: Revolution 2.8.4-pl
Database type: mysql
Database version: 5.7.21-20
PHP version 7.4.33

To fix this, I add an instruction after declaring the $plPrefix variable in the FetchIt::handleFormIt() method

$this->modx->setPlaceholder($plPrefix . 'successMessage',$scriptProperties['successMessage']);

Ru

Параметр 'successMessage', заданный при объявлении сниппета в шаблоне, заменяется дефолтным значением из лексикона расширения
Это воспроизводится в версиях сниппета 1.0.0 и 1.1.1.
Сайт имеет конфигурацию:
Версия MODX: Revolution 2.8.4-pl
Тип базы данных: mysql
Версия базы данных: 5.7.21-20
PHP версия 7.4.33

Для исправления добавляю инструкцию после объявления переменной $plPrefix в методе FetchIt::handleFormIt()

$this->modx->setPlaceholder($plPrefix . 'successMessage',$scriptProperties['successMessage']);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions