N°7315 - Migrate usages of WebPage::add_linked_script() to absolute URIs to ensure they are correctly loaded no matter the endpoint location

This commit is contained in:
Molkobain
2024-01-17 22:59:32 +01:00
parent e00112d6e1
commit db4dfe1ba3
11 changed files with 43 additions and 30 deletions

View File

@@ -771,7 +771,7 @@ JS;
protected function AddRequiredForModificationJsFilesToPage(iTopWebPage &$oPage): void
{
foreach (static::EnumRequiredForModificationJsFilesRelPaths() as $sJsFileRelPath) {
$oPage->add_linked_script("../$sJsFileRelPath");
$oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot() . "$sJsFileRelPath");
}
}