?
avatar landed1
landed1
20 Sep 2017

Try to select a menu from the main joomla backend.

I expect to be able to load and select the menu options.

What happens instead is an error page with a button allowing to go back to the control panel

An error has occurred.
0 Call to undefined method JModuleHelper::isAdminMultilang()

I am running PHP 7 on Nginx

URL of error page- /administrator/index.php?option=com_menus&view=items&menutype=mainmenu

I have elected to use the new url system that removes the numbers from the url but just in 'articles' component.

I just upgraded in the normal way directly writing files when prompted.

Votes

# of Users Experiencing Issue
2/2
Average Importance Score
5.00

avatar landed1 landed1 - open - 20 Sep 2017
avatar joomla-cms-bot joomla-cms-bot - labeled - 20 Sep 2017
avatar brianteeman
brianteeman - comment - 20 Sep 2017

Which admin template are you using?

avatar landed1
landed1 - comment - 20 Sep 2017

Isis the default.

Tried hathor - was same error.

Tried Bluestork and got some message that I didnt have the files or something and it looked like the defualt(as it probably switched)


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18003.

avatar brianteeman
brianteeman - comment - 20 Sep 2017

OK I just wanted to rule something out - it should be fine with isis

I suspect that a file may not have uploaded correctly. Can you go to the joomla update component and try to reupload joomla from the upload and update tab

avatar landed1
landed1 - comment - 20 Sep 2017

Hi Thanks.

Do you mean go to the install and try and reinstall joomla? I went to the update and found no useful way forward as everything is updated.

Can you give me a couple of steps pls.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18003.

avatar landed1
landed1 - comment - 20 Sep 2017

I have also discovered the exact same error when trying to access the modules. So I go Extensions > Modules


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18003.

avatar brianteeman
brianteeman - comment - 20 Sep 2017

First download the Joomla Upgrade Package in ZIP format from downloads.joomla.org

reupload

avatar landed1
landed1 - comment - 20 Sep 2017

Unfortunately it hasn't worked. I am getting the feeling like this is not a good day. Can I run some database rebuilds or something else?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18003.

avatar rachelwalraven
rachelwalraven - comment - 20 Sep 2017

I have the same issues. Reinstalled joomla core files from the back-end. Same problem. Uploaded all the core Joomla files with FTP, same problem. In Menu's as well as in moduels. The full error I get is:
Fatal error: Call to undefined method JModuleHelper::isAdminMultilang() in /home/user/domains/domeinname.nl/public_html/administrator/components/com_modules/controller.php on line 80


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18003.

avatar alikon
alikon - comment - 20 Sep 2017

from what joomla version have you updated ?

avatar mbabker
mbabker - comment - 20 Sep 2017

This thread points to a non-successful upgrade.

JModuleHelper is not a real class in 3.8 anymore, it is aliased to Joomla\CMS\Helper\ModuleHelper. So the error message would reference the namespaced class if it were something to do with that.

isAdminMultilang() is a new method in the module helper added in 3.8. The old libraries/cms/module/helper.php file won't have that method as it was supposed to be deleted.

avatar landed1
landed1 - comment - 20 Sep 2017

Sorry but not sorry to see I am not alone! I updated from the previous version 3.7.5

Ok that line is checking the missing method before to "Check custom administrator menu modules"..where should this method exist and why is it not loaded?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18003.

avatar rachelwalraven
rachelwalraven - comment - 20 Sep 2017

I've updated from 3.7.5

avatar franz-wohlkoenig franz-wohlkoenig - change - 20 Sep 2017
Status New Discussion
avatar landed1
landed1 - comment - 20 Sep 2017

Sounds like we have both (me and rachelwalraven) done again an upgrade so unsure as to what is failing in the upgrade. What can we test. Can we manually check some files?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18003.
avatar mbabker
mbabker - comment - 20 Sep 2017

If your libraries/cms directory doesn't look like https://github.com/joomla/joomla-cms/tree/3.8.0/libraries/cms then the update did not run in full. A full update includes writing the new files to the filesystem, database updates, removing old files from the filesystem (a list is kept in our update script), and some minor maintenance tasks (i.e. clearing the site cache).

avatar rachelwalraven
rachelwalraven - comment - 20 Sep 2017

I have the same folder structure as on github.

avatar landed1
landed1 - comment - 20 Sep 2017

So do I, I checked the files inside which had been recently changed and saw that I had the 3.8 stuff.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18003.

avatar mbabker
mbabker - comment - 20 Sep 2017

If the core folder structure is correct and you still have a "real" JModuleHelper class then it seems an extension is overloading the core class and hasn't been updated with the new method added in 3.8.

avatar rachelwalraven
rachelwalraven - comment - 20 Sep 2017

Any idea what kind of extension will do that with menus as well as modules?

