JED should require ID for linked assets, especially for external files

Here you can contact the editors of our Extensions site, as well as access infomation relating to this site.

Moderator: JED Team

Forum rules
Forum Rules
READ ME <-- please read before posting, this means YOU.
Post Reply
annahersh
Joomla! Explorer
Joomla! Explorer
Posts: 273
Joined: Wed Aug 15, 2018 8:23 pm

JED should require ID for linked assets, especially for external files

Post by annahersh » Fri Oct 19, 2018 6:02 pm

It is a problem to diagnose conflicts when one has no idea what extension is loading an external resource, example: multiple instances of <link href="//fonts.google.com" or similar.

Like some other CMS, there should be a requirement that extension developers include the extension name as an ID, example: <link id="com-rscomments" href="//fontawesome.com/" or <script id="rs-comments" src="//api.googlescripts.com or even append a query such as fontawsome.css?extension=com-rscomments" />

That would make diagnosis much simpler.

User avatar
sozzled
Joomla! Champion
Joomla! Champion
Posts: 5863
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: JED should require ID for linked assets, especially for external files

Post by sozzled » Fri Oct 19, 2018 6:23 pm

Interesting suggestion. It could be helpful in terms of diagnosing problems (as you say, when external/off-site URIs are involved). I wouldn't make this a mandatory requirement, however.
https://www.kuneze.com/blog
Former member of Kunena project team
If you think I’m wrong then say “I think you're wrong.” If you say “You’re wrong!”, how do you know?

annahersh
Joomla! Explorer
Joomla! Explorer
Posts: 273
Joined: Wed Aug 15, 2018 8:23 pm

Re: JED should require ID for linked assets, especially for external files

Post by annahersh » Fri Oct 19, 2018 10:54 pm

sozzled wrote:
Fri Oct 19, 2018 6:23 pm
I wouldn't make this a mandatory requirement, however.
Do you think developers would be discouraged if it's mandatory? It would certainly serve them well since they would be able to spot their remotely loaded files and determine better processes.

I hate to invoke the WP brand here, but their ID requirement has made it very effective for end users and devs alike.

I was recently diagnosing a site for javascript conflict, and though I could see that 2 additional jquery libraries were being loaded from Google and code.jquery, I did not know what extensions were making the calls, so I ended up downloading the directories just to search for the sources. That should not be.

User avatar
sozzled
Joomla! Champion
Joomla! Champion
Posts: 5863
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: JED should require ID for linked assets, especially for external files

Post by sozzled » Fri Oct 19, 2018 11:45 pm

There have been a number of mandatory requirements imposed on Joomla developers over time and, to be honest, it's a tough gig getting one's products listed. Furthermore, most J! extensions don't involve these kinds of external resource URL references and I doubt that it will add significant benefit in the majority of circumstances where these extensions are responsible for problems. That's why my earlier comment was "interesting".

Please don't "invoke" other CMS deities. This is the J! forum and we should remain focused on Joomla. I really don't care what other CMS platforms do. As I've remarked here, it's tough enough to navigate the many hurdles that Joomla developers have to overcome, to design, construct and test their products and then to get their products to market in the JED. After doing that, Joomla developers are rarely thanked for their work, products are rarely reviewed by users, and there's little encouragement for continuing these efforts save for a few paltry dollars that may find their way into developers' pockets.

There are enough disincentives for Joomla developers: the lack of support, thanks, encouragement and financial rewards. Let's not add any more to discourage Joomla extension development.

So, no, I don't think this should be a mandatory requirement—a further imposition on Joomla developers—for whom (in the majority of cases) the matter is not applicable or, perhaps, inappropriate in the circumstances.
https://www.kuneze.com/blog
Former member of Kunena project team
If you think I’m wrong then say “I think you're wrong.” If you say “You’re wrong!”, how do you know?

User avatar
effrit
Joomla! Guru
Joomla! Guru
Posts: 846
Joined: Sun Nov 12, 2017 2:21 pm
Location: middle of Russia
Contact:

Re: JED should require ID for linked assets, especially for external files

Post by effrit » Sat Oct 20, 2018 5:37 am

i am agree to both :D
and yes, today is hard to get listed on JED so another condition make life even harder.

@annahersh, in such cases u can just manipulate _scripts array in template index.php and delete / sort scrips u dont need via
$scripts = $this->_scripts;

annahersh
Joomla! Explorer
Joomla! Explorer
Posts: 273
Joined: Wed Aug 15, 2018 8:23 pm

Re: JED should require ID for linked assets, especially for external files

Post by annahersh » Sat Oct 20, 2018 9:38 pm

effrit wrote:
Sat Oct 20, 2018 5:37 am
@annahersh, in such cases u can just manipulate _scripts array in template index.php and delete / sort scrips u dont need via
$scripts = $this->_scripts;
Or I could install an extension such as jquery easy and set the scripts I want removed, but that's not the purpose here. I have no issue with my personal websites since I do check the extension configurations and if it has a method to disable scripts I will do so.

However the problem is when I get a client with a dysfunctional Joomla site because they installed many extensions and left all the scripts at default enabled. It just would be so much easier to quickly view the source code and spot the extension sources that load external scripts.

User avatar
effrit
Joomla! Guru
Joomla! Guru
Posts: 846
Joined: Sun Nov 12, 2017 2:21 pm
Location: middle of Russia
Contact:

Re: JED should require ID for linked assets, especially for external files

Post by effrit » Sun Oct 21, 2018 2:35 am

@annahersh, and what the difference between "using jqueryeasy" and "deleting code from some extension" ?
for me, better way is not hack the extension (because of future updates). so u must make the solution, not the temporary patch. and solution is - kill any jquery/jquery.min implementation and loading only one as first script of the page.
so the better solution for client is a plugin.


Post Reply

Return to “extensions.joomla.org - Feedback/Information”