error < Class 'JString' not found > after migration to version 4

General questions regarding the use of languages in Joomla! 4.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
User avatar
jmgroud
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Fri Apr 22, 2011 9:16 pm
Location: Paris (France)
Contact:

error < Class 'JString' not found > after migration to version 4

Post by jmgroud » Mon Dec 27, 2021 6:02 pm

----------------------------------------------------------------
English

Hello

I have this error message in administration (backend) :
Une erreur s'est produite
0 Class 'JString' not found


The site seems to work properly (frontend)
I have access to articles, users, menus, list of extensions, etc... in administration (backend) but I don't have access to the following configuration options (error message):
- Administration
- System
- Help

Not having access to the options of installation of the extensions to update those not compatible with the version 4 of Joomla I do not know if these updates could correct this error...
For example: Admin Tools, Akeeba Backup
So I'm stuck :-(

Do you have an idea? Thanks in advance for your help.

----------------------------------------------------------------
Français

Bonjour

J'ai cette erreur en administration (backend)
Une erreur s'est produite
0 Class 'JString' not found


Le site semble fonctionner correctement (frontend)
J'ai accès aux articles, utilisateurs, menus, liste des extensions, etc... en administration (backend) mais je n'ai pas accès aux options de configuration suivantes (message d'erreur) :
- Administration
- Système
- Aide

N'ayant pas accès aux options d'installation des extensions pour mettre à jour celles non compatibles avec la version 4 de Joomla je ne sais pas si ces mises à jours pourraient corriger cette erreur...
Par exemple : Admin Tools, Akeeba Backup
Je suis donc bloqué :-(
Avez-vous une idée ? Merci d'avance pour votre aide.
Last edited by toivo on Mon Dec 27, 2021 10:46 pm, edited 1 time in total.
Reason: mod note: moved from 4.x Migrating and Upgrading
Le peu que je sais est occulté par le trop que je ne sais pas...

User avatar
jmgroud
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Fri Apr 22, 2011 9:16 pm
Location: Paris (France)
Contact:

Re: error < Class 'JString' not found > after migration to version 4

Post by jmgroud » Mon Dec 27, 2021 8:00 pm

---------------------------------------------------------------------
English

I answer myself after some research...
The error comes from the translation file "language/en-FR/en-FR.localise.php".
The line "$str = JString::strtolower($string);" must be changed to "$str = StringHelper::strtolower($string);".

With this modification, I manage to have the login page with the login and the password.

Unfortunately, after login, I get another error:
Class "StringHelper" not found

Any idea ?

---------------------------------------------------------------------
Français

Je me réponds à moi-même suite à quelques recherches...
L'erreur vient du fichier de traduction "language/fr-FR/fr-FR.localise.php".
Il faut modifier la ligne "$str = JString::strtolower($string);" par "$str = StringHelper::strtolower($string);".

Avec cette modification, j'arrive à avoir la page de connexion avec l'identifiant et le mot de passe.

Malheureusement, après connexion, j'ai une autre erreur :
Class "StringHelper" not found

Une idée ?
Le peu que je sais est occulté par le trop que je ne sais pas...

User avatar
jmgroud
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Fri Apr 22, 2011 9:16 pm
Location: Paris (France)
Contact:

Re: error < Class 'JString' not found > after migration to version 4

Post by jmgroud » Mon Dec 27, 2021 8:10 pm

---------------------------------------------------------------
English

I think I found it.
Still in the same translation file "language/en-FR/en-FR.localise.php".
It is necessary to add the line "use Joomla\String\StringHelper;"
after the line "\defined('_JEXEC') or die;".

---------------------------------------------------------------
Français

Je pense avoir trouvé.
Toujours dans le même fichier de traduction "language/fr-FR/fr-FR.localise.php".
Il faut ajouter la ligne "use Joomla\String\StringHelper;"
après la ligne "\defined('_JEXEC') or die;".
Le peu que je sais est occulté par le trop que je ne sais pas...


Locked

Return to “Language - Joomla! 4.x”