avatar landed1
landed1 - comment - 20 Sep 2017

How can I check for this class please

If the core folder structure is correct and you still have a "real" JModuleHelper

avatar landed1
landed1 - comment - 20 Sep 2017

I ran grep -nr JModuleHelper and found a lot of references to the class. I am a php integrator rather than a developer so I am getting only half of what you mean by this
"JModuleHelper is not a real class in 3.8 anymore, it is aliased to Joomla\CMS\Helper\ModuleHelper"


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18003.
avatar mbabker
mbabker - comment - 20 Sep 2017

PHP supports a feature called class aliasing where you can create an alias of a class with a different name.

In 3.8, we migrated most of the core libraries from being in the global PHP namespace to using properly namespaced classes. As part of that migration, we created aliases for all of the moved classes so that the old name still works without breaking things. So the JModuleHelper class is now named Joomla\CMS\Helper\ModuleHelper but through the alias feature calls to JModuleHelper will automatically call the Joomla\CMS\Helper\ModuleHelper class.

As I pointed out before, error messages won't use the JModuleHelper class name as it's not a "real" class in 3.8; it's just an alias and therefore error messages would use the Joomla\CMS\Helper\ModuleHelper class name. The fact that you are getting an error message using the JModuleHelper class name means that it still exists as a "real" class in your site, possibly by way of an extension overloading the core class.

Try limiting your grep to "class JModuleHelper" and see what kind of results you get. If it comes back with something, and it's not in libraries/cms (or libraries/legacy if for some reason when the file was moved in either 3.1 or 3.2 the old version was never deleted), odds are that is the overloaded class and you should find what extension generates it and let them know they need to release an update for 3.8 compatibility (we added a new method to the module helper class and are actively using it, the copy of the module helper class that's being found doesn't have it).

avatar ggppdk
ggppdk - comment - 20 Sep 2017

There are 3rd party extensions that are overriding class
JModuleHelper

@mbabker said

isAdminMultilang() is a new method in the module helper added in 3.8. The old libraries/cms/module/helper.php file won't have that method as it was supposed to be deleted.

if these extensions have not been updated then this can be a reason that this method is not found

avatar landed1
landed1 - comment - 20 Sep 2017

I found the method inside- libraries/src/Helper/ModuleHelper.php at 636. That won't surprise you I am just going through detail.

I ran the grep (second time with "" :) ) and bingo....System - JReviews SEF One of Alejandros older files as I didn't update in some time now.

And these other instances of that...

/html/components/com_jreviews/jreviews/cms_compat/joomla/packages/plugins/system/jreviews_sef/modulehelper.php:19:abstract class JModuleHelper
./html/plugins/system/jreviews_sef/modulehelper.php:19:abstract class JModuleHelper
./html/plugins/system/t3.old/includes/joomla25/modulehelper.php:39:abstract class JModuleHelper
./html/plugins/system/t3.old/includes/joomla30/modulehelper.php:37:abstract class JModuleHelper
./html/plugins/system/t3/includes/joomla25/modulehelper.php:39:abstract class JModuleHelper
./html/plugins/system/t3/includes/joomla30/modulehelper.php:19:abstract class JModuleHelper

Thank you so much everyone- I will still stick around a bit as I am not one to say sod you jack I am ok..

Rachel are you able to run a terminal command when you are in the root of your site on the remote server that is

grep -nr "class JModuleHelper" .


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18003.
avatar JacquesR
JacquesR - comment - 20 Sep 2017

Elsewhere someone reported the same? error:

Backend:
0 Call to undefined method JModuleHelper::isAdminMultilang() /home1/grantour1/public_html/administrator/components/com_menus/controller.php:34

