Fixed Activity Summary Email template broken

Affected version
2.2

fly_indiz

Active member
When scheduled tasks runs at Server Trigger (OS system cron) email template broken with incorrect logo URL.
HTML:
<img src="http:/data/assets/logo/xenforo-logo.png" alt="Forum" width="" height="" class="" style="max-height: 200px; vertical-align: bottom;">

This is cause in Templater function base_url (fnBaseUrl) return incorrect url
fnBaseUrl get base url from request.pather which get it from $container['request.paths']

It is possible other similar bugs are present.

P.S. i already posted similar problem, but it not fully fixed, only partially:

Small suggest variant to fix:
In src/XF/App.php, after string:
PHP:
$fullPath = $request->getFullBasePath();
add:
PHP:
if (!$request->getHost() && preg_match('#^(/|[a-z]+:)#i', $options->boardUrl))
{
    $fullPath = $options->boardUrl;
}
but this fix will work only if canonical url is correctly set...
 
Last edited:

XF Bug Bot

XenForo bug fixer bot
Staff member
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.3).

Change log:
Ensure that CLI requests receive reasonable request path values (for URL generation purposes)
There may be a delay before changes are rolled out to the XenForo Community.
 
Top