Project

General

Profile

Actions

Bug #100103

open

SystemStatusUpdateTask does not contain issues or URL when sent via cron

Added by Felix Nagel about 1 year ago. Updated about 1 year ago.

Status:
Under Review
Priority:
Should have
Assignee:
Category:
-
Start date:
2023-03-07
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The system update task in the scheduler is broken.

It does not contain any information (no issues rendered, URL "This email was sent by xyz from URL: xyz" missing) when triggered by crontab. When using the "play" button within the scheduler module it works.

Tested with two 11.5.24 installations.


Related issues 2 (2 open0 closed)

Related to TYPO3 Core - Bug #100148: layout SystemEmail should not show URL if URL is not setUnder ReviewSybille Peters2023-03-12

Actions
Related to TYPO3 Core - Task #100157: Cleanup layout SystemEmailUnder ReviewThomas Hohn2023-03-13

Actions
Actions #1

Updated by Thomas Hohn about 1 year ago

Is this the "report" you are missing @Felix Nagel?

// Only add the environment status report if not in CLI mode
if (!Environment::isCli()) {
    $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['system'][] = EnvironmentStatusReport::class;
}

when running it via cron?

Actions #2

Updated by Felix Nagel about 1 year ago

Not sure. Where is this code snippet from? I'm talking about the TYPO3\CMS\Reports\Task\SystemStatusUpdateTask class. The whole thing. The email is empty when triggered via cron and not the module UI.

CLI:

This report contains all System Status Notifications from your TYPO3 installation. Please check the status report for more information.

Site: Domain.com

Issues:

This email was sent by Domain.com from URL: 

UI:

Dieser Bericht umfasst alle Systemstatusbenachrichtungen Ihrer TYPO3-Installation. Bitte prüfen Sie den Statusbericht für mehr Informationen.

Seite: Domain.com

Probleme:
[OK]   Systemumgebungsüberprüfung             - 48 Test(s)
### Current directory (./) is within PHP include path.: 0
### File uploads allowed in PHP: 0
### Maximum post upload size correlates with maximum upload file size in PHP: 0
### PHP Memory limit is equal to or more than 128MB: 0
### PHP version is fine: 0
### Maximum PHP script execution time is equal to or more than 240: 0
### No disabled PHP functions: 0
### PHP doc_root is not set: 0
### PHP open_basedir is off: 0
### PHP xdebug extension not loaded: 0
### PHP max_input_vars ok: 0
### PHP Doc comment reflection works: 0
### Apache ThreadStackSize is not an issue on UNIX systems: 0
### PHP extension "filter" loaded: 0
### PHP extension "gd" loaded: 0
### PHP extension "hash" loaded: 0
### PHP extension "json" loaded: 0
### PHP extension "libxml" loaded: 0
### PHP extension "PDO" loaded: 0
### PHP extension "session" loaded: 0
### PHP extension "SPL" loaded: 0
### PHP extension "standard" loaded: 0
### PHP extension "xml" loaded: 0
### PHP extension "zip" loaded: 0
### PHP extension "zlib" loaded: 0
### PHP extension "fileinfo" loaded: 0
### PHP extension "intl" loaded: 0
### PHP extension "openssl" loaded: 0
### PHP extension PCRE is loaded and version is fine: 0
### PHP GD library true color works: 0
### PHP GD library has gif support: 0
### PHP GD library has jpg support: 0
### PHP GD library has png support: 0
### PHP GD library has freetype font support: 0
### Trusted hosts pattern is configured to allow current host value.: 0
### Fetching external URLs is allowed: 0
### System locale is correct: 0
### File names with UTF-8 characters can be used.: 0
### A PHP opcode cache is loaded: 0
### FreeType True Type Font DPI: 0
### PHP libxml bug not present: 0
### MySQL version is fine: 0
### No incompatible SQL modes found.: 0
### MySQL database uses utf8 or utf8mb4. All good.: 0
### MySQL server default uses utf8 or utf8mb4. All good.: 0
### PHP extension "mysqli" loaded: 0
### PHP mysqli.reconnect is fine: 0
### PHP extension "pdo_mysql" loaded: 0

This email was sent by Domain.com from URL: https://www.domain.com/

Another issue I just noticed: its only localized when using the UI, but I guess that makes sense. When called via cron, there is no language to choose but the default language.

Actions #3

Updated by Thomas Hohn about 1 year ago

The problem seems to be that

{normalizedParams.siteUrl}

is not available when in invoked from cli. Instead it should be replace by
<f:uri.external uri="{typo3.sitename}" defaultScheme="https" />

Actions #4

Updated by Gerrit Code Review about 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78090

Actions #5

Updated by Thomas Hohn about 1 year ago

  • Assignee set to Thomas Hohn
  • Target version set to Candidate for patchlevel
Actions #6

Updated by Thomas Hohn about 1 year ago

The config I referred to is in the ext:report

Actions #7

Updated by Sybille Peters about 1 year ago

  • Related to Bug #100148: layout SystemEmail should not show URL if URL is not set added
Actions #8

Updated by Sybille Peters about 1 year ago

There are several problems:

1) About the URL missing in the footer: is not only in the status report, but in any case where FluidEmail is used with the SystemEmail layout (for example in EXT:linkvalidator, PasswordRest etc.).

See

core/Resources/Private/Layouts/SystemEmail.html
core/Resources/Private/Layouts/SystemEmail.txt
core/Classes/Mail/FluidEmail


is also handled in https://forge.typo3.org/issues/100148 (I was not aware of this issue then)

2) specific to the report (in EXT:report): the content is missing.

TYPO3\CMS\Reports\Task\SystemStatusUpdateTask
....

Creating the status report itself probably does not work in cli context. Using FlashMessageQueue is not a good sign.

3) May not make sense to set the sitename ({typo3.sitename}) and / or the URL ({normalizedParams.siteUrl}) in all cases, especially in a multiple site installation. (I don't think this is a big problem, since it is a system notification and it is better to have at least one URL than none at all to determine the origin, in case this does actually get sent to the wrong person

4) No clear information if SystemEmail is in fact @internal, so extensions may use this as well, which makes it more complicated to change things.

Actions #9

Updated by Thomas Hohn about 1 year ago

Actions

Also available in: Atom PDF