and Frontend (in that person's case) :
Fatal error: Cannot declare class JModuleHelper, because the name is already in use in /home1/grantour1/public_html/plugins/system/t3/includes/joomla30/modulehelper.php on line 19

It's a new site with only third-party component being Layer Slider, apart from T3 template/plugin.

https://www.joomlart.com/forums/topic/cannot-access-menu-items-after-upgrade-from-3-7-to-3-8-back-and-front-end-error/

@landed1 I see you also have the T3 joomla30 plugin.
@rachelwalraven do you also have T3 on your website? (your error references a different line number)

avatar LeGiangAnh
LeGiangAnh - comment - 20 Sep 2017

I had the same issue when I tried to access Menu > Manage (or any other sub-menu) in backend.
I'm using multilanguage menus before upgarding to 3.8

avatar landed1
landed1 - comment - 20 Sep 2017

Yes T3 going to be in the past,I know its free but last night I updated everything found I was updated and it still was an issue. I changed template away now Jacques to rockettheme who have a great framework IF you find a template you like I find them dark, just need a nice clean light theme and I am happy to part cash. The JReviews stuff I am going to remove I think as its not cheap and I am doing this as a hobby, across afew sites and it is too much...

avatar jreviews
jreviews - comment - 20 Sep 2017

For anyone using JReviews and having issues after the Joomla 3.8 update there's a patch being tested for the JReviews SEF Plugin which can be downloaded from the forum:

https://forum.jreviews.com/topic/29794-joomla-38-compatibility-update/

avatar sparkktv
sparkktv - comment - 20 Sep 2017

Having an issue with Menu Item Alias myself, only issue I seem to be having with Menu. It keeps giving me an error when i try to select an item and loads the whole menu page into the lightbox frame.
screen shot 2017-09-20 at 17 16 25screen shot 2017-09-20 at 17 16 27


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18003.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 20 Sep 2017

@sparkktv this looks like a different Issue. So please open a new Issue.

avatar DV-Admin
DV-Admin - comment - 20 Sep 2017

Wow long thread. Ok DV-Admin here, I posted this on the Joomla Forum.
I posted the same on Joomlart and a moderator should be looking at it. There are at least several of us with the same issue on T3. Personally I really like T3, I wouldnt mind paying for it, maybe then we could get a much better product. Here is the thread (I see it was posted before) on Joomlart https://www.joomlart.com/forums/topic/cannot-access-menu-items-after-upgrade-from-3-7-to-3-8-back-and-front-end-error

avatar DV-Admin
DV-Admin - comment - 21 Sep 2017

If you are using T3 - Joomlart have updated T3 plugin which restored my Menus. They additionally referenced a problem when using Fontawesome Pro. See Joomlart thread https://www.joomlart.com/forums/topic/cannot-access-menu-items-after-upgrade-from-3-7-to-3-8-back-and-front-end-error/#post-1063262

avatar rachelwalraven
rachelwalraven - comment - 21 Sep 2017

Rachel are you able to run a terminal command when you are in the root of your site on the remote server that is grep -nr "class JModuleHelper" .

Unfortunately not. I'll ask my server manager.
I know I don't use T3 stuff.

avatar rgtr
rgtr - comment - 21 Sep 2017

Hi

Where exactly do we run this command ? My host runs Linux.
I have access to file manager etc in the normal manner.

I have done a text search for JModuleHelper and it does not find anything ...

I presume this is a php command.....

How do I run php on a command line basis

In fact what exactly do I have to do ?

Richard

avatar rgtr
rgtr - comment - 21 Sep 2017

Hi

I do NOT use T3 ....

I do use Akeeba, and Admin Tools

Richard

avatar Fedik
Fedik - comment - 21 Sep 2017

to find out where exactly your current JModuleHelper is, run next PHP:

$reflector = new ReflectionClass('JModuleHelper');
echo $reflector->getFileName();
avatar rgtr
rgtr - comment - 21 Sep 2017

Thanks,
But how do I run php on a command line basis
Richard

avatar Fedik
Fedik - comment - 21 Sep 2017

@rgtr my example not for command line 😉
I just a PHP code, can add it somewhere in the template index.php at top (and then remove)

avatar rgtr
rgtr - comment - 21 Sep 2017

Hi

One clever trick to run the code ... needed a sleep() so i could see the answer !
Thanks

I did that and have one instance at X:\Joomla_Sites\wp_38_1\libraries\src\Helper

If I rename it then it crashes - so its needed ...

What to do ?

Richard

avatar Fedik
Fedik - comment - 21 Sep 2017

I did that and have one instance at X:\Joomla_Sites\wp_38_1\libraries\src\Helper

/libraries/src/Helper/ModuleHelper.php (or with \ at win system) is correct path, and all should work,
maybe you have a different issue

avatar gundestrup
gundestrup - comment - 22 Sep 2017

php 7.1 and php 7.0 issue.
Upgraded from 3.7.5.
Using Akeba backup, affect normal admin template (standart version).
Any suggestion to fix this issue?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18003.

avatar wojsmol
wojsmol - comment - 22 Sep 2017

@gundestrup If issue is related to Akeeba Backup then check if you using latest version.

avatar gundestrup
gundestrup - comment - 22 Sep 2017

I am using latest Pro version 5.6.0 with latest php.

avatar wojsmol
wojsmol - comment - 22 Sep 2017

Please describe exactly the problem.

avatar ggppdk
ggppdk - comment - 22 Sep 2017

@gundestrup

Any suggestion to fix this issue?

instead of text searching for the class
an easier way for such issue as this,
is to print the filename where this class was defined

see comment of @Fedik above

edit file
administrator/index.php

just before

// Execute the application.
$app->execute();

add (temporarily)

$class = new ReflectionClass('JModuleHelper');
echo $class->getName() . '<br/>';
echo $class->getFileName() . '<br/>';
die();

then visit
/administrator/

avatar brianteeman
brianteeman - comment - 22 Sep 2017

No software has a version called "latest"

avatar wojsmol
wojsmol - comment - 22 Sep 2017

@brianteeman In this case @gundestrup is referring to Akeeba Backup Pro 5.6.0. See me comment.

avatar brianteeman
brianteeman - comment - 22 Sep 2017

I am using latest Pro version 5.6.0 with latest php.

I was referring to the php version ;)

