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

Merged
merged 4 commits into from
Feb 2, 2025

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
Contributor

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
@Hackwar Hackwar merged commit 58b0f85 into joomla:5.2-dev Feb 2, 2025
0 of 2 checks passed
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Feb 2, 2025
@Hackwar Hackwar added this to the Joomla! 5.2.4 milestone Feb 2, 2025
@Hackwar
Copy link
Member

Hackwar commented Feb 2, 2025

Thank you for this contribution!

@Fedik Fedik deleted the fix-44759 branch February 3, 2025 08:02
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
5 participants