Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.2] Web Asset Manager incorect loading of external resource with / at the end #44774

Open
wants to merge 2 commits into
base: 5.2-dev
Choose a base branch
from

Conversation

Fedik
Copy link
Member

@Fedik Fedik commented Jan 24, 2025

Pull Request for Issue #44759 .

Summary of Changes

Fix for Web Asset Manager incorectly loading an external resource with / at the end

Testing Instructions

Add in to index.php of the site template:

$wa->registerAndUseScript('example.foobar', 'https://example.com/foobar/');
$wa->registerAndUseScript('example.esm', 'foobar/', ['importmap' => true]);

Open site page and check the source code, the header section with scripts.

Actual result BEFORE applying this Pull Request

The path for external script is incorrect, importmap works.

<script type="importmap">{"imports":{"example.esm":"/site-folder/foobar/"}}</script>
...
<script src="/blabla/site-folder/https://example.com/foobar/"></script>

Expected result AFTER applying this Pull Request

The path for external script is correct, importmap works

<script type="importmap">{"imports":{"example.esm":"/site-folder/foobar/"}}</script>
...
<script src="https://example.com/foobar/"></script>

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:
  • No documentation changes for docs.joomla.org needed
  • Pull Request link for manual.joomla.org:
  • No documentation changes for manual.joomla.org needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Web Asset Manager issue loading external resource ends with / character
2 participants