avatar gundestrup
gundestrup - comment - 23 Sep 2017

PHP version: 7.1.9-1
According to Akeeba Backup, it's compatiable with Joomla 3.8 (Using version 5.6.0 of Akeeba Backup)

avatar ggppdk
ggppdk - comment - 23 Sep 2017

@gundestrup

you posted in this issue
so i am assuming that you are getting the message reported by this issue (because you have not said otherwise)

An error has occurred.
0 Call to undefined method JModuleHelper::isAdminMultilang()

can you see my previous comment ?

avatar gundestrup
gundestrup - comment - 23 Sep 2017

Visiting com modules (that give the error) I then get
Joomla\CMS\Helper\ModuleHelper
/home/svend/www-data/gundestrup.dk/public_html/libraries/src/Helper/ModuleHelper.php

avatar gundestrup
gundestrup - comment - 23 Sep 2017

Here is the contence if the file on my server
`svend@skynet2:~/www-data/gundestrup.dk/public_html/libraries/src/Helper$ cat ModuleHelper.php

name === $name || $modules[$i]->module === $name) { // Match the title if we're looking for a specific instance of the module if (!$title || $modules[$i]->title === $title) { // Found it $result = &$modules[$i]; break; } } } // If we didn't find it, and the name is mod_something, create a dummy object if ($result === null && strpos($name, 'mod_') === 0) { $result = new \stdClass; $result->id = 0; $result->title = ''; $result->module = $name; $result->position = ''; $result->content = ''; $result->showtitle = 0; $result->control = ''; $result->params = ''; } return $result; } /** * Get modules by position * * @Param string $position The position of the module * * @return array An array of module objects * * @SInCE 1.5 */ public static function &getModules($position) { $position = strtolower($position); $result = array(); $input = \JFactory::getApplication()->input; $modules =& static::load(); $total = count($modules); for ($i = 0; $i < $total; $i++) { if ($modules[$i]->position === $position) { $result[] = &$modules[$i]; } } if (count($result) === 0) { if ($input->getBool('tp') && ComponentHelper::getParams('com_templates')->get('template_positions_display')) { $result[0] = static::getModule('mod_' . $position); $result[0]->title = $position; $result[0]->content = $position; $result[0]->position = $position; } } return $result; } /** * Checks if a module is enabled. A given module will only be returned * if it meets the following criteria: it is enabled, it is assigned to * the current menu item or all items, and the user meets the access level * requirements. * * @Param string $module The module name * * @return boolean See description for conditions. * * @SInCE 1.5 */ public static function isEnabled($module) { $result = static::getModule($module); return $result !== null && $result->id !== 0; } /** * Render the module. * * @Param object $module A module object. * @Param array $attribs An array of attributes for the module (probably from the XML). * * @return string The HTML content of the module output. * * @SInCE 1.5 */ public static function renderModule($module, $attribs = array()) { static $chrome; // Check that $module is a valid module object if (!is_object($module) || !isset($module->module) || !isset($module->params)) { if (JDEBUG) { \JLog::addLogger(array('text_file' => 'jmodulehelper.log.php'), \JLog::ALL, array('modulehelper')); \JLog::add('ModuleHelper::renderModule($module) expects a module object', \JLog::DEBUG, 'modulehelper'); } return; } if (JDEBUG) { \JProfiler::getInstance('Application')->mark('beforeRenderModule ' . $module->module . ' (' . $module->title . ')'); } $app = \JFactory::getApplication(); // Record the scope. $scope = $app->scope; // Set scope to component name $app->scope = $module->module; // Get module parameters $params = new Registry($module->params); // Get the template $template = $app->getTemplate(); // Get module path $module->module = preg_replace('/[^A-Z0-9_\.-]/i', '', $module->module); $path = JPATH_BASE . '/modules/' . $module->module . '/' . $module->module . '.php'; // Load the module if (file_exists($path)) { $lang = \JFactory::getLanguage(); $coreLanguageDirectory = JPATH_BASE; $extensionLanguageDirectory = dirname($path); $langPaths = $lang->getPaths(); // Only load the module's language file if it hasn't been already if (!$langPaths || (!isset($langPaths[$coreLanguageDirectory]) && !isset($langPaths[$extensionLanguageDirectory]))) { // 1.5 or Core then 1.6 3PD $lang->load($module->module, $coreLanguageDirectory, null, false, true) || $lang->load($module->module, $extensionLanguageDirectory, null, false, true); } $content = ''; ob_start(); include $path; $module->content = ob_get_contents() . $content; ob_end_clean(); } // Load the module chrome functions if (!$chrome) { $chrome = array(); } include_once JPATH_THEMES . '/system/html/modules.php'; $chromePath = JPATH_THEMES . '/' . $template . '/html/modules.php'; if (!isset($chrome[$chromePath])) { if (file_exists($chromePath)) { include_once $chromePath; } $chrome[$chromePath] = true; } // Check if the current module has a style param to override template module style $paramsChromeStyle = $params->get('style'); if ($paramsChromeStyle) { $attribs['style'] = preg_replace('/^(system|' . $template . ')\-/i', '', $paramsChromeStyle); } // Make sure a style is set if (!isset($attribs['style'])) { $attribs['style'] = 'none'; } // Dynamically add outline style if ($app->input->getBool('tp') && ComponentHelper::getParams('com_templates')->get('template_positions_display')) { $attribs['style'] .= ' outline'; } // If the $module is nulled it will return an empty content, otherwise it will render the module normally. $app->triggerEvent('onRenderModule', array(&$module, &$attribs)); if ($module === null || !isset($module->content)) { return ''; } foreach (explode(' ', $attribs['style']) as $style) { $chromeMethod = 'modChrome_' . $style; // Apply chrome and render module if (function_exists($chromeMethod)) { $module->style = $attribs['style']; ob_start(); $chromeMethod($module, $params, $attribs); $module->content = ob_get_contents(); ob_end_clean(); } } // Revert the scope $app->scope = $scope; $app->triggerEvent('onAfterRenderModule', array(&$module, &$attribs)); if (JDEBUG) { \JProfiler::getInstance('Application')->mark('afterRenderModule ' . $module->module . ' (' . $module->title . ')'); } return $module->content; } /** * Get the path to a layout for a module * * @Param string $module The name of the module * @Param string $layout The name of the module layout. If alternative layout, in the form template:filename. * * @return string The path to the module layout * * @SInCE 1.5 */ public static function getLayoutPath($module, $layout = 'default') { $template = \JFactory::getApplication()->getTemplate(); $defaultLayout = $layout; if (strpos($layout, ':') !== false) { // Get the template and file name from the string $temp = explode(':', $layout); $template = $temp[0] === '_' ? $template : $temp[0]; $layout = $temp[1]; $defaultLayout = $temp[1] ?: 'default'; } // Build the template and base path for the layout $tPath = JPATH_THEMES . '/' . $template . '/html/' . $module . '/' . $layout . '.php'; $bPath = JPATH_BASE . '/modules/' . $module . '/tmpl/' . $defaultLayout . '.php'; $dPath = JPATH_BASE . '/modules/' . $module . '/tmpl/default.php'; // If the template has a layout override use it if (file_exists($tPath)) { return $tPath; } if (file_exists($bPath)) { return $bPath; } return $dPath; } /** * Load published modules. * * @return array * * @SInCE 1.5 * @deprecated 4.0 Use ModuleHelper::load() instead */ protected static function &_load() { return static::load(); } /** * Load published modules. * * @return array * * @SInCE 3.2 */ protected static function &load() { static $modules; if (isset($modules)) { return $modules; } $app = \JFactory::getApplication(); $modules = null; $app->triggerEvent('onPrepareModuleList', array(&$modules)); // If the onPrepareModuleList event returns an array of modules, then ignore the default module list creation if (!is_array($modules)) { $modules = static::getModuleList(); } $app->triggerEvent('onAfterModuleList', array(&$modules)); $modules = static::cleanModuleList($modules); $app->triggerEvent('onAfterCleanModuleList', array(&$modules)); return $modules; } /** * Module list * * @return array */ public static function getModuleList() { $app = \JFactory::getApplication(); $Itemid = $app->input->getInt('Itemid', 0); $groups = implode(',', \JFactory::getUser()->getAuthorisedViewLevels()); $lang = \JFactory::getLanguage()->getTag(); $clientId = (int) $app->getClientId(); // Build a cache ID for the resulting data object $cacheId = $groups . $clientId . $Itemid; $db = \JFactory::getDbo(); $query = $db->getQuery(true) ->select('m.id, m.title, m.module, m.position, m.content, m.showtitle, m.params, mm.menuid') ->from('#__modules AS m') ->join('LEFT', '#__modules_menu AS mm ON mm.moduleid = m.id') ->where('m.published = 1') ->join('LEFT', '#__extensions AS e ON e.element = m.module AND e.client_id = m.client_id') ->where('e.enabled = 1'); $date = \JFactory::getDate(); $now = $date->toSql(); $nullDate = $db->getNullDate(); $query->where('(m.publish_up = ' . $db->quote($nullDate) . ' OR m.publish_up <= ' . $db->quote($now) . ')') ->where('(m.publish_down = ' . $db->quote($nullDate) . ' OR m.publish_down >= ' . $db->quote($now) . ')') ->where('m.access IN (' . $groups . ')') ->where('m.client_id = ' . $clientId) ->where('(mm.menuid = ' . $Itemid . ' OR mm.menuid <= 0)'); // Filter by language if ($app->isClient('site') && $app->getLanguageFilter()) { $query->where('m.language IN (' . $db->quote($lang) . ',' . $db->quote('*') . ')'); $cacheId .= $lang . '*'; } if ($app->isClient('administrator') && static::isAdminMultilang()) { $query->where('m.language IN (' . $db->quote($lang) . ',' . $db->quote('*') . ')'); $cacheId .= $lang . '*'; } $query->order('m.position, m.ordering'); // Set the query $db->setQuery($query); try { /** @var \JCacheControllerCallback $cache */ $cache = \JFactory::getCache('com_modules', 'callback'); $modules = $cache->get(array($db, 'loadObjectList'), array(), md5($cacheId), false); } catch (\RuntimeException $e) { \JLog::add(\JText::sprintf('JLIB_APPLICATION_ERROR_MODULE_LOAD', $e->getMessage()), \JLog::WARNING, 'jerror'); return array(); } return $modules; } /** * Clean the module list * * @Param array $modules Array with module objects * * @return array */ public static function cleanModuleList($modules) { // Apply negative selections and eliminate duplicates $Itemid = \JFactory::getApplication()->input->getInt('Itemid'); $negId = $Itemid ? -(int) $Itemid : false; $clean = array(); $dupes = array(); foreach ($modules as $i => $module) { // The module is excluded if there is an explicit prohibition $negHit = ($negId === (int) $module->menuid); if (isset($dupes[$module->id])) { // If this item has been excluded, keep the duplicate flag set, // but remove any item from the modules array. if ($negHit) { unset($clean[$module->id]); } continue; } $dupes[$module->id] = true; // Only accept modules without explicit exclusions. if ($negHit) { continue; } $module->name = substr($module->module, 4); $module->style = null; $module->position = strtolower($module->position); $clean[$module->id] = $module; } unset($dupes); // Return to simple indexing that matches the query order. return array_values($clean); } /** * Module cache helper * * Caching modes: * To be set in XML: * 'static' One cache file for all pages with the same module parameters * 'oldstatic' 1.5 definition of module caching, one cache file for all pages * with the same module id and user aid, * 'itemid' Changes on itemid change, to be called from inside the module: * 'safeuri' Id created from $cacheparams->modeparams array, * 'id' Module sets own cache id's * * @Param object $module Module object * @Param object $moduleparams Module parameters * @Param object $cacheparams Module cache parameters - id or URL parameters, depending on the module cache mode * * @return string * * @see \JFilterInput::clean() * @SInCE 1.6 */ public static function moduleCache($module, $moduleparams, $cacheparams) { if (!isset($cacheparams->modeparams)) { $cacheparams->modeparams = null; } if (!isset($cacheparams->cachegroup)) { $cacheparams->cachegroup = $module->module; } $user = \JFactory::getUser(); $conf = \JFactory::getConfig(); /** @var \JCacheControllerCallback $cache */ $cache = \JFactory::getCache($cacheparams->cachegroup, 'callback'); // Turn cache off for internal callers if parameters are set to off and for all logged in users if ($moduleparams->get('owncache', null) === '0' || $conf->get('caching') == 0 || $user->get('id')) { $cache->setCaching(false); } // Module cache is set in seconds, global cache in minutes, setLifeTime works in minutes $cache->setLifeTime($moduleparams->get('cache_time', $conf->get('cachetime') * 60) / 60); $wrkaroundoptions = array('nopathway' => 1, 'nohead' => 0, 'nomodules' => 1, 'modulemode' => 1, 'mergehead' => 1); $wrkarounds = true; $view_levels = md5(serialize($user->getAuthorisedViewLevels())); switch ($cacheparams->cachemode) { case 'id': $ret = $cache->get( array($cacheparams->class, $cacheparams->method), $cacheparams->methodparams, $cacheparams->modeparams, $wrkarounds, $wrkaroundoptions ); break; case 'safeuri': $secureid = null; if (is_array($cacheparams->modeparams)) { $input = \JFactory::getApplication()->input; $uri = $input->getArray(); $safeuri = new \stdClass; $noHtmlFilter = \JFilterInput::getInstance(); foreach ($cacheparams->modeparams as $key => $value) { // Use int filter for id/catid to clean out spamy slugs if (isset($uri[$key])) { $safeuri->$key = $noHtmlFilter->clean($uri[$key], $value); } } } $secureid = md5(serialize(array($safeuri, $cacheparams->method, $moduleparams))); $ret = $cache->get( array($cacheparams->class, $cacheparams->method), $cacheparams->methodparams, $module->id . $view_levels . $secureid, $wrkarounds, $wrkaroundoptions ); break; case 'static': $ret = $cache->get( array($cacheparams->class, $cacheparams->method), $cacheparams->methodparams, $module->module . md5(serialize($cacheparams->methodparams)), $wrkarounds, $wrkaroundoptions ); break; // Provided for backward compatibility, not really useful. case 'oldstatic': $ret = $cache->get( array($cacheparams->class, $cacheparams->method), $cacheparams->methodparams, $module->id . $view_levels, $wrkarounds, $wrkaroundoptions ); break; case 'itemid': default: $ret = $cache->get( array($cacheparams->class, $cacheparams->method), $cacheparams->methodparams, $module->id . $view_levels . \JFactory::getApplication()->input->getInt('Itemid', null), $wrkarounds, $wrkaroundoptions ); break; } return $ret; } /** * Method to determine if filtering by language is enabled in back-end for modules. * * @return boolean True if enabled; false otherwise. * * @SInCE 3.8.0 */ public static function isAdminMultilang() { static $enabled = false; if (count(LanguageHelper::getInstalledLanguages(1)) > 1) { $enabled = (bool) ComponentHelper::getParams('com_modules')->get('adminlangfilter', 0); } return $enabled; } } `
avatar ggppdk
ggppdk - comment - 24 Sep 2017

