? ? ? Pending

User tests: Successful: Unsuccessful:

avatar roland-d
roland-d
14 Jul 2019

Redo

This is a redo of #17575 as I can no longer push to the original repo.

Introduction

Currently there is no clear overview of which extensions have download keys to make users download their extensions with an extra_query with their keys included to allow the download. Developers have been currently hacking this system by creating their own view to add a download key to the extra_query field in the #__update_sites table (Example of an extra_query field: dlid=key&dummy=my.zip).
Each extension developer may have a different way to build this extra query so the idea is to make a view to manage and insert the download keys of all extensions in a single view in com_installer.

To set or customize the prefix and suffix of the download key you need to have an tag with prefix and suffix in your installation file like this:

<dlid prefix="dlid=" suffix="&amp;dummy=my.zip"/>
(note: remember to close />)

If an extension has no download ID set in the manifest file, the download key will show up as N/A in the list and will not be editable.

Testing Instructions

Here are the extensions to test the feature. I have not included all types as I think these 3 already make clear what this is about.

  1. Run the MySQL update query or the Postgres update query depending on the database you use
  2. Apply the patch
  3. Install the extensions below
    Component
    keycomponent.zip
    Plugin:
    keyplugin.zip
    Module:
    keymodule.zip
  4. Go to System -> Update Sites

image

The list shows just the name of the extension and the update site URL.

  1. Clicking on the extension name will open the Edit screen.

image

5. Enter a download Key 6. Click on Save & Close 7. The download key will now be shown in the list

image

The Download Key is shown without the prefix and suffix. Only the developer will be responsible to define the prefix and suffix of the download key.

You are going to need a real extension with a download key to see if the download key is send. For now you could also check the database by doing this:

  1. Go to the table __update_sites table
  2. Check the field extra_query for the extension where you added the download key. It should have the format of prefix key suffix

Expected result

A simple a intuitive way to the user manage his download keys and less work to the developers to create a view to generate the extra_query

Actual result

There is no single place to manage your download keys.

Documentation Changes Required

Yes, once merged I will write a document on how to incorporate the tags in the installer XML

b1674fd 16 Jul 2017 avatar NunoLopes96 phpcs
120f6c1 25 Jul 2017 avatar NunoLopes96 phpcs
b03260f 17 Aug 2017 avatar NunoLopes96 merge
avatar roland-d roland-d - open - 14 Jul 2019
avatar roland-d roland-d - change - 14 Jul 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 14 Jul 2019
Category Administration com_cpanel com_installer com_plugins Language & Strings Libraries
avatar mbabker
mbabker - comment - 14 Jul 2019

I still don't believe this is a core responsibility. Has anyone gauged interest among the extension ecosystem to determine how many vendors would provide support for this instead of their own solutions? Because without ecosystem support, you're going to have a interface in core that end users think they are going to be able to use but the reality of it is if extensions don't support it it's just going to confuse the heck out of users wondering why they can't use a core feature.

These types of projects come across as core looking for problems to solve without figuring out if it is a real problem to be solved (or moreso someone not liking the fact that extension responsibilities are left to the extension to be implemented).

avatar joeforjoomla
joeforjoomla - comment - 14 Jul 2019

Agree with @mbabker
I don't think this feature is widely used in the Joomla ecosystem.
Additionally, having such a feature in the core would be even more confusing for end users and developers.

avatar roland-d roland-d - change - 15 Jul 2019
Labels Added: ? ?
avatar rdeutz
rdeutz - comment - 15 Jul 2019

I can see a value in this, we have build a complete extension install from our backend and extensions make Joomla great even if you can do a lot with core.

avatar MastersOfMedia
MastersOfMedia - comment - 15 Jul 2019

The points raised by @mbabker and @joeforjoomla are, with all due respect, part of a chicken/egg discussion. If we want to improve the handling of download/update keys, and thus updates themselves (which is much needed imho), something needs to be done. The current situation where we leave this to developers is confusing and time-consuming to both end-users and developers. In my own experience, a lot of my customers leave extensions unpatched/not updated because they can not be updated with the built-in updater. This is an undesired effect of the current situation, unwanted for all of us.

If such a feature will become part of the Joomla! core, and we could persuade at least a number of developers to participate and make use of it, this could be a very strong feature and make Joomal! even more user-friendly

