J4 Issue ?
avatar frogydiak
frogydiak
19 Jul 2018

Steps to reproduce the issue

Downloaded 4.0-dev branch and freshly installed it locally with the dummy data. Installation went well but going to the frontend, this error appears:

Error: Class 'Joomla\Module\Menu\Site\Helper\MenuHelper' not found: Class 'Joomla\Module\Menu\Site\Helper\MenuHelper' not found

I tried to delete the file /libraries/autoload_psr4.php but it doesn't help. I also just tried pulling/fetch from github to get the latest update but nothing, still gets the error when viewing the frontend.

System Info

PHP Built On Darwin MacBook-Pro.local 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64
Database Type mysql
Database Version 5.5.5-10.3.8-MariaDB
Database Collation utf8_general_ci
Database Connection Collation utf8_general_ci
PHP Version 7.2.7
Web Server nginx/1.15.0
WebServer to PHP Interface fpm-fcgi
Joomla! Version Joomla! 4.0.0-alpha4-dev Development [ Amani ] 15-May-2018 10:29 GMT
User Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36
avatar frogydiak frogydiak - open - 19 Jul 2018
avatar joomla-cms-bot joomla-cms-bot - labeled - 19 Jul 2018
avatar joomla-cms-bot joomla-cms-bot - change - 19 Jul 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - edited - 19 Jul 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 19 Jul 2018
Category Front End
avatar franz-wohlkoenig franz-wohlkoenig - change - 19 Jul 2018
Title
[4.0-dev] Front End Error
[4.0] Front End Error 'Joomla\Module\Menu\Site\Helper\MenuHelper' not found
Status New Information Required
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 19 Jul 2018

can you give System information (as much as possible)?


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

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 19 Jul 2018

Updated Title to make clear whats the Issue is about.


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

avatar frogydiak frogydiak - change - 19 Jul 2018
The description was changed
avatar frogydiak frogydiak - edited - 19 Jul 2018
avatar frogydiak frogydiak - change - 19 Jul 2018
The description was changed
avatar frogydiak frogydiak - edited - 19 Jul 2018
avatar ReLater
ReLater - comment - 19 Jul 2018

There is no /libraries/autoload_psr4.php in the newest nightly build. And also no sample datas during installation.

I think you're using an oudated alpha release(?) Did you download here: https://developer.joomla.org/nightly-builds.html ?

avatar mbabker
mbabker - comment - 19 Jul 2018

There is no /libraries/autoload_psr4.php in the newest nightly build.

The file is generated in the local environment, it's not part of the package.

avatar ReLater
ReLater - comment - 19 Jul 2018

The file is generated in the local environment, it's not part of the package.

Thank you for info.

I cannot confirm this issue with XAMPP7.2.7, Nightly build of today, Blog sample data (cpanel installation).

PHP Built On Windows NT DELL-M6800 10.0 build 17134 (Windows 10) i586
Database Type mysql
Database Version 5.5.5-10.1.34-MariaDB
Database Collation latin1_swedish_ci
Database Connection Collation utf8_general_ci
PHP Version 7.2.7
Web Server Apache/2.4.33 (Win32) OpenSSL/1.1.0h PHP/7.2.7
WebServer to PHP Interface apache2handler
Joomla! Version Joomla! 4.0.0-alpha4-dev Development [ Amani ] 15-May-2018 10:29 GMT
User Agent Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0 ESR
avatar franz-wohlkoenig franz-wohlkoenig - change - 20 Jul 2018
Status Information Required Closed - Unconfirmed Report
Closed_Date 0000-00-00 00:00:00 2018-07-20 03:59:37
Closed_By franz-wohlkoenig
avatar joomla-cms-bot joomla-cms-bot - change - 20 Jul 2018
Status Closed - Unconfirmed Report Closed
Closed_Date 2018-07-20 03:59:37 2018-07-20 03:59:38
Closed_By franz-wohlkoenig joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 20 Jul 2018
avatar joomla-cms-bot
joomla-cms-bot - comment - 20 Jul 2018
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 20 Jul 2018

Closed as unconfirmed Report. Issue can always reopened.

avatar frogydiak
frogydiak - comment - 22 Jul 2018

You guys closed it but did not test it yourself. Please do test by cloning the 4.0-dev and downloading the https://developer.joomla.org/nightly-builds.html. I did this in a clean install.

