in Joomla Templates by blazingimages (240 points)

How do I correct source map errors?

First, I noted that there is an error in the output template for Joomla! 4 such that the links to popper.min.js and bootstrap.min.js came out with an extra slash. The error is in index.php which comes out as:
$doc->addScript(JURI::base() .'/templates/' . $this->template . '/js/jui/popper.min.js', 'text/javascript');
$doc->addScript(JURI::base() ./'templates/' . $this->template . '/js/jui/bootstrap.min.js', 'text/javascript');

It should be:
$doc->addScript(JURI::base() .'templates/' . $this->template . '/js/jui/popper.min.js', 'text/javascript');
$doc->addScript(JURI::base() .'templates/' . $this->template . '/js/jui/bootstrap.min.js', 'text/javascript');

After fixing that, however, I get these errors in the console:

Source map error: Error: request failed with status 403 Resource URL: https://mydomain.com/templates/MyTemplate/js/jui/popper.min.js Source Map URL: popper.min.js.map

Source map error: Error: request failed with status 403 Resource URL: https://mydomain.com/templates/MyTemplate/js/jui/bootstrap.min.js Source Map URL: bootstrap.min.js.map

I removed my domain and template from the errors. Where are the map files and how do I fix this error?

1 Answer

by john-smith (1.9k points)

Hey,
Thanks for letting us know about the situation. We'd love to help you with this.
Please create a support ticket and share your website admin credentials so that we can fix the issue at your end.

You can create a support ticket through this link-> https://templatetoaster.com/support.

Interested in localizing/Translating TemplateToaster Software in your native language in exchange of a Pro License ? Contact Us
...