[bug] admin.js file loaded from site side #976

Closed
opened 2023-02-15 18:53:48 +00:00 by jcodewalker · 1 comment

Steps to reproduce the issue

add javascript to component

Expected result

admin.js loaded from "/administrator/.../assets/js/admin.js

Actual result

admin.js loaded from "/components/.../assets/js/admin.js

System information (as much as possible)

  • OS Name & Version:
  • MySql Version:
  • Apache Version:
  • PHP Version: 7.4
  • Joomla Version: 3.10.11
  • JCB Version: 3.1.13
  • Browser:

Additional comments

Same as admin.css

### Steps to reproduce the issue add javascript to component ### Expected result admin.js loaded from "/administrator/.../assets/js/admin.js ### Actual result admin.js loaded from "/components/.../assets/js/admin.js ### System information (as much as possible) - OS Name & Version: - MySql Version: - Apache Version: - PHP Version: 7.4 - Joomla Version: 3.10.11 - JCB Version: 3.1.13 - Browser: ### Additional comments Same as admin.css
Owner

Please note that the script is referenced as follows:

<script src="components/com_demo/assets/js/admin.js"></script>

It is not referenced as:

<script src="/components/com_demo/assets/js/admin.js"></script>

image

As you can see from the attached image, this is a relative path and does successfully load the admin area JavaScript file.

While we could make it a root-relative link, using a relative path to the application entry-point is more appropriate, especially as we move towards potentially implementing a dynamic admin path.

If you have any further questions or concerns, please let me know and I will be happy to address them.

Please note that the script is referenced as follows: ``` <script src="components/com_demo/assets/js/admin.js"></script> ``` It is not referenced as: ``` <script src="/components/com_demo/assets/js/admin.js"></script> ``` ![image](/attachments/416d00a5-d797-4521-97b7-a31b6bbe2581) As you can see from the attached image, this is a relative path and does successfully load the admin area JavaScript file. While we could make it a root-relative link, using a relative path to the application entry-point is more appropriate, especially as we move towards potentially implementing a dynamic admin path. If you have any further questions or concerns, please let me know and I will be happy to address them.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: joomla/Component-Builder#976
No description provided.