Skip to content

AbstractService::getResultMessage does not print intended messages #70

Description

@dneuge

AbstractService::getResultMessage takes two arguments, $status and $message, which are both null by default. When trying to print an error message with just $status set (as e.g. MigrateRelationsService does) only $status is printed because $message has already been overridden by LocalizationUtility::translate('moveAlong', 'dam_falmigration').

Furthermore, to actually print an error message, amountOfMigratedRecords has to be set to a negative value, else default messages (migrationSuccessful & migratedFiles or migrationNotNecessary & allFilesMigrated) will be used instead of the requested headline & message.

This looks unintended as e.g. MigrateRelationsService has not been written that way. How were error messages supposed to be working?

Plus, if $message was not overridden early on, the translation key would still be wrong as the dot after migrationStatusMessage prefix is missing:

$message = LocalizationUtility::translate('migrationStatusMessage' . $status, 'dam_falmigration');

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions