We have an old acymailing module that we are not using and is flagged as a potential upgrade problem for upgrading to Joomla 4 and we want to uninstall it.
We are on php 8.0 and Acymailing 8.1.2. The module is:

AcyMailing Module
Site Module 3.7.0 September 2009 Acyba

When uninstalling, we get the error:
An error has occurred.
0 Undefined constant "JPATH_"
/public_html/libraries/src/Installer/Adapter/ModuleAdapter.php:214

Call stack

Function Location

1 () JROOT/libraries/src/Installer/Adapter/ModuleAdapter.php:214
2 constant() JROOT/libraries/src/Installer/Adapter/ModuleAdapter.php:214
3 Joomla\CMS\Installer\Adapter\ModuleAdapter->loadLanguage() JROOT/libraries/src/Installer/Adapter/ModuleAdapter.php:578
4 Joomla\CMS\Installer\Adapter\ModuleAdapter->uninstall() JROOT/libraries/src/Installer/Installer.php:776
5 Joomla\CMS\Installer\Installer->uninstall() JROOT/administrator/components/com_installer/models/manage.php:246
6 InstallerModelManage->remove() JROOT/administrator/components/com_installer/controllers/manage.php:112
7 InstallerControllerManage->remove() JROOT/libraries/src/MVC/Controller/BaseController.php:702
8 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/administrator/components/com_installer/installer.php:19
9 require_once() JROOT/libraries/src/Component/ComponentHelper.php:402
10 Joomla\CMS\Component\ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:377
11 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:101
12 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:159
13 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:225
14 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/index.php:51

Any ideas in helping to uninstall this?

Hi,

This is the issue with the missing files and folders in your Joomla paths

Try to install AcyMailing v5 installation package again, so Joomla can set up all the DB information correctly and then try to uninstall it again

14 days later

I also see this issue. Having Reinstalled AcyMailing v5 (latest version), but when I then select all items in Extensions >> Manage with AcyMailing in the title, and choose Uninstall, only the component is uninstalled. The remaining plug-ins and module remain and I see the

0 Undefined constant "JPATH_"

error

C

    tapiochre

    Can you try to uninstall the plugins and module and afterwards uninstall the component?

    a month later

    I have the same issue, that the module couldn't be uninstalled.

    Update to Joomla 4 did nevertheless work.

    but also when trying to manage uninstall the modul there, I get the same error message and the modul remains installed.

    It doesn't bother that it's there but it's also not so nice that it still remains

    Same here, unable to uninstall Acy5 module and plugins with this error, neither from Joomla 3, nor from Joomla 4, after the upgrade.

    7 months later
    13 days later

    [unknown] I can confirm that switching to PHP v7.4 solved this issue. There was no need to reinstall version 5, then try to uninstall the module, then uninstall version 5 again as suggested above. Simply temporarily switching to PHP v7.4 allowed the uninstall to work normally.

    2 months later

    Just in case someone else is looking for this:
    Both suggestions did not work for me

    • PHP 7 was already deactivated at my hosting provider
    • Reinstall of v5 did not work since I already upgraded

    So I basically removed the module manually:

    • Folder ./modules/mod_acymailing (crosscheck the xml in this folder that you delete the right version)
    • #__extensions table, entry mod_acymailing (be very cautious with this table!!!)