User tests: Successful: Unsuccessful:
When an extension has a new update site url, then a new update site is created and the update manager contains two update sites for the same extension. This pr updates the location only when an update site exists for an existing extension.
update_sites
table the location of the newly installed extension by appending something like &demo=1
to the url.There are two update sites for the same extension.
Only one update site for the extension.
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
Status | New | ⇒ | Pending |
Category | ⇒ | Front End Plugins |
I have tested this item ✅ successfully on 86c9c07
I have tested this item ✅ successfully on 86c9c07
Thank you very much, this is so inconspicuous but sooo important.
Status | Pending | ⇒ | Ready to Commit |
RTC
Labels |
Added:
RTC
bug
PR-5.3-dev
|
As an extension can have multiple update sites, I had to add an additional check if there is only one update site. This still covers the majority of use cases. Can you guys give this pr another test?
Do you still need tests? Because you deleted the post on Mattermost.
If there were two update sites previously, and in an update there is only one, doesn't it make sense to delete the old ones?
As I did a change, would be good to get some new tests.
Post on Matermost is still there.
Tested the simple version.
Now I tried to install an extension with two update servers over the old extension.
One DB entry, and the URL of the second server element is used to update the old update URL in DB.
If I remove the extension, DB entries vanish. If I install the version with two server entries, only one is in DB.
So seems, only one entry is added to #__update_sites no matter how many entries in the xml.
If I change back to the original Joomla.php, two entries are added.
PS. So for testing we need to check the changes.
And on new extension install.
Status | Ready to Commit | ⇒ | Pending |
Can you test this also without the patch? Pretty sure it is the same behavior.
I tested with the original Joomla.php. That one creates 2 entries.
There is a return added. Maybe that one.
EDIT: Removed that return, installs two update sites.
I'll test the other versions.
But the return comes only into action when there is one update site.
As it looks to me now, is it possible that addUpdateSite() is called twice?
So the logic for two different update sites is outside of the scope of this?
EDIT: Ah, there is processUpdateSites() in the same file which runs through a loop.
For two sites it is not possible to determine which one has updated. This needs to be handled in a different pr. This one here is only when there is one update site, which I guess most extensions have.
I think the logic has to go into processUpdateSites(), and from there, add another parameter for the IDs.
After that, calling addUpdateSite() and maybe new functions updateUpdateSite(), deleteUpdateSite().
Result at the moment:
Installing of extensions with one update site works, updating removes the update server alltogether.
Extensions with two update servers get only one entry: The name is of server 1, the URL of server 2.
@StefanSTS thanks for your extensive testing. Can you confirm that there is a different behavior without the patch? Because I'm not removing an update site at all in this pr.
Labels |
Removed:
RTC
|
After the latest change, I can install an extension with 2 update sites, and they both show up in the list. Fixed.
Updating a "single update site" extension with another one, updates the URL. Works.
So that is all fine and works better now than before.
The only issue is the update site name <server....>name.
That name stays the same even if the URL is changed. If the name could be adjusted, that would work perfect.
Updating a "two update site" extension creates another pair of update sites, but as you said, that's for another day.
So as far as I can see this works as you intended (minus the name change).
.
I would say that the name is not that important as the location, but feel free to open an issue for the name update. Not sure how to solve this as it would require the same logic as with the location which would be another two queries. Can you mark in the tracker your test as successful? So we can move on with this one.
I have tested this item ✅ successfully on 16fab56
Stefan tested with multiple locations, so it would be very good to have a test also with one location in the extension manifest.
I have tested this item ✅ successfully on 07323bb
Tested only with one updateserver, but works as expected.
Status | Pending | ⇒ | Ready to Commit |
rtc
Labels |
Added:
RTC
|
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2025-05-12 12:42:31 |
Closed_By | ⇒ | rdeutz |
Thanks
Works as expected.
Pre testing:
Installed a component. Got one update server.
Installed the component with a different update server URL. Got two update servers in Joomla backend and DB tables.
Uninstalled extension. DB entries gone.
After applying the code to J 5.3 Joomla.php.
Different from the test instructions I used the installer with two different update server URL. Which would be the normal use case.
Installed component. got one update server.
Installed the component with different update server URL. Only one entry in DB and value for update site changed. No second entry.