Fixed watched therad notifify-mail template bug

fly_indiz

Active member
Affected version
2
When receive email with notification about new post in watched thread with message preview which contains attached image - in webmail client image not viewed because image-link is relative.
For example:
HTML:
<img src="/data/attachments/0/2-638ec132320fd4f8caba3d5aaf178b80.jpg" class="bbImage " alt="clockwork_by_zy0rg-d4yyjny.gif" style="max-width: 100%;">

It is necessary to create the absolute link to preview mini-image

Affected template: bb_code_tag_attach
The problem placed in variable:
Code:
{$attachment.thumbnail_url}

I think - incorrect work function getThumbnailUrl which use function applyExternalDataUrl which use request.pather which not create absolute url
 
Last edited:

fly_indiz

Active member
I fixed it in: src/XF/App.php
in 'request.paths' function by changing string
PHP:
'base' => rtrim($request->getBasePath(), '/') . '/',
replace getBasePath by getFullBasePath
 

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.1.10).

Change log:
Ensure full thumbnail URLs are used when rendering the ATTACH BB code, notably for rendering in emails.
There may be a delay before changes are rolled out to the XenForo Community.
 
Top