I get the same error when going to the frontend. The backend is working just fine.

avatar ReLater
ReLater - comment - 22 Jul 2018

You guys closed it but did not test it yourself.

That's not right. As you can see above I've tested it with new installations and cannot confirm it in a local or online environment.

Maybe in a MacBook environment like yours?

Or because I don't understand what that means:

by cloning the 4.0-dev

avatar frogydiak
frogydiak - comment - 25 Jul 2018

Or because I don't understand what that means:
by cloning the 4.0-dev

I am trying to learn you guys terminologies and ways of doing things starting at reporting my experience on installing and using joomla. I would assume that you are more advance user than I am. In your dev world, how do you clone git repo? What I mean is I clone the 4.0-dev branch here in github. If that is a wrong way of getting 4.0 joomla, then I guess maybe someone from your experienced dev guy should update the README.

I am reporting, my experience and my setup info, if that does not work then by the tone of what you are saying, I have to follow your hardware and setup as well to be successful in installing Joomla 4? Or instead as a dev you are supposed to take note of that issue and maybe check?

avatar ReLater
ReLater - comment - 25 Jul 2018

I would assume that you are more advance user than I am.

Some are, some not. That's the vital base of an open source community. You also need idiots like me that stupidly test things like normal users will use them later on with stable releases.
I never clone I just install prepared/build installation packages.
@franz-wohlkoenig So, I would propose to reopen this issue for further discussion.

Just thoughts of a layman: Maybe the README ist outdated (maybe because several vendor libraries were removed from the repo (are they already removed?), that needs an additional build step) or the used installation technique is buggy.

EDIT: Finds:
#21217 (comment)
#20059

avatar joomla-cms-bot joomla-cms-bot - change - 25 Jul 2018
Closed_Date 0000-00-00 00:00:00
avatar joomla-cms-bot joomla-cms-bot - reopen - 25 Jul 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 25 Jul 2018
Status Closed New
Closed_Date 2018-07-20 03:59:38
Closed_By joomla-cms-bot
avatar joomla-cms-bot
joomla-cms-bot - comment - 25 Jul 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 25 Jul 2018
Status New Discussion
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 25 Jul 2018

Reopened as stated above.


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

avatar laoneo
laoneo - comment - 25 Jul 2018

I'v installed sample data, but can't reproduce the issue. Can you enable debugging and post the stack trace?

avatar AlessandraSalvaggio
AlessandraSalvaggio - comment - 26 Jul 2018

I can confirm the issue on WIN 10 XAMPP
I also can not install an extra language (italian) and sample data

avatar frogydiak
frogydiak - comment - 28 Jul 2018

@laoneo Debugging is enabled but the error is before Joomla renders the framework. So I disabled all the Menu Modules and I get an error for Login Module. I disable login Module and I get an error with Search and Smart Search Modules. I disabled that too and the front page renders.

Error: Class 'Joomla\Module\Login\Site\Helper\LoginHelper' not found: Class 'Joomla\Module\Login\Site\Helper\LoginHelper' not found

I guess, the issue is with the new class auto loader for the frontend (if there is one) since the backend is working just fine.

Like @AlessandraSalvaggio I cannot install extra language and sample data after install. I have not tried installing language during install but I was able to install sample data during the install.

avatar laoneo
laoneo - comment - 28 Jul 2018

Try to delete the psr4 file in libraries.

avatar frogydiak
frogydiak - comment - 28 Jul 2018

I think I mentioned that earlier that I did and I just did and still with the same result.

@laoneo have you tried to install 4.0 dev yourself from nightly release and/or clone it from this repository. Please do so you know what I am talking about rather than trying to figure out based on what I am just saying. If you don't experience what I am experiencing, maybe it's time for those volunteer devs that are good with code to check out what's causing it with nginx and/or based on my setup. One person reported to have the same issue, so I am not the only one.

avatar AlessandraSalvaggio
AlessandraSalvaggio - comment - 30 Jul 2018

@laoneo It worked! i deleted the psr4 file in libraries and now i can see the front end.

But when I try to save a new article (which is actually correctly saved) I have this error