@gundestrup

Propably there are some 2nd file defining a JModuleHelper and this is loaded only in some pages

Try running this on the Joomla root folder
(by searching exactly for 'class JModuleHelper' it will be easier to get only the file causing the issue)

grep -nr 'class JModuleHelper'

avatar gundestrup
gundestrup - comment - 24 Sep 2017

I think we have a culpit
svend@skynet2:~/www-data/gundestrup.dk/public_html$ grep -nr 'class JModuleHelpe r'
plugins/system/ns_fontawesome_pro/ns_fontawesome_pro.php:86:abstract class JModuleHelper

avatar gundestrup
gundestrup - comment - 24 Sep 2017

After updating to lastest version, the ref was gone, and everything works correclt.
So to sum it it
login to server, root folder of installation run "grep -nr 'class JModuleHelper'", and see what extension you missed to upgrade... NOT a joomla error, but an error of a too lax admin (ME) sorry, thanx for the help

avatar ggppdk
ggppdk - comment - 24 Sep 2017

Such errors keep coming up when upgrading to J3.5 J3.6 J3.7 J3.8 and

  • a new method has been added to classes that are being overriden by 3rd party extensions

Maybe a new documentation for people getting
0 Call to undefined method JSomeClassname::SomeMethod()

Asking them to

  1. upgrade all extensions
  2. if no success or no backend access then run
    grep -nr 'class JSomeClassname'
  3. then e.g. if it a system plugin either disable it or if no backend access rename its folder
  4. ??
