Duplicate Server based trigger does not support buildLink properly

AndyB

Well-known member
Affected version
2.2.2
When using the Server based trigger function:

Admin control panel -> Setup -> Options -> System and performance -> Job run trigger -> Server based trigger

Links created by buildLink do not contain the directory XenForo is installed in.

Example PHP code:

$link = \XF::app()->router('public')->buildLink('posts', $post);

This results in:

https://domain.com/posts/1234

but the XenForo is installed in a directory called 'forums' and it should be:

https://domain.com/forums/posts/1234
 
Fundamentally, I think this is the same issue as reported here:


Saying that, it is worth mentioning that in most cases, you may either want to be building links using canonical: explicitly. Or if it's for use in an alert in similar later, using nopath: (allowing the path to be resolved at run time).
 
Back
Top Bottom