Fatal error: Cannot use Joomla\CMS\Language\Multilanguage as Multilanguage because the name is already in use in C:\xampp\htdocs\Joomla4\administrator\components\com_content\Helper\PreviewHelper.php on line 18

How can I fix this?
Thanks

p.s. I tried to add italian language during installation process, with no success. The processed stopped... nothing happened. I had to start the installation again

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 30 Jul 2018

@AlessandraSalvaggio at this Time French, German-DE and Persian are ready for install.

avatar AlessandraSalvaggio
AlessandraSalvaggio - comment - 30 Jul 2018

@franz-wohlkoenig ok no italian

but the site form which I am reporting the error is only in english. no other language installed.
So I still need to fix the issue

avatar AlessandraSalvaggio
AlessandraSalvaggio - comment - 31 Jul 2018

Actually the trick didn't work completely.... ok now i can see the frontend, but I still have the error reported up while saving an article and I also noticed that it is impossible to open existing articles to edit them :(

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 31 Jul 2018
avatar AlessandraSalvaggio
AlessandraSalvaggio - comment - 31 Jul 2018

@franz-wohlkoenig I already read #21238 but, as I wrote in a previous post my site is NOT multilingual

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 31 Jul 2018

@AlessandraSalvaggio ah, haven't read Posts ones more but searched for Error-Message here.

avatar AlessandraSalvaggio
AlessandraSalvaggio - comment - 31 Jul 2018
avatar brianteeman brianteeman - change - 2 Aug 2018
Labels Added: J4 Issue
avatar brianteeman brianteeman - labeled - 2 Aug 2018
avatar roland-d
roland-d - comment - 4 Aug 2018

I can confirm this issue on my Windows 10.0.16299.522 WAMP server
PHP Version 7.2.4
Apache 2.4.33
MySQL 5.7.21

Here are the commands I executed after pulling all the files:

git clean -fd
git reset --hard HEAD
composer install
npm install

I have deleted the configuration.php and did a clean install and still the same error.

Error: Class 'Joomla\Module\Menu\Site\Helper\MenuHelper' not found: Class 'Joomla\Component\Content\Site\Service\Category' not found

So I tracked this down to Joomla wanting to load Joomla\Component\Content\Site\Service\Category but there is no PSR-4 namespace dir.

In the ClassLoader.php on line 381 we have the following code