avatar wojsmol
wojsmol - comment - 24 Sep 2017

@ggppdk Good Idea but in such documentation wee should provide always method without ssh access.

avatar DavidBoggitt
DavidBoggitt - comment - 25 Sep 2017

The problem for me was the MetaMod extension (I haven't updated it yet, as I don't have a valid subscription).


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18003.

avatar rachelwalraven
rachelwalraven - comment - 26 Sep 2017

I still don't know what caused it, but i've fixed it by making a fresh install. Importing my database en installing the extensions. Now all is working fine.

avatar shelvinG
shelvinG - comment - 28 Sep 2017

Howdy,
I had also received the exact same error message - my issue was JReviews, specifically the SEF plugin.
If you head over to JReviews support forum, Alejando has posted a fix.
Hope this helps someone.
Cheers.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18003.

avatar EJBJane
EJBJane - comment - 3 Oct 2017

I solved this problem quickly by turning off the fontawsome plugin.

avatar wojsmol
wojsmol - comment - 3 Oct 2017

@EJBJane Please report incompatibility to plug-in author.

avatar EJBJane
EJBJane - comment - 3 Oct 2017

It was solved about two weeks ago, there is a new version for that plugin.

avatar PercyP
PercyP - comment - 9 Oct 2017

Hi,
I too am having this problem. I added the code that @ggppdk suggested:

