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

@@ -350,7 +350,7 @@ try
case 'stimulus': // Form displayed when applying a stimulus (state change)
case 'apply_stimulus': // Form displayed when applying a stimulus (state change)
foreach (ObjectController::EnumRequiredForModificationJsFilesRelPaths() as $sJsFileRelPath) {
$oP->add_linked_script("../$sJsFileRelPath");
$oP->add_linked_script(utils::GetAbsoluteUrlAppRoot() . "$sJsFileRelPath");
}
break;
}