Erik

avatar joeforjoomla
joeforjoomla - comment - 15 Jul 2019

@MastersOfMedia with all due respect for you, imho i see this as something optional given that only a small subset of paid extension use it and that must be managed by the extension itself when and if needed, not by the Joomla core.

avatar mbabker
mbabker - comment - 15 Jul 2019

In my own experience, a lot of my customers leave extensions unpatched/not updated because they can not be updated with the built-in updater. This is an undesired effect of the current situation, unwanted for all of us.

This pull request is not going to fix that. It's still up to the developer to build support into their extensions to use the updater, just like it's still going to be up to the developer to build support into their extensions to use a core "owned" download key manager. Who says this key manager is going to work with all of the systems that developers are presently using for their extensions, or that developers are going to commit to rewriting their extensions (and possibly their backend systems validating things) to use this system when they already have a working system (basically, why make change for the sake of change).

Is it useful? Yes. Is this core territory? IMO, no. And if it were core territory, there would have been more feature requests asking for it over the years, unless I've had my head buried in the sand this only came up within the GSoC team the year the project was accepted (which is part of my reason for the "core looking for problems to solve" comment before).

avatar cpaschen
cpaschen - comment - 15 Jul 2019

I agree with everyone ... we need it, it shouldn't be in the core, its a chicken/egg thing.
I think the best solution would be for one of the major extension developers (akeeba/regular labs) to develop this as an extension first that all can use. THEN once it has lots of user and developers using it (which would only happen if one of those MAJOR extension devs release it) it could get to the point where other developers use it and THEN it might be wise to have it in the core.
But until something like that happens, I agree, it might be more 'excess core never used' feature (and I agree, might be more confusing to users).
So ... anyone else willing to pick this up and run with it?

avatar wilsonge
wilsonge - comment - 23 Jul 2019

@cpaschen the download key system (which has been around for a while just without a UI) already came from akeeba (i don't know if nic still does use this as he decouples his stuff more and more from Joomla Core). However there's no central place to manage this. I believe this does have a place in core as the questions on how to use the download key in modules and plugins (and there was no easy way). So I believe this is actually fine for Joomla as long as extensions opt into it in their XML files (so only extensions that use the Joomla Download Key mechanism show up in the list of extensions to add a key to)

avatar brianteeman
brianteeman - comment - 27 Jul 2019

Please look at how I added a <caption> to tables

<caption id="captionTable" class="sr-only">
<?php echo Text::_('COM_CONTACT_TABLE_CAPTION'); ?>, <?php echo Text::_('JGLOBAL_SORTED_BY'); ?>
</caption>

avatar brianteeman
brianteeman - comment - 27 Jul 2019

Is there a reason that this is seperate from com_installer&view=updatesites

avatar roland-d
roland-d - comment - 28 Jul 2019

@brianteeman

Is there a reason that this is seperate from com_installer&view=updatesites

None other than that nobody thought about it or asked about it. I do agree, it might be better integrated there. Especially since most of the data is all the same.

I am going to make the changes and integrate it there.

avatar brianteeman
brianteeman - comment - 28 Jul 2019

I am going to make the changes and integrate it there.

Great. It will make things much easier going forward. Less duplicate code to maintain etc etc

avatar roland-d
roland-d - comment - 28 Jul 2019

@brianteeman How is this looking?

image

I placed the download key under the update site name and XML URL.

avatar brianteeman
brianteeman - comment - 28 Jul 2019

It would need some sort of label

avatar wilsonge
wilsonge - comment - 28 Jul 2019

How does the the update site list view work when an extension has more than 1 update site (like core for example). Is it multiple rows in that list (in which case download keys don't work) or is it multiple text boxes for a single extension?

avatar brianteeman
brianteeman - comment - 28 Jul 2019

Update site list view
image

Where are the multiples?

avatar roland-d
roland-d - comment - 28 Jul 2019

@wilsonge The number of update sites is irrelevant to the key. A users download key (or extra_query as Joomla calls it) is still going to be the same. Per update site you can only enter 1 download key as this is how the database schema is.

avatar joomla-cms-bot joomla-cms-bot - change - 28 Jul 2019
Category Administration com_cpanel com_installer com_plugins Language & Strings Libraries Administration com_installer com_plugins Language & Strings Libraries
avatar joomla-cms-bot joomla-cms-bot - change - 28 Jul 2019
Category Administration com_installer com_plugins Language & Strings Libraries Administration com_installer com_plugins Language & Strings
avatar joomla-cms-bot joomla-cms-bot - change - 28 Jul 2019
Category Administration com_installer com_plugins Language & Strings Administration com_installer Language & Strings
avatar wilsonge
wilsonge - comment - 31 Jul 2019

@roland-d just to check this is still work in progress - because this PR seems pretty broken since your changes 3 days ago :)

avatar roland-d
roland-d - comment - 1 Aug 2019

@wilsonge Yes I am aware it is broken. Hoping to fix it over the next few days. Today busy with my new site launch.

avatar wilsonge
wilsonge - comment - 1 Aug 2019

No stress. Just making sure :)

