MANIFEST-SCRIPT-UNINSTALL-001
preflight($type) assuming install only
script.php preflight only on install
Joomla 4 runs installer scripts on uninstall for all extension types. Plugin SQL vs script order also flipped to script-then-SQL.
preflight($type) assuming install only → Handle uninstall/update in preflight and postflight
Symptoms people search
uninstall 500 in script.php · plugin sql order
Replace this code
Swap preflight($type) assuming install only for Handle uninstall/update in preflight and postflight.
Joomla 3
Remove or stop calling this
public function preflight($type, $parent) {
// ran on install only in some J3 types
}Joomla 4 / 6
Use this instead
public function preflight($type, $parent) {
if ($type === 'uninstall') { /* also runs on J4+ */ }
}How to fix it
- 1Guard preflight/postflight by $type.
- 2Do not assume uninstall SQL ran before the script.
Also known as
script.php · preflight · postflight · uninstall
Related issues
- Joomla 3 → 4Joomla API
JSubMenuHelper
JSubMenuHelper::addEntry() → HTMLHelper::_('sidebar.addEntry') plus the sidebar view placeholder
- Joomla 3 → 4Manifest / installer
Missing <namespace> in the manifest
<extension> without namespace → <namespace path="src">Vendor\Component\Name</namespace>
- Joomla 3 → 4Manifest / installer
Updater client 0 / 1 integers
<client>0</client> → site / administrator strings
- Joomla 3 → 4SQL / schema
SQL Server driver
sqlsrv → MySQL / MariaDB / PostgreSQL
- Joomla 3 → 4Joomla API
JSession::clear($key) now clears everything
$session->clear('mynamespace') → $session->remove($key)
- Joomla 3 → 4PHP
JString / StringHelper
JString → Joomla\String\StringHelper