Labels |
Added:
?
?
|
as far as I remember than this should only run when you come from a version less than 3.7.0, not sure what is different with reinstall, will have a look
Maybe because of the beta#
added?
The preflight
hook in the core script.php
file runs after the package has been extracted by restore.php
. So at that point it is already going to have the new version number, so $this->fromVersion
is unreliable (it will always be the version you've upgraded to at least with the "normal" path and I sure hope the manual upload steps do things in the same order).
The core update system doesn't follow the same order of operations as an extension update, basically everything in script.php
is a post filesystem update operation instead of having hook points before the filesystem updates are performed. You would have to add hooks into other parts of com_joomlaupdate
if you really wanted to have a pre-filesystem operation.
Your postflight
check will need to be a query to determine if the item exists first then create one if one isn't found.
Last time as I checked it, the formVersion was the old version because it comes from the manifest cache and the preflight runs before the manifest cache gets updated. Only looking if the item exists doesn't work because someone could delete the extension (direct road to hell), but that's the reason I did it this way. I'll add the check if the menu item exists. Than we are save
Oh, I missed the manifest cache part. In that case you should be fine.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-02-24 20:43:42 |
Closed_By | ⇒ | rdeutz |
Labels |
Removed:
?
|
can confirm issue.