2 tests are necessary:
First on 3.3.6: Install from Extension Manager=>Install languages the French (fr-FR) pack (version 3.3.6.2).
Then install this new upgrade package (a 3.4.0.1 fr-FR pack)
https://www.dropbox.com/s/i2aboaz8pshso5y/fr-FR_joomla_lang_full_3.4.0v1.zip?dl=0
All is OK.
Then install staging and do exactly the same.
I get here:
Warning
Extension Install: Another package is already using the named directory: ROOT/administrator/manifests/packages/fr-FR. Are you trying to install the same extension again?Error
Error installing package
Labels |
Added:
?
|
Category | ⇒ | Administration Components Updating |
Priority | Medium | ⇒ | Urgent |
I found out that package NOW needs method="upgrade" also.
Isn't that how it should have always worked and the fact that it worked
without the "upgrade" setting a bug
On 2 February 2015 at 09:55, infograf768 notifications@github.com wrote:
I found out that package NOW needs method="upgrade" also.
—
Reply to this email directly or view it on GitHub
#5943 (comment).
Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/
That is certainly not B/c and I am not sure it improves anything as the extensions themselves have the method="upgrade" or not.
I'm pretty sure this has been required since 1.6 for extensions. I'd say the bug is that it hadn't been implemented for packages
Indeed, and this is why our install.xml have used the method since, but implementing it now in packages is not B/C, alas.
That means fixing any bug may not be B/C
On 2 February 2015 at 11:18, infograf768 notifications@github.com wrote:
Indeed, and this is why our install.xml have used the method since, but
implementing it now in packages is not B/C, alas.—
Reply to this email directly or view it on GitHub
#5943 (comment).
Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/
Trying to get my head around what the issue is here.
Surely it is simply resolved by ensuring that the 3.4 version of the
language packages correctly use method=upgrade. I see that many already do
that.
What is the use case where you will install the same version of a language
more than once?
My refactorings have exposed a lot of inconsistencies between each extension adapter. Some supported install scripts, others didn't; some upgrades worked without the method="upgrade"
declaration, others correctly raised a warning (BTW, that upgrade thing if I'm not mistaken dates back into 1.5 also). Personally, I'd rather keep the adapters as consistent as possible unless there is a very strong reason to deviate.
I'd suggest https://docs.joomla.org/Manifest_files is the closest thing we have to documentation on the matter and that it "very strongly" suggests that you use method="upgrade"
for all extensions if you intend for them to be updated. Remember that a package is an extension too (albeit a special case one).
I'd suggest https://docs.joomla.org/Manifest_files is the closest thing we have to documentation on the matter and that it "very strongly" suggests that you use method="upgrade" for all extensions if you intend for them to be updated. Remember that a package is an extension too (albeit a special case one).
So, the documentation for packages should be updated, as method has never been mentionned : https://docs.joomla.org/Package
But what would happened if one of the included extension zipped is method install, as the package is method update...?... (EDIT: sorry, stupid question... :-; )
Myself, i always include method, but does every third party extensions using package does ?
EDIT: maybe the issue is just the documentation for packages to be updated including the method ;-)
What is the use case where you will install the same version of a language
more than once.
Also if all 3.4 language packs correctly use method=upgrade, and many do
already, where is the problem?
Trying to understand what the problem is
3.3.6 code snippets:
Component adapter check - https://github.com/joomla/joomla-cms/blob/3.3.6/libraries/cms/installer/adapter/package.php#L113-L129
Package adapter check - https://github.com/joomla/joomla-cms/blob/3.3.6/libraries/cms/installer/adapter/package.php#L113-L129
Packages have been checking for method="upgrade"
since 3.0.0 and have been correcting the internal path to update when the install method is triggered without the second check of verifying that overwriting the extension resources is allowed. That change was made in the old Platform repo and was needed if you were using an install script, for example, in a package extension otherwise it would always trigger the install behavior.
I'll concede that there is a sub-optimal check in the checkExtensionInFilesystem() method in that it scans for the manifest and throws an error using a directory that is only created if a package has an install script. The message should be corrected to use the right resource.
In reading through all the code, a thought that has just crossed my mind is that a check like this is critical to correct operation in the CMS and should be enforced. In previous releases, the package adapter lacks any sanity checks to keep developers from accidentally overwriting a package's manifest or install script. I could release a new version of my own extension and name the package manifest pkg_fr-FR.xml
, populate its contents with the data needed to install my own package, and distribute it. Users wouldn't see an issue until they tried uninstalling something which used that manifest. If my extension was the last to use it and they meant to uninstall the French language package, they would have removed my extension without realizing it. My patches have actually fixed this hole which is enforced in the other adapters to force unique names for extensions, so I would use this fact on its own to NOT change the behavior as it is today.
method="upgrade" has been required to overwrite an already installed extension with a new version since Joomla! 1.5.5. If an extension type didn't check for it and assumed that it's set it is a bug. Developers know better than to rely on bugs to get their code running correctly. The only reason I can think that this was never reported is that a. all developers put method="upgrade" by default on their XML manifests and b. non-developers have no idea what they're doing and why, therefore not realising they are counting on a bug to have their manifest working.
IMHO this is a bug and needs to be fixed. The only impact for non-developers is with language packages and then again we're talking about people deliberately trying to install an old language pack more than once. This isn't really a big deal. An error would make the user wonder if there's a newer package available, yes there is, the package has method="upgrade", no error is thrown any more.
So -1 from me on reverting to the old behaviour.
It looks for me like a bug, method="upgrade" should be required. As Nikolas said relying on bug if you know about or not is a bad idea. We really need to make all this installation code consistent.
Closing this issue as not a regression
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-02-02 14:34:08 |
Status | Closed | ⇒ | Expected Behaviour |
I forecast some issues. Updated the docs. Will inform TTs.
Worth testing also with other extensions creating a manifest
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5943.