edit file
administrator/index.php

just before

// Execute the application.
$app->execute();
add (temporarily)

$class = new ReflectionClass('JModuleHelper');
echo $class->getName() . '
';
echo $class->getFileName() . '
';
die();
then visit
/administrator/

And this is the output when I visit Administrator:

Joomla\CMS\Helper\ModuleHelper
/home/linktosale/public_html/libraries/src/Helper/ModuleHelper.php

I am not sure what I need to do next. I have updated Akeeba backup, my template, Jreviews (applied the fix) and still no joy. Can anyone advise as to what else I can try? At the moment I cannot access any of my menus via administrator - The modules and other menus work - its just the Menu section that is broken.

avatar wojsmol
wojsmol - comment - 9 Oct 2017
avatar ggppdk
ggppdk - comment - 9 Oct 2017

@PercyP
Joomla\CMS\Helper\ModuleHelper
/home/linktosale/public_html/libraries/src/Helper/ModuleHelper.php

the above is correct

In your the class seems to be overriden only when you visit the menu manager

So First, navigate to the page that shows error "0 Call to undefined method JModuleHelper::isAdminMultilang()"
(aka first visit the menu manager)

  • and only then add the code i suggested
  • then click to refresh the page, and you should now get a different file (some file from some 3rd party extension)
