Create a multilingual site.
The multilingual status module displays in the status position.
the icon does not display
var_dump gives
Error: Class 'Joomla\Module\Multilangstatus\Administrator\Helper\MultilangstatusAdminHelper' not found: Class 'Joomla\Module\Multilangstatus\Administrator\Helper\MultilangstatusAdminHelper' not found
Labels |
Added:
?
|
Status | New | ⇒ | Discussion |
Category | ⇒ | Multilanguage |
maybe similar but not the same afaik. this one concerns modules
Delete the namespace map and let the plugin recreate it as explained in 20902 and see if that fixes it. If it did then it's not an error in joomla and is caused by an old branch
OK, found the issue and will solve it.
This happens on a clean install, not an old branch at all
Deleting autoload_psr4.php
and letting the plugin recreate it has no effect.
Deleting the namespacemap.php
file makes no sense and, if done, kills the site with "Error".
Real tests saves a lot of time: It takes 10 minutes to create such a site.
The call to MultilangstatusAdminHelper
is done in the mod_status module
https://github.com/joomla/joomla-cms/blob/4.0-dev/administrator/modules/mod_status/tmpl/default.php#L20
and used further down multiple times
Just var_dump(MultilangstatusAdminHelper::isEnabled());
line 21 to get the class not found.
/libraries/autoload_psr4.php
by adding
'Joomla\\Module\\Multilangstatus\\Administrator\\' => [JPATH_ROOT . "/administrator/modules/mod_multilangstatus",],
Therefore
/libraries/namespacemap.php
is unable to add that line.
I trace this to the _extensions table namespace
column for the module:
It is empty and therefore protected function getNamespacedExtensions()
does not return the extension.
Looked at our sql: it does not include the namespace for that module.
Also not in the update sql.
Will make a patch to add Joomla\Module\Multilangstatus
in the namespace column for that module in joomla.sql as well as in the sql update.
I prepared a patch but my results are weird for anew install.
diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-07-08.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-07-08.sql
new file mode 100644
index 0000000..5ff17f1
--- /dev/null
+++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-07-08.sql
@@ -0,0 +1 @@
+UPDATE `#__extensions` SET `namespace` = 'Joomla\\Module\\Multilangstatus' WHERE `name` = 'mod_multilangstatus';
diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-07-08.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-07-08.sql
new file mode 100644
index 0000000..5ff17f1
--- /dev/null
+++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-07-08.sql
@@ -0,0 +1 @@
+UPDATE `#__extensions` SET `namespace` = 'Joomla\\Module\\Multilangstatus' WHERE `name` = 'mod_multilangstatus';
diff --git a/installation/sql/mysql/joomla.sql b/installation/sql/mysql/joomla.sql
index ef95d53..661b221 100644
--- a/installation/sql/mysql/joomla.sql
+++ b/installation/sql/mysql/joomla.sql
@@ -572,5 +572,5 @@
(311, 0, 'mod_title', 'module', 'mod_title', '', 1, 1, 1, 0, '', '', 0, '0000-00-00 00:00:00', 0, 0, ''),
(312, 0, 'mod_toolbar', 'module', 'mod_toolbar', '', 1, 1, 1, 1, '', '', 0, '0000-00-00 00:00:00', 0, 0, ''),
-(313, 0, 'mod_multilangstatus', 'module', 'mod_multilangstatus', '', 1, 1, 1, 0, '', '{"cache":"0"}', 0, '0000-00-00 00:00:00', 0, 0, ''),
+(313, 0, 'mod_multilangstatus', 'module', 'mod_multilangstatus', '', 1, 1, 1, 0, '', '{"cache":"0"}', 0, '0000-00-00 00:00:00', 0, 0, 'Joomla\\Module\\Multilangstatus'),
(314, 0, 'mod_version', 'module', 'mod_version', '', 1, 1, 1, 0, '', '{"cache":"0"}', 0, '0000-00-00 00:00:00', 0, 0, 'Joomla\\Module\\Version'),
(315, 0, 'mod_stats_admin', 'module', 'mod_stats_admin', '', 1, 1, 1, 0, '', '{"serverinfo":"0","siteinfo":"0","counter":"0","increase":"0","cache":"1","cache_time":"900","cachemode":"static"}', 0, '0000-00-00 00:00:00', 0, 0, 'Joomla\\Module\\StatsAdmin'),
diff --git a/installation/sql/postgresql/joomla.sql b/installation/sql/postgresql/joomla.sql
index 49c687a..e0c4fd6 100644
--- a/installation/sql/postgresql/joomla.sql
+++ b/installation/sql/postgresql/joomla.sql
@@ -585,5 +585,5 @@
(311, 0, 'mod_title', 'module', 'mod_title', '', 1, 1, 1, 0, '', '', 0, '1970-01-01 00:00:00', 0, 0, ''),
(312, 0, 'mod_toolbar', 'module', 'mod_toolbar', '', 1, 1, 1, 1, '', '', 0, '1970-01-01 00:00:00', 0, 0, ''),
-(313, 0, 'mod_multilangstatus', 'module', 'mod_multilangstatus', '', 1, 1, 1, 0, '', '{"cache":"0"}', 0, '1970-01-01 00:00:00', 0, 0, ''),
+(313, 0, 'mod_multilangstatus', 'module', 'mod_multilangstatus', '', 1, 1, 1, 0, '', '{"cache":"0"}', 0, '1970-01-01 00:00:00', 0, 0, 'Joomla\\Module\\Multilangstatus'),
(314, 0, 'mod_version', 'module', 'mod_version', '', 1, 1, 1, 0, '', '{"cache":"0"}', 0, '1970-01-01 00:00:00', 0, 0, ''),
(315, 0, 'mod_stats_admin', 'module', 'mod_stats_admin', '', 1, 1, 1, 0, '', '{"serverinfo":"0","siteinfo":"0","counter":"0","increase":"0","cache":"1","cache_time":"900","cachemode":"static"}', 0, '1970-01-01 00:00:00', 0, 0, ''),
When I do a clean install, the namespace is still NOT added in the column.
If I update with the specific query, it works fine.
Any idea?
Closed_By | franz-wohlkoenig | ⇒ | joomla-cms-bot |
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-07-09 03:59:30 |
Closed_By | ⇒ | franz-wohlkoenig |
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/21009
Same.as #20823 ?