avatar joomla-cms-bot joomla-cms-bot - change - 3 Aug 2019
Category Administration com_installer Language & Strings SQL Administration com_admin Postgresql com_installer Language & Strings Installation
avatar wilsonge
wilsonge - comment - 25 Aug 2019

Is this ready for testing again?

avatar roland-d roland-d - change - 25 Aug 2019
The description was changed
avatar roland-d roland-d - edited - 25 Aug 2019
avatar roland-d roland-d - change - 25 Aug 2019
The description was changed
avatar roland-d roland-d - edited - 25 Aug 2019
avatar roland-d roland-d - change - 26 Aug 2019
The description was changed
avatar roland-d roland-d - edited - 26 Aug 2019
avatar roland-d roland-d - change - 26 Aug 2019
The description was changed
avatar roland-d roland-d - edited - 26 Aug 2019
avatar roland-d roland-d - change - 26 Aug 2019
The description was changed
avatar roland-d roland-d - edited - 26 Aug 2019
avatar roland-d
roland-d - comment - 26 Aug 2019

@wilsonge Yes, it is ready for testing again. I have updated all the instructions to reflect the latest changes.

Also pinging @sanderpotjer

avatar rdeutz
rdeutz - comment - 26 Aug 2019

@roland-d could you fix the phpcs stuff, thanks.

avatar roland-d
roland-d - comment - 26 Aug 2019

@rdeutz I gave it a try, let's see if the system is happy now :)

avatar roland-d
roland-d - comment - 26 Aug 2019

@rdeutz The errors now is not something I have a clue about how to fix and seem unrelated to this PR.

avatar bees4ever bees4ever - test_item - 3 Sep 2019 - Tested successfully
avatar bees4ever
bees4ever - comment - 3 Sep 2019

I have tested this item successfully on 8758172

I just compared the database table #__update_sites where in the field extra_query it is stored correctly. One thing mentionend: The example component has a spelling error where the xml file defining the "donwload key part" has a key sufix, but it should call suffix with double f. For some tester it could be useful to change that to see that the patch works correct.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25553.

avatar VladikB VladikB - test_item - 4 Sep 2019 - Tested successfully
avatar VladikB
VladikB - comment - 4 Sep 2019

I have tested this item successfully on 8758172

As bees4ever wrote, I had to edit the keycomponent/downloadkeytestcomponent.xml .


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25553.
avatar VladikB
VladikB - comment - 4 Sep 2019

I have tested this item successfully on 8758172

As bees4ever wrote, I had to edit the keycomponent/downloadkeytestcomponent.xml from
to .


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25553.
avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Sep 2019
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 4 Sep 2019

Status "Ready To Commit". 1 build failing.

avatar wilsonge wilsonge - close - 4 Sep 2019
avatar wilsonge wilsonge - merge - 4 Sep 2019
avatar wilsonge wilsonge - change - 4 Sep 2019
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-09-04 14:59:15
Closed_By wilsonge
Labels Added: ?
avatar wilsonge
wilsonge - comment - 4 Sep 2019

Thanks!

avatar roland-d
roland-d - comment - 4 Sep 2019

Thank you thank you thank you

avatar roland-d
roland-d - comment - 14 Sep 2019

Add documentation for this feature: https://docs.joomla.org/Manifest_files

Add a Comment

Login with GitHub to post a comment