diff --git a/src/administrator/components/com_weblinks/tmpl/weblinks/modal.php b/src/administrator/components/com_weblinks/tmpl/weblinks/modal.php index 0a451578ae..d077b3e653 100644 --- a/src/administrator/components/com_weblinks/tmpl/weblinks/modal.php +++ b/src/administrator/components/com_weblinks/tmpl/weblinks/modal.php @@ -26,7 +26,7 @@ } HTMLHelper::_('behavior.multiselect'); -$this->document->getWebAssetManager() +$this->getDocument()->getWebAssetManager() ->registerAndUseScript('com_weblinks.admin-weblinks-modal', 'media/com_weblinks/js/admin-weblinks-modal.js', [], ['defer' => true], ['core']); $function = $app->getInput()->getCmd('function', 'jSelectWeblink'); $editor = $app->getInput()->getCmd('editor', ''); @@ -36,7 +36,7 @@ $multilang = Multilanguage::isEnabled(); if (!empty($editor)) { // This view is used also in com_menus. Load the xtd script only if the editor is set! - $this->document->addScriptOptions('xtd-weblinks', ['editor' => $editor]); + $this->getDocument()->addScriptOptions('xtd-weblinks', ['editor' => $editor]); $onclick = "jSelectWeblink"; } diff --git a/src/components/com_weblinks/tmpl/categories/default.php b/src/components/com_weblinks/tmpl/categories/default.php index be1d782689..f96c145c66 100644 --- a/src/components/com_weblinks/tmpl/categories/default.php +++ b/src/components/com_weblinks/tmpl/categories/default.php @@ -18,7 +18,7 @@ Text::script('JGLOBAL_EXPAND_CATEGORIES'); Text::script('JGLOBAL_COLLAPSE_CATEGORIES'); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ -$wa = $this->document->getWebAssetManager(); +$wa = $this->getDocument()->getWebAssetManager(); $wa->getRegistry()->addExtensionRegistryFile('com_categories'); $wa->usePreset('com_categories.shared-categories-accordion');