I am testing the migration to Joomla 4 for an existing project. I have successfully updated Joomla by deinstalling AWO Coupon version 3 upgrading and then installing version 4 of AWO Coupon. Now I get the error message below. I did a print_r(AC()); the output is added below. The AC()->store is empty therefore the line 301:
elseif( method_exists( AC()->store, 'html_main_menu' ) ) {
fails. I have no idea why that happens. The only thing suspicious is that AWOCOUPON_VERSION_DB is still 3.6.0.10.
0 method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given
Call stack
# Function Location
1 () JROOT/administrator/components/com_awocoupon/awocoupon/admin/class-awocoupon-admin-menu.php:303
2 method_exists() JROOT/administrator/components/com_awocoupon/awocoupon/admin/class-awocoupon-admin-menu.php:303
3 AwoCoupon_Admin_Menu->print_menu() JROOT/administrator/components/com_awocoupon/awocoupon/admin/class-awocoupon-admin-menu.php:32
4 AwoCoupon_Admin_Menu->process() JROOT/administrator/components/com_awocoupon/awocoupon/admin/class-awocoupon-admin-admin.php:25
5 AwoCoupon_Admin_Admin::display() JROOT/administrator/components/com_awocoupon/src/Controller/DisplayController.php:40
6 AwoDev\Component\AwoCoupon\Administrator\Controller\DisplayController->display() JROOT/libraries/src/MVC/Controller/BaseController.php:672
7 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/libraries/src/Dispatcher/ComponentDispatcher.php:143
8 Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:355
9 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:143
10 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:186
11 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:294
12 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/includes/app.php:61
13 require_once() JROOT/administrator/index.php:32
Call stack
# Function Location
1 () JROOT/administrator/components/com_awocoupon/awocoupon/admin/class-awocoupon-admin-menu.php:303
2 method_exists() JROOT/administrator/components/com_awocoupon/awocoupon/admin/class-awocoupon-admin-menu.php:303
3 AwoCoupon_Admin_Menu->print_menu() JROOT/administrator/components/com_awocoupon/awocoupon/admin/class-awocoupon-admin-menu.php:32
4 AwoCoupon_Admin_Menu->process() JROOT/administrator/components/com_awocoupon/awocoupon/admin/class-awocoupon-admin-admin.php:25
5 AwoCoupon_Admin_Admin::display() JROOT/administrator/components/com_awocoupon/src/Controller/DisplayController.php:40
6 AwoDev\Component\AwoCoupon\Administrator\Controller\DisplayController->display() JROOT/libraries/src/MVC/Controller/BaseController.php:672
7 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/libraries/src/Dispatcher/ComponentDispatcher.php:143
8 Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:355
9 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:143
10 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:186
11 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:294
12 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/includes/app.php:61
13 require_once() JROOT/administrator/index.php:32
AwoCoupon Object
(
[version] => 4.0.0.6
[db] => AwoCoupon_Helper_Database Object
(
)
[helper] => AwoCoupon_Helper_Helper Object
(
[is_check_dbupdate:protected] => 1
)
[param] => Awocoupon_Library_Param Object
(
)
[store_id] =>
[store] =>
[storecurrency] =>
[storediscount] =>
[storegift] =>
[coupon] => AwoCoupon_Library_Coupon Object
(
)
[lang] => AwoCoupon_Helper_Language Object
(
)
[profile] => Awocoupon_Library_Profile Object
(
)
)
(
[version] => 4.0.0.6
[db] => AwoCoupon_Helper_Database Object
(
)
[helper] => AwoCoupon_Helper_Helper Object
(
[is_check_dbupdate:protected] => 1
)
[param] => Awocoupon_Library_Param Object
(
)
[store_id] =>
[store] =>
[storecurrency] =>
[storediscount] =>
[storegift] =>
[coupon] => AwoCoupon_Library_Coupon Object
(
)
[lang] => AwoCoupon_Helper_Language Object
(
)
[profile] => Awocoupon_Library_Profile Object
(
)
)