if (isset($this->prefixDirsPsr4[$search])) {

This never matches eventually failing.

The big question is, why is this prefix dir missing on Windows??

avatar laoneo
laoneo - comment - 6 Aug 2018

Can you enable debugging in the joomla config and poste the full stack trace?

avatar roland-d
roland-d - comment - 6 Aug 2018

@laoneo It is not a PHP error but a Joomla captured error. Joomla only outputs these lines. Debug is on, error reporting is development. It won't get you anything more.

What are you looking for anyway in the stack trace? The array of the PSR-4 prefix dirs is missing a bunch of directories.

avatar mbabker
mbabker - comment - 6 Aug 2018

Then someone needs to figure out why the namespace map generator is inconsistently generating the map across environments.

avatar roland-d
roland-d - comment - 6 Aug 2018

@mbabker Any pointers on where to start looking?

avatar mbabker
mbabker - comment - 6 Aug 2018

https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/namespacemap.php

The database query result set being step 1, then how the elements array is built to see if there is any path where something could be excluded, and why it might be excluded.

avatar roland-d
roland-d - comment - 6 Aug 2018

Thank you for that pointer. What I did to debug was:

  1. Remove libraries/autoload_psr4.php
  2. Reload the page
  3. The script goes to JNamespacePsr4Map->load
  4. The script then calls JNamespacePsr4Map->create
  5. This loads the extensions to map. $extensions has 67 entries
  6. It looks for extensions in the admin location D:\wamp\www\joomla-cms\administrator/components/com_mailto
  7. It looks for extensions in the site location D:\wamp\www\joomla-cms\administrator/components/com_mailto/src
  8. Here I decided to let it run again
  9. YOLO the frontpage loads
  10. The libraries/autoload_psr4.php is all filled up

I definitely deleted that file before and it didn't go and now it goes. Beats me.

Just now I have issue #21371 Moving on to the next part.

avatar frogydiak
frogydiak - comment - 8 Aug 2018

@roland-d I followed your debug process and I also get 67 extensions in the $extensions array but when I let it run the frontpage still gets an error:

Error: Class 'Joomla\Module\Menu\Site\Helper\MenuHelper' not found: Class 'Joomla\Module\Menu\Site\Helper\MenuHelper' not found

I get the same result even after deleting the autoload_psr4.php file several times, already tried clearing browser cache, nginx cache... still getting the same issue. I also tried installing XAMPP VM with PhP7.2.8 just because I thought something might be conflicting with using laravel valet. Well, unfortunately, I get the same error with new install, vanilla everything and only Joomla 4 nightly build alpha5 as of Aug 8 is installed and still getting the same issue.

I don't know how you did it but since you are using Windows which I don't have so I cannot test.

avatar mbabker
mbabker - comment - 8 Aug 2018

Before the workflow stuff merged, 67 extensions in the query looks about right compared to my local 4.0 install. So if the query is consistently returning that data set when the file is being generated, then there is an issue with entries not being added to the mapping array to be written to disk.

avatar frogydiak
frogydiak - comment - 9 Aug 2018

Here's my autoload_psr4.php, if there's discrepancy to yours then something might be causing it.

<?php
defined('_JEXEC') or die;
return array(
	'Joomla\\Component\\Mailto\\Site\\' => [JPATH_ROOT . "/components/com_mailto",],
	'Joomla\\Component\\Wrapper\\Site\\' => [JPATH_ROOT . "/components/com_wrapper",],
	'Joomla\\Component\\Admin\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_admin",],
	'Joomla\\Component\\Banners\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_banners",],
	'Joomla\\Component\\Banners\\Site\\' => [JPATH_ROOT . "/components/com_banners",],
	'Joomla\\Component\\Cache\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_cache",],
	'Joomla\\Component\\Categories\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_categories",],
	'Joomla\\Component\\Checkin\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_checkin",],
	'Joomla\\Component\\Contact\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_contact",],
	'Joomla\\Component\\Contact\\Site\\' => [JPATH_ROOT . "/components/com_contact",],
	'Joomla\\Component\\Cpanel\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_cpanel",],
	'Joomla\\Component\\Installer\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_installer",],
	'Joomla\\Component\\Languages\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_languages",],
	'Joomla\\Component\\Login\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_login",],
	'Joomla\\Component\\Media\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_media/src/",],
	'Joomla\\Component\\Media\\Site\\' => [JPATH_ROOT . "/components/com_media",],
	'Joomla\\Component\\Menus\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_menus",],
	'Joomla\\Component\\Menus\\Site\\' => [JPATH_ROOT . "/components/com_menus",],
	'Joomla\\Component\\Messages\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_messages",],
	'Joomla\\Component\\Modules\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_modules",],
	'Joomla\\Component\\Modules\\Site\\' => [JPATH_ROOT . "/components/com_modules",],
	'Joomla\\Component\\Newsfeeds\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_newsfeeds",],
	'Joomla\\Component\\Newsfeeds\\Site\\' => [JPATH_ROOT . "/components/com_newsfeeds",],
	'Joomla\\Component\\Plugins\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_plugins",],
	'Joomla\\Component\\Search\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_search",],
	'Joomla\\Component\\Search\\Site\\' => [JPATH_ROOT . "/components/com_search",],
	'Joomla\\Component\\Templates\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_templates",],
	'Joomla\\Component\\Content\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_content",],
	'Joomla\\Component\\Content\\Site\\' => [JPATH_ROOT . "/components/com_content",],
	'Joomla\\Component\\Config\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_config",],
	'Joomla\\Component\\Config\\Site\\' => [JPATH_ROOT . "/components/com_config",],
	'Joomla\\Component\\Redirect\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_redirect",],
	'Joomla\\Component\\Users\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_users",],
	'Joomla\\Component\\Users\\Site\\' => [JPATH_ROOT . "/components/com_users",],
	'Joomla\\Component\\Finder\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_finder",],
	'Joomla\\Component\\Finder\\Site\\' => [JPATH_ROOT . "/components/com_finder",],
	'Joomla\\Component\\Joomlaupdate\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_joomlaupdate",],
	'Joomla\\Component\\Tags\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_tags",],
	'Joomla\\Component\\Tags\\Site\\' => [JPATH_ROOT . "/components/com_tags",],
	'Joomla\\Component\\Contenthistory\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_contenthistory",],
	'Joomla\\Component\\Contenthistory\\Site\\' => [JPATH_ROOT . "/components/com_contenthistory",],
	'Joomla\\Component\\Postinstall\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_postinstall",],
	'Joomla\\Component\\Fields\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_fields",],
	'Joomla\\Component\\Fields\\Site\\' => [JPATH_ROOT . "/components/com_fields",],
	'Joomla\\Component\\Associations\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_associations",],
	'Joomla\\Component\\Csp\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_csp",],
	'Joomla\\Component\\Csp\\Site\\' => [JPATH_ROOT . "/components/com_csp",],
	'Joomla\\Module\\ArticlesArchive\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_articles_archive",],
	'Joomla\\Module\\ArticlesLatest\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_articles_latest",],
	'Joomla\\Module\\ArticlesPopular\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_articles_popular",],
	'Joomla\\Module\\Banners\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_banners",],
	'Joomla\\Module\\Breadcrumbs\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_breadcrumbs",],
	'Joomla\\Module\\Feed\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_feed",],
	'Joomla\\Module\\Footer\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_footer",],
	'Joomla\\Module\\Login\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_login",],
	'Joomla\\Module\\Menu\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_menu",],
	'Joomla\\Module\\ArticlesNews\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_articles_news",],
	'Joomla\\Module\\RandomImage\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_random_image",],
	'Joomla\\Module\\RelatedItems\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_related_items",],
	'Joomla\\Module\\Search\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_search",],
	'Joomla\\Module\\Stats\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_stats",],
	'Joomla\\Module\\Syndicate\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_syndicate",],
	'Joomla\\Module\\UsersLatest\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_users_latest",],
	'Joomla\\Module\\Whosonline\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_whosonline",],
	'Joomla\\Module\\Wrapper\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_wrapper",],
	'Joomla\\Module\\ArticlesCategory\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_articles_category",],
	'Joomla\\Module\\ArticlesCategories\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_articles_categories",],
	'Joomla\\Module\\Languages\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_languages",],
	'Joomla\\Module\\Finder\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_finder",],
	'Joomla\\Module\\Latest\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_latest",],
	'Joomla\\Module\\Logged\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_logged",],
	'Joomla\\Module\\Popular\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_popular",],
	'Joomla\\Module\\Quickicon\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_quickicon",],
	'Joomla\\Module\\Multilangstatus\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_multilangstatus",],
	'Joomla\\Module\\Version\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_version",],
	'Joomla\\Module\\StatsAdmin\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_stats_admin",],
	'Joomla\\Module\\TagsPopular\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_tags_popular",],
	'Joomla\\Module\\TagsSimilar\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_tags_similar",],
	'Joomla\\Module\\Sampledata\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_sampledata",],
);
avatar frogydiak
frogydiak - comment - 9 Aug 2018

I tried to unpublished all the Menu Modules and then error is pointing to a different one, this time it is the Article Archive module but if you guys noticed, it is the Helper class.

Error: Class 'Joomla\Module\ArticlesArchive\Site\Helper\ArticlesArchiveHelper' not found: Class 'Joomla\Module\ArticlesArchive\Site\Helper\ArticlesArchiveHelper' not found

modules site - joomla 4

I went ahead and disabled all the modules that is being loaded that relates to the error and it finally render but still, the error is with helper class. Is there a different loader for helpers?

moudule error joomla 4

avatar mbabker
mbabker - comment - 10 Aug 2018

None of the frontend modules have the correct path or app namespace in your dump. Compare to mine.

<?php
defined('_JEXEC') or die;
return array(
	'Joomla\\Component\\Mailto\\Site\\' => [JPATH_ROOT . "/components/com_mailto",],
	'Joomla\\Component\\Wrapper\\Site\\' => [JPATH_ROOT . "/components/com_wrapper",],
	'Joomla\\Component\\Admin\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_admin",],
	'Joomla\\Component\\Banners\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_banners",],
	'Joomla\\Component\\Banners\\Site\\' => [JPATH_ROOT . "/components/com_banners",],
	'Joomla\\Component\\Cache\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_cache",],
	'Joomla\\Component\\Categories\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_categories",],
	'Joomla\\Component\\Checkin\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_checkin",],
	'Joomla\\Component\\Contact\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_contact",],
	'Joomla\\Component\\Contact\\Site\\' => [JPATH_ROOT . "/components/com_contact",],
	'Joomla\\Component\\Cpanel\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_cpanel",],
	'Joomla\\Component\\Installer\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_installer",],
	'Joomla\\Component\\Languages\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_languages",],
	'Joomla\\Component\\Login\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_login",],
	'Joomla\\Component\\Media\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_media/src/",],
	'Joomla\\Component\\Media\\Site\\' => [JPATH_ROOT . "/components/com_media",],
	'Joomla\\Component\\Menus\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_menus",],
	'Joomla\\Component\\Menus\\Site\\' => [JPATH_ROOT . "/components/com_menus",],
	'Joomla\\Component\\Messages\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_messages",],
	'Joomla\\Component\\Modules\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_modules",],
	'Joomla\\Component\\Modules\\Site\\' => [JPATH_ROOT . "/components/com_modules",],
	'Joomla\\Component\\Newsfeeds\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_newsfeeds",],
	'Joomla\\Component\\Newsfeeds\\Site\\' => [JPATH_ROOT . "/components/com_newsfeeds",],
	'Joomla\\Component\\Plugins\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_plugins",],
	'Joomla\\Component\\Search\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_search",],
	'Joomla\\Component\\Search\\Site\\' => [JPATH_ROOT . "/components/com_search",],
	'Joomla\\Component\\Templates\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_templates",],
	'Joomla\\Component\\Content\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_content",],
	'Joomla\\Component\\Content\\Site\\' => [JPATH_ROOT . "/components/com_content",],
	'Joomla\\Component\\Config\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_config",],
	'Joomla\\Component\\Config\\Site\\' => [JPATH_ROOT . "/components/com_config",],
	'Joomla\\Component\\Redirect\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_redirect",],
	'Joomla\\Component\\Users\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_users",],
	'Joomla\\Component\\Users\\Site\\' => [JPATH_ROOT . "/components/com_users",],
	'Joomla\\Component\\Finder\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_finder",],
	'Joomla\\Component\\Finder\\Site\\' => [JPATH_ROOT . "/components/com_finder",],
	'Joomla\\Component\\Joomlaupdate\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_joomlaupdate",],
	'Joomla\\Component\\Tags\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_tags",],
	'Joomla\\Component\\Tags\\Site\\' => [JPATH_ROOT . "/components/com_tags",],
	'Joomla\\Component\\Contenthistory\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_contenthistory",],
	'Joomla\\Component\\Contenthistory\\Site\\' => [JPATH_ROOT . "/components/com_contenthistory",],
	'Joomla\\Component\\Postinstall\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_postinstall",],
	'Joomla\\Component\\Fields\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_fields",],
	'Joomla\\Component\\Fields\\Site\\' => [JPATH_ROOT . "/components/com_fields",],
	'Joomla\\Component\\Associations\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_associations",],
	'Joomla\\Component\\Csp\\Administrator\\' => [JPATH_ROOT . "/administrator/components/com_csp",],
	'Joomla\\Component\\Csp\\Site\\' => [JPATH_ROOT . "/components/com_csp",],
	'Joomla\\Module\\ArticlesArchive\\Site\\' => [JPATH_ROOT . "/modules/mod_articles_archive",],
	'Joomla\\Module\\ArticlesLatest\\Site\\' => [JPATH_ROOT . "/modules/mod_articles_latest",],
	'Joomla\\Module\\ArticlesPopular\\Site\\' => [JPATH_ROOT . "/modules/mod_articles_popular",],
	'Joomla\\Module\\Banners\\Site\\' => [JPATH_ROOT . "/modules/mod_banners",],
	'Joomla\\Module\\Breadcrumbs\\Site\\' => [JPATH_ROOT . "/modules/mod_breadcrumbs",],
	'Joomla\\Module\\Feed\\Site\\' => [JPATH_ROOT . "/modules/mod_feed",],
	'Joomla\\Module\\Footer\\Site\\' => [JPATH_ROOT . "/modules/mod_footer",],
	'Joomla\\Module\\Login\\Site\\' => [JPATH_ROOT . "/modules/mod_login",],
	'Joomla\\Module\\Menu\\Site\\' => [JPATH_ROOT . "/modules/mod_menu",],
	'Joomla\\Module\\ArticlesNews\\Site\\' => [JPATH_ROOT . "/modules/mod_articles_news",],
	'Joomla\\Module\\RandomImage\\Site\\' => [JPATH_ROOT . "/modules/mod_random_image",],
	'Joomla\\Module\\RelatedItems\\Site\\' => [JPATH_ROOT . "/modules/mod_related_items",],
	'Joomla\\Module\\Search\\Site\\' => [JPATH_ROOT . "/modules/mod_search",],
	'Joomla\\Module\\Stats\\Site\\' => [JPATH_ROOT . "/modules/mod_stats",],
	'Joomla\\Module\\Syndicate\\Site\\' => [JPATH_ROOT . "/modules/mod_syndicate",],
	'Joomla\\Module\\UsersLatest\\Site\\' => [JPATH_ROOT . "/modules/mod_users_latest",],
	'Joomla\\Module\\Whosonline\\Site\\' => [JPATH_ROOT . "/modules/mod_whosonline",],
	'Joomla\\Module\\Wrapper\\Site\\' => [JPATH_ROOT . "/modules/mod_wrapper",],
	'Joomla\\Module\\ArticlesCategory\\Site\\' => [JPATH_ROOT . "/modules/mod_articles_category",],
	'Joomla\\Module\\ArticlesCategories\\Site\\' => [JPATH_ROOT . "/modules/mod_articles_categories",],
	'Joomla\\Module\\Languages\\Site\\' => [JPATH_ROOT . "/modules/mod_languages",],
	'Joomla\\Module\\Finder\\Site\\' => [JPATH_ROOT . "/modules/mod_finder",],
	'Joomla\\Module\\Feed\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_feed",],
	'Joomla\\Module\\Latest\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_latest",],
	'Joomla\\Module\\Logged\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_logged",],
	'Joomla\\Module\\Login\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_login",],
	'Joomla\\Module\\Menu\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_menu",],
	'Joomla\\Module\\Popular\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_popular",],
	'Joomla\\Module\\Quickicon\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_quickicon",],
	'Joomla\\Module\\Multilangstatus\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_multilangstatus",],
	'Joomla\\Module\\Version\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_version",],
	'Joomla\\Module\\StatsAdmin\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_stats_admin",],
	'Joomla\\Module\\TagsPopular\\Site\\' => [JPATH_ROOT . "/modules/mod_tags_popular",],
	'Joomla\\Module\\TagsSimilar\\Site\\' => [JPATH_ROOT . "/modules/mod_tags_similar",],
	'Joomla\\Module\\Sampledata\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_sampledata",],
);

So the problem in your dump is all the modules are being given the admin app namespace and path, and the frontend modules aren't being handled correctly.

That leads me to this line. The strict comparison here can't work and to be honest I'm mildly surprised it ever did work even some of the time (there is a known quirk with how MySQLi handles bound result sets that can cause values to be typecast to the right PHP type in some cases). $extension->client_id needs to be typecast before comparison.

If you want to consistently reproduce this issue, switch to PDO MySQL, or potentially PostgreSQL.

avatar frogydiak
frogydiak - comment - 10 Aug 2018

I forgot to mention, I used PDO after reading the advantages from MySQLi and since J4 has it so that's what I've been using.

And you found what's causing the error @mbabker I switched to MySQLi and that error is gone!

Now I know I'm not just pestering you guys :D it was an issue. Since I'm no expert, I'll let you fix that code :D

avatar wilsonge
wilsonge - comment - 12 Aug 2018

Should be fixed with 17f0b2f

This was a useful report - thanks!

avatar wilsonge wilsonge - change - 12 Aug 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-08-12 23:48:19
Closed_By wilsonge
avatar wilsonge wilsonge - close - 12 Aug 2018
avatar Hestros
Hestros - comment - 7 Oct 2018

This issue actually is produced if you have previously installed Joomla 4. Somehow the non component extensions has no values on the namespace field. So simply take the sql (INSERT in #extensions) from installation folder and run it on db directly and voala!
p.s. Don't forget to adjust the prefix (#
)! :-)

Add a Comment

Login with GitHub to post a comment