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 3 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

@QuyTon
Copy link

QuyTon commented Jan 28, 2025

I have tested this item ✅ successfully on aef35a9


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44774.

@pe7er pe7er self-assigned this Jan 30, 2025
@pe7er
Copy link
Contributor

pe7er commented Jan 30, 2025

I have tested this item ✅ successfully on aef35a9


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44774.

@pe7er
Copy link
Contributor

pe7er commented Jan 30, 2025

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44774.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug PR-5.2-dev RTC This Pull Request is Ready To Commit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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