Open nzimas opened 1 year ago
There is a Joomla 4 compatibility issue in plugins/system/cck/cck.php, in line 456.
In Joomla 4, params is a protected property. To access it, you should use the getParams() method which will return an instance of the Registry class.
I have changed $urlvars = $item->params->get( 'urlvars' ); to $urlvars = $item->getParams()->get('urlvars');
and now the extended user profile edit view loads correctly.
Without this change, the following error is thrown when a user tries to edit their extended user profile (which is routed from com_user to com_cck).
0 - Cannot access protected property Joomla\CMS\Menu\MenuItem::$params
Call stack
1 () JROOT/plugins/system/cck/cck.php:456 2 plgSystemCCK->onAfterDispatch() JROOT/libraries/src/Plugin/CMSPlugin.php:279 3 Joomla\CMS\Plugin\CMSPlugin->Joomla\CMS\Plugin{closure}() JROOT/libraries/vendor/joomla/event/src/Dispatcher.php:486 4 Joomla\Event\Dispatcher->dispatch() JROOT/libraries/src/Application/EventAware.php:107 5 Joomla\CMS\Application\WebApplication->triggerEvent() JROOT/libraries/src/Application/SiteApplication.php:213 6 Joomla\CMS\Application\SiteApplication->dispatch() JROOT/libraries/src/Application/SiteApplication.php:249 7 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:294 8 Joomla\CMS\Application\CMSApplication->execute() JROOT/includes/app.php:61 9 require_once() JROOT/index.php:32
There is a Joomla 4 compatibility issue in plugins/system/cck/cck.php, in line 456.
In Joomla 4, params is a protected property. To access it, you should use the getParams() method which will return an instance of the Registry class.
I have changed $urlvars = $item->params->get( 'urlvars' ); to $urlvars = $item->getParams()->get('urlvars');
and now the extended user profile edit view loads correctly.
Without this change, the following error is thrown when a user tries to edit their extended user profile (which is routed from com_user to com_cck).
0 - Cannot access protected property Joomla\CMS\Menu\MenuItem::$params
Call stack
Function Location
1 () JROOT/plugins/system/cck/cck.php:456 2 plgSystemCCK->onAfterDispatch() JROOT/libraries/src/Plugin/CMSPlugin.php:279 3 Joomla\CMS\Plugin\CMSPlugin->Joomla\CMS\Plugin{closure}() JROOT/libraries/vendor/joomla/event/src/Dispatcher.php:486 4 Joomla\Event\Dispatcher->dispatch() JROOT/libraries/src/Application/EventAware.php:107 5 Joomla\CMS\Application\WebApplication->triggerEvent() JROOT/libraries/src/Application/SiteApplication.php:213 6 Joomla\CMS\Application\SiteApplication->dispatch() JROOT/libraries/src/Application/SiteApplication.php:249 7 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:294 8 Joomla\CMS\Application\CMSApplication->execute() JROOT/includes/app.php:61 9 require_once() JROOT/index.php:32