Astroid-Framework
Astroid-Framework copied to clipboard
[improvement] Reworking of the "Custom JS Files" Description and Implementation
The Issue:
Define some Custom JS script in multiple lines:
Expectation: the paths of the defined custom JS files are written into the <head>
tag with the form <script src="/misc/custom%20JS/set global variables.js"></script>
Reality: the paths of the defined custom JS files are written into the <head>
tag, but for every but the last loaded file in the form
<script src="/misc/custom%20JS/set global variables.js
"></script>
Notice the appended linefeed on every but the last imported script. This leads to breaking of some joomla plugins.
Hello,
Please use Comma (,) for multi-files.
Example /misc/custom%20JS/set global variables.js, /misc/custom%20JS/set global variables.js, /misc/custom%20JS/set global variables.js
Thank you @chandanndeep , this worked. But please consider changing the "Custom JS Files" Description to something like this:
Also, all but the last sources are now in the form <script src="/misc/custom JS/set global variables.js" ,="" "=""></script>
. The now appended ,="" "=""
declarations are unnecessary. They cause my currently used plugins no trouble though it might be cleaner if the implementation of multiple Custom JS lines would be reworked.
Edit: It only worked, because I forgot to delete the "
symbol in front of every ,
, so my listed custom JS files actually looked like this:
/misc/custom JS/set global variables.js",
/misc/custom JS/get display mode.js",
/misc/custom JS/set display mode.js",
/misc/custom JS/set Menu Toggle.js",
/misc/custom JS/hide header on scroll.js",
/misc/custom JS/JDBuilder/set Accordion Mode.js",
/misc/custom JS/JDBuilder/toggle Tab.js",
/misc/custom JS/astroid.js"
If I remove the "
and only set a ,
, the problem persists.
Edit 2: What actually fixed the issue was to put a "
behind every line, not a ,
:
/misc/custom JS/set global variables.js"
/misc/custom JS/get display mode.js"
/misc/custom JS/set display mode.js"
/misc/custom JS/set Menu Toggle.js"
/misc/custom JS/hide header on scroll.js"
/misc/custom JS/JDBuilder/set Accordion Mode.js"
/misc/custom JS/JDBuilder/toggle Tab.js"
/misc/custom JS/astroid.js"
Now, no line feed character is put into the src=
attribute. I consider this only as a workaround and no a solution though.
@FaySmash
I found, space in file name. Don't use space while creating directory.
Please confirm the astroid version.
@chandanndeep I tried replacing all spaces with _
in the whole file path but this won't change the fact, that a line feed character is but into the src=
attribute. Please note the Edit of my previous comment too.
I'm running astroid 2.3.0
Sure.
@FaySmash Sorry for late reply.
Is your query solved?
@chandanndeep no, I used a workaround by importing resources like this:
It's sub-optimal thought.
@FaySmash
Try without double quote
/misc/custom JS/set global variables.js
/misc/custom JS/get display mode.js
/misc/custom JS/set display mode.js
/misc/custom JS/set Menu Toggle.js
/misc/custom JS/hide header on scroll.js
/misc/custom JS/JDBuilder/set Accordion Mode.js
/misc/custom JS/JDBuilder/toggle Tab.js
/misc/custom JS/astroid.js
@FaySmash
Try without double quote
/misc/custom JS/set global variables.js /misc/custom JS/get display mode.js /misc/custom JS/set display mode.js /misc/custom JS/set Menu Toggle.js /misc/custom JS/hide header on scroll.js /misc/custom JS/JDBuilder/set Accordion Mode.js /misc/custom JS/JDBuilder/toggle Tab.js /misc/custom JS/astroid.js
Compare this listing of resources with mine in the OP, it's exactly the same and and therefore the problem still persists.
It's working perfect. See the screenshot.
Make sure you have not changed custom.php the file or override
Backend
Frontend
Have you tried to right click on one of the highlighted rows and select "Edit as HTML"? Only then the line break will be visible.