avatar PercyP
PercyP - comment - 9 Oct 2017

@ggppdk
thanks for responding. I have just done as you suggested and the message doesn't change - I refreshed the page a couple of times and its the same. The problem seems to be with every menu item (under Administrator/Menus

avatar mbabker
mbabker - comment - 9 Oct 2017

Put your PHP snippet in the administrator/templates/isis/index.php file, not the main administrator/index.php file. With it in the latter file, the Reflection call is happening before plugins get to register their overloaded versions of core classes. By putting it in the template the request should run through and find the problematic file.

avatar PercyP
PercyP - comment - 9 Oct 2017

Hi @mbabker

thanks for responding. Where in that file should I put the code? It doesn't have the same lines as where @ggppdk suggested (after Execute the application ...
I tried adding it to the bottom but nothing happened, so I am guessing it needs to be placed somewhere specific?

Should there be an Isis template in the templates section? I have Beeze and Prostar - no Isis - although it is in the folder you pointed me to

avatar brianteeman
brianteeman - comment - 9 Oct 2017

You are looking in /templates
You should be looking in /administrator/templates

avatar PercyP
PercyP - comment - 9 Oct 2017

@brianteeman

yes I am in administrator/templates/isis folder and added the code to the bottom of the index.php file. But nothing happened

avatar PercyP
PercyP - comment - 9 Oct 2017

Hi,

finally found the problem (thanks to @ggppdk @brianteeman @mbabker
It turned out to be a PayPlans plugin in my case:
/home/mysite/public_html/plugins/payplans/moduleaccess/moduleaccess/joomla/abstract/j35/module/helper.php
I renamed the folder and the menus came back :)
Thanks for your help pointing me in the right direction - most appreciated

avatar izharaazmi
izharaazmi - comment - 4 Nov 2017

A huge appeal to the 3PD developers, please don't replace core classes. Instead extend them and use your own class. If you are trying that to alter the core behaviour in some way be double sure of the intent. It affects YOUR customers. If affects trust on JOOMLA. 😄

avatar Quy
Quy - comment - 7 Jan 2018

@franz-wohlkoenig Another one to close relating to upgrade issues with 3rd party extensions

avatar joomla-cms-bot joomla-cms-bot - change - 7 Jan 2018
Closed_By franz-wohlkoenig joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 7 Jan 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 7 Jan 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-01-07 18:26:18
Closed_By franz-wohlkoenig
avatar joomla-cms-bot
joomla-cms-bot - comment - 7 Jan 2018
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 7 Jan 2018

closed as stated above.

Thanks for Hint @Quy.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18003.

avatar kofibor
kofibor - comment - 5 Feb 2018

I just finished updating my website and i'm faced with this error.

Fatal error: Call to undefined method JApplicationSite::isClient() in /home/apostlesul/public_html/plugins/system/logout/logout.php on line 48

Can someone help?

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 5 Feb 2018

@kofibor Please ask help on the forums. This repository concerns in first Place Joomla coding.

avatar titusvk
titusvk - comment - 6 Feb 2018

^ Maybe the advanced module manager.

avatar helpwise
helpwise - comment - 20 Nov 2018

0 - Call to undefined method Joomla\CMS\Helper\ModuleHelper::getModuleById() comes up in the latest JSN PageBuilder 3 (downloaded today) when I insert a module into a page.

I get that this JSN software may need updating, but how come Joomla is not backwards compatible at least in the V3 range (I am running J3.9) ?

avatar mbabker
mbabker - comment - 20 Nov 2018

getModuleById is a new method added in Joomla 3.9. If JSN or someone is overloading the ModuleHelper class, as is a common thing, then other parts of the API expecting the new method to exist will break. That is not a backward compatibility issue unless you are of the belief that a class cannot have new methods introduced to it once included in a stable release.

avatar helpwise
helpwise - comment - 21 Nov 2018

Ok - that makes sense thanks Michael :)

Add a Comment

Login with GitHub to post a comment