Class 'JString not found Joomla 4.0

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.
Harm222
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sun Aug 22, 2021 4:18 pm

Class 'JString not found Joomla 4.0

Post by Harm222 » Sun Aug 22, 2021 4:25 pm

After I upgrade the site from 3.10 to 4.0 I get the error Class 'JString' not found instead of the control panel or system panel. Do you know a solution to this problem?

Regards,
Harry
Last edited by toivo on Thu Sep 15, 2022 5:49 am, edited 2 times in total.
Reason: mod note: moved from 4.x Installation, then from 4.x Migrating and Upgrading

wejom21
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Mon Aug 23, 2021 4:19 am

Re: Class 'JString not found Joomla 4.0

Post by wejom21 » Mon Aug 23, 2021 4:24 am

I think is not time to update your joomla 3.10 to Joomla 4. As far as i know J3.10 will support and it is the preparation for J4 but you cannot update directly from J3.10 to J4; J3.10 is a support that will merge soon (it will take some years) then it would be seemless update to J4.

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17468
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Class 'JString not found Joomla 4.0

Post by toivo » Mon Aug 23, 2021 6:04 am

wejom21 wrote:
Mon Aug 23, 2021 4:24 am
I think is not time to update your joomla 3.10 to Joomla 4. As far as i know J3.10 will support and it is the preparation for J4 but you cannot update directly from J3.10 to J4; J3.10 is a support that will merge soon (it will take some years) then it would be seemless update to J4.
@wejom21, the information you gave is inconsistent and incorrect.

Read the documentation: Joomla 3.x to 4.x Step by Step Migration
Toivo Talikka, Global Moderator

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17468
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Class 'JString not found Joomla 4.0

Post by toivo » Mon Aug 23, 2021 6:09 am

Harm222 wrote:
Sun Aug 22, 2021 4:25 pm
After I upgrade the site from 3.10 to 4.0 I get the error Class 'JString' not found instead of the control panel or system panel. Do you know a solution to this problem?
Welcome to the Joomla forum!

Possibly one third party extension is not compatible with Joomla 4.x.

More information is required. Please post the results from the Forum Post Assistant (FPA) by following the instructions at https://forumpostassistant.github.io/docs so that our volunteer experts can review the configuration.
Toivo Talikka, Global Moderator

Harm222
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sun Aug 22, 2021 4:18 pm

Re: Class 'JString not found Joomla 4.0

Post by Harm222 » Mon Aug 23, 2021 7:04 am

Thanks for the quick response. It was a clean install, without third part extensions, and then the upgrade to 4.0. I will look further into the document you have provided.

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17468
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Class 'JString not found Joomla 4.0

Post by toivo » Mon Aug 23, 2021 8:57 am

The FPA results would allow the configuration to be checked, in case there are other issues.

Check if the following file libraries/vendor/joomla/string/src/StringHelper.php exists. That file defines the namespace Joomla\String. If the file does not exist, get it from the Joomla 4.0 install package and copy it to the web server, which may fix the issue.

Joomla 3.10 defines an abstract class JString in the file libraries/joomla/string/string.php. Neither 3.10 nor 4.0 instantiate the class JString on its own, 4.0 referring only to functions defined in the namespace. That is why an obsolete third party extension, perhaps a plugin or a template, could be causing the error.

Just tested a clean 3.10 installation on Wampserver using PHP 7.4.12, then upgraded the site to 4.0 using Live Update without any issues. The JString message you reported did not come up in 4.0.
Toivo Talikka, Global Moderator

User avatar
brian
Joomla! Master
Joomla! Master
Posts: 12787
Joined: Fri Aug 12, 2005 7:19 am
Location: Leeds, UK
Contact:

Re: Class 'JString not found Joomla 4.0

Post by brian » Mon Aug 23, 2021 10:15 am

Check if the following file libraries/vendor/joomla/string/src/StringHelper.php exists. That file defines the namespace Joomla\String. If the file does not exist, get it from the Joomla 4.0 install package and copy it to the web server, which may fix the issue.
If the file does not exist then assume that other files will not exist as well and that you should revert to a known good backup on a clean webspacce.
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/

User avatar
formfranska
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 179
Joined: Sun Dec 28, 2008 3:25 pm
Location: Sweden
Contact:

Re: Class 'JString not found Joomla 4.0

Post by formfranska » Thu Aug 26, 2021 4:28 pm

I'm having the same issue. I checked that the file libraries/vendor/joomla/string/src/StringHelper.php exists.

I'm aware I need to update Akeeba software for J4 but I'm not able to as long as I get this error I think 😅

Below is my FPA info. Would really appreciate your help 😊

--------
Forum Post Assistant (v1.6.2) : 26-Aug-2021 wrote:
Basic Environment :: wrote:Joomla! Instance :: Joomla! 4.0.2-Stable (Furaha) 24-August-2021
Joomla! Configured :: Yes | Writable (644) |
Configuration Options :: Offline: false | SEF: true | SEF Suffix: false | SEF ReWrite: true | .htaccess/web.config: Yes | GZip: false | Cache: false | CacheTime: 15 | CacheHandler: file | CachePlatformPrefix: false | FTP Layer: false | Proxy: false | LiveSite: | Session lifetime: 60 | Session handler: database | Shared sessions: false | SSL: 2 | Error Reporting: default | Site Debug: false | Language Debug: false | Default Access: 1 | Unicode Slugs: false | dbConnection Type: mysqli | PHP Supports J! 4.0.2: Yes | Database Supports J! 4.0.2: Yes | Database Credentials Present: Yes |

Host Configuration :: OS: Linux | OS Version: 3.10.0-962.3.2.lve1.5.38.el6h.x86_64 | Technology: x86_64 | Web Server: LiteSpeed | Encoding: gzip, deflate, br | System TMP Writable: Yes | Free Disk Space : 680.32 GiB |

PHP Configuration :: Version: 7.4.22 | PHP API: litespeed | Session Path Writable: Yes | Display Errors: | Error Reporting: 22519 | Log Errors To: error_log | Last Known Error: | Register Globals: | Magic Quotes: | Safe Mode: | Allow url fopen: 1 | Open Base: | Uploads: 1 | Max. Upload Size: 50M | Max. POST Size: 50M | Max. Input Time: 90 | Max. Execution Time: 90 | Memory Limit: 512M

Database Configuration :: Version: 5.5.5-10.3.30-MariaDB-cll-lve (Client:mysqlnd 7.4.22) | Database Size: 5.98 MiB | #of Tables with config prefix: 116 | #of other Tables: 0 | User Privileges : GRANT SELECTUser Privileges : INSERTUser Privileges : UPDATEUser Privileges : DELETEUser Privileges : CREATEUser Privileges : DROPUser Privileges : REFERENCESUser Privileges : INDEXUser Privileges : ALTERUser Privileges : CREATE TEMPORARY TABLESUser Privileges : LOCK TABLESUser Privileges : EXECUTEUser Privileges : CREATE VIEWUser Privileges : SHOW VIEWUser Privileges : CREATE ROUTINEUser Privileges : ALTER ROUTINEUser Privileges : EVENTUser Privileges : TRIGGER
Detailed Environment :: wrote:PHP Extensions :: Core (7.4.22) | date (7.4.22) | libxml (7.4.22) | openssl (7.4.22) | pcre (7.4.22) | sqlite3 (7.4.22) | zlib (7.4.22) | bz2 (7.4.22) | calendar (7.4.22) | ctype (7.4.22) | curl (7.4.22) | hash (7.4.22) | filter (7.4.22) | ftp (7.4.22) | gettext (7.4.22) | gmp (7.4.22) | SPL (7.4.22) | iconv (7.4.22) | pcntl (7.4.22) | readline (7.4.22) | Reflection (7.4.22) | session (7.4.22) | standard (7.4.22) | shmop (7.4.22) | SimpleXML (7.4.22) | mbstring (7.4.22) | tokenizer (7.4.22) | xml (7.4.22) | litespeed () | i360 (1.0) | bcmath (7.4.22) | dba (7.4.22) | dom (20031129) | enchant (7.4.22) | fileinfo (7.4.22) | gd (7.4.22) | imap (7.4.22) | intl (7.4.22) | json (7.4.22) | ldap (7.4.22) | exif (7.4.22) | mysqlnd (mysqlnd 7.4.22) | mysqli (7.4.22) | PDO (7.4.22) | pdo_mysql (7.4.22) | odbc (7.4.22) | PDO_ODBC (7.4.22) | pdo_pgsql (7.4.22) | pdo_sqlite (7.4.22) | pgsql (7.4.22) | Phar (7.4.22) | posix (7.4.22) | pspell (7.4.22) | snmp (7.4.22) | soap (7.4.22) | sockets (7.4.22) | sysvmsg (7.4.22) | sysvsem (7.4.22) | sysvshm (7.4.22) | xmlreader (7.4.22) | xmlrpc (7.4.22) | xmlwriter (7.4.22) | xsl (7.4.22) | zip (1.15.6) | ionCube Loader (10.4.3) | Zend OPcache (7.4.22) | Zend Engine (3.4.0) |
Potential Missing Extensions ::

Switch User Environment :: PHP CGI: No | Server SU: No | PHP SU: No | Potential Ownership Issues: No
Folder Permissions :: wrote:Core Folders :: images/ (755) | components/ (755) | modules/ (755) | plugins/ (755) | language/ (755) | templates/ (755) | cache/ (755) | logs/ (755) | tmp/ (755) | administrator/components/ (755) | administrator/modules/ (755) | administrator/language/ (755) | administrator/templates/ (755) | administrator/logs/ (755) |

Elevated Permissions (First 10) ::
Database Information :: wrote:Database statistics :: Uptime: 568267 | Threads: 16 | Questions: 120593725 | Slow queries: 242 | Opens: 1278331 | Flush tables: 19 | Open tables: 1600 | Queries per second avg: 212.213 |
Extensions Discovered :: wrote:Components :: Site ::
Core ::
3rd Party:: WF_POPUPS_JCEMEDIABOX_TITLE (2.9.11) ? | WF_AGGREGATOR_VIDEO_TITLE (2.9.11) ? | WF_AGGREGATOR_VIMEO_TITLE (2.9.11) ? | WF_AGGREGATOR_DAILYMOTION_TITLE (2.9.11) ? | WF_AGGREGATOR_[youtube]_TITLE (2.9.11) ? | WF_AGGREGATOR_AUDIO_TITLE (2.9.11) ? | WF_FILESYSTEM_JOOMLA_TITLE (2.9.11) ? | WF_LINK_SEARCH_TITLE (2.9.11) ? | WF_LINKS_JOOMLALINKS_TITLE (2.9.11) ? | WF_FILEMANAGER_TITLE (2.9.11) ? | WF_TEMPLATEMANAGER_TITLE (2.9.11) ? | WF_FONTCOLOR_TITLE (2.9.11) ? | WF_CONTEXTMENU_TITLE (2.9.11) ? | WF_FULLSCREEN_TITLE (2.9.11) ? | WF_BROWSER_TITLE (2.9.11) ? | WF_ARTICLE_TITLE (2.9.11) ? | WF_LISTS_TITLE (2.9.11) ? | WF_FONTSIZESELECT_TITLE (2.9.11) ? | WF_VISUALCHARS_TITLE (2.9.11) ? | WF_VISUALBLOCKS_TITLE (2.9.11) ? | WF_IMGMANAGER_TITLE (2.9.11) ? | WF_TABLE_TITLE (2.9.11) ? | WF_REFERENCE_TITLE (2.9.11) ? | WF_CLIPBOARD_TITLE (2.9.11) ? | WF_LINK_TITLE (2.9.11) ? | WF_SPELLCHECKER_TITLE (2.9.11) ? | WF_IFRAME_TITLE (2.9.11) ? | WF_SOURCE_TITLE (2.9.11) ? | WF_ATTRIBUTES_TITLE (2.9.11) ? | WF_ANCHOR_TITLE (2.9.11) ? | WF_LAYER_TITLE (2.8.3) ? | WF_STYLE_TITLE (2.9.11) ? | WF_TEXTPATTERN_TITLE (2.9.11) ? | WF_SEARCHREPLACE_TITLE (2.9.11) ? | WF_PRINT_TITLE (2.9.11) ? | WF_FONTSELECT_TITLE (2.9.11) ? | WF_EMOTIONS_TITLE (2.9.11) ? | WF_STYLESELECT_TITLE (2.9.11) ? | WF_FORMATSELECT_TITLE (2.9.11) ? | WF_TEXTCASE_TITLE (2.9.11) ? | WF_WORDCOUNT_TITLE (2.9.11) ? | WF_CAPTION_TITLE (2.9.11) ? | JCE - Noneditable (1.0.0) ? | WF_HR_TITLE (2.9.11) ? | WF_MEDIAMANAGER_TITLE (2.9.11) ? | WF_MICRODATA_TITLE (2.9.11) ? | WF_PREVIEW_TITLE (2.9.11) ? | WF_IMGMANAGER_EXT_TITLE (2.9.11) ? | WF_XHTMLXTRAS_TITLE (2.9.11) ? | WF_HELP_TITLE (2.9.11) ? | WF_NONBREAKING_TITLE (2.9.11) ? | WF_CLEANUP_TITLE (2.9.11) ? | JCE - Columns (1.0.0) ? | WF_DIRECTIONALITY_TITLE (2.9.11) ? | WF_MEDIA_TITLE (2.9.11) ? | WF_CHARMAP_TITLE (2.9.11) ? | WF_AUTOSAVE_TITLE (2.9.11) ? | WF_KITCHENSINK_TITLE (2.9.11) ? |

Components :: Admin ::
Core :: com_joomlaupdate (4.0.2) 1 | com_redirect (4.0.0) 1 | com_cpanel (4.0.0) 1 | com_users (4.0.0) 1 | com_mails (4.0.0) 1 | com_login (4.0.0) 1 | com_menus (4.0.0) 1 | com_messages (4.0.0) 1 | com_wrapper (4.0.0) 1 | com_postinstall (4.0.0) 1 | com_workflow (4.0.0) 1 | com_media (3.0.0) 1 | com_newsfeeds (4.0.0) 1 | com_modules (4.0.0) 1 | com_search (3.0.0) 1 | com_templates (4.0.0) 1 | com_actionlogs (3.9.0) 1 | com_fields (4.0.0) 1 | com_privacy (3.9.0) 1 | com_cache (4.0.0) 1 | com_banners (4.0.0) 1 | com_languages (4.0.0) 1 | com_config (4.0.0) 1 | com_associations (4.0.0) 1 | com_tags (4.0.0) 1 | com_contenthistory (4.0.0) 1 | com_checkin (4.0.0) 1 | com_finder (4.0.0) 1 | com_categories (4.0.0) 1 | com_admin (4.0.0) 1 | com_plugins (4.0.0) 1 | com_installer (4.0.0) 1 | com_ajax (4.0.0) 1 | com_content (4.0.0) 1 |
3rd Party:: COM_JCE (2.9.11) 1 | WATCHFULLI (2.2.7) 1 | com_forseo (1.3.1.1083) 1 | Admintools (6.1.1) 1 | Akeeba (8.0.10) 1 |

Modules :: Site ::
Core :: mod_articles_categories (3.0.0) 1 | mod_login (3.0.0) 1 | mod_whosonline (3.0.0) 1 | mod_tags_popular (3.1.0) 1 | mod_feed (3.0.0) 1 | mod_articles_category (3.0.0) 1 | mod_articles_popular (3.0.0) 1 | mod_finder (3.0.0) 1 | mod_stats (3.0.0) 1 | mod_menu (3.0.0) 1 | mod_tags_similar (3.1.0) 1 | mod_search (3.0.0) 1 | mod_related_items (3.0.0) 1 | mod_footer (3.0.0) 1 | mod_wrapper (3.0.0) 1 | mod_users_latest (3.0.0) 1 | mod_articles_latest (3.0.0) 1 | mod_banners (3.0.0) 1 | mod_breadcrumbs (3.0.0) 1 | mod_articles_archive (3.0.0) 1 | mod_custom (3.0.0) 1 | mod_articles_news (3.0.0) 1 | mod_syndicate (3.0.0) 1 | mod_random_image (3.0.0) 1 | mod_languages (3.5.0) 1 |
3rd Party:: Builder (2.6.0-beta.3) 1 |

Modules :: Admin ::
Core :: mod_submenu (3.0.0) 1 | mod_login (3.0.0) 1 | mod_quickicon (3.0.0) 1 | mod_stats_admin (3.0.0) 1 | mod_feed (3.0.0) 1 | mod_latestactions (3.9.0) 1 | mod_sampledata (3.8.0) 1 | mod_latest (3.0.0) 1 | mod_menu (3.0.0) 1 | mod_privacy_dashboard (3.9.0) 1 | mod_post_installation_messages (4.0.0) 1 | mod_toolbar (3.0.0) 1 | mod_popular (3.0.0) 1 | mod_loginsupport (4.0.0) 1 | mod_messages (4.0.0) 1 | mod_title (3.0.0) 1 | mod_privacy_status (4.0.0) 1 | mod_frontend (4.0.0) 1 | mod_custom (3.0.0) 1 | mod_logged (3.0.0) 1 | mod_user (4.0.0) 1 | mod_version (3.0.0) 1 | mod_multilangstatus (3.0.0) 1 |
3rd Party::

Libraries ::
Core ::
3rd Party:: file_fof40 (4.0.0) ? |

Plugins ::
Core :: plg_system_cache (3.0.0) 0 | plg_system_httpheaders (4.0.0) 1 | plg_system_debug (3.0.0) 1 | plg_system_redirect (3.0.0) 0 | plg_system_sef (3.0.0) 1 | plg_system_privacyconsent (3.9.0) 0 | plg_system_languagefilter (3.0.0) 0 | plg_system_logrotation (3.9.0) 1 | plg_system_log (3.0.0) 1 | plg_system_updatenotification (3.5.0) 1 | plg_system_fields (3.7.0) 1 | plg_system_remember (3.0.0) 1 | plg_system_highlight (3.0.0) 1 | plg_system_skipto (4.0.0) 1 | plg_system_accessibility (4.0.0) 0 | plg_system_webauthn (4.0.0) 1 | plg_system_actionlogs (3.9.0) 1 | plg_system_stats (3.5.0) 1 | plg_system_sessiongc (3.8.6) 1 | plg_system_logout (3.0.0) 1 | plg_system_languagecode (3.0.0) 0 | plg_sampledata_multilang (4.0.0) 1 | plg_editors-xtd_article (3.0.0) 1 | plg_editors-xtd_menu (3.7.0) 1 | plg_editors-xtd_readmore (3.0.0) 1 | plg_editors-xtd_weblink (3.7.0) 0 | plg_editors-xtd_fields (3.7.0) 1 | plg_editors-xtd_image (3.0.0) 1 | plg_editors-xtd_pagebreak (3.0.0) 1 | plg_editors-xtd_module (3.5.0) 1 | plg_twofactorauth_yubikey (3.2.0) ? | plg_twofactorauth_totp (3.2.0) 0 | plg_actionlog_joomla (3.9.0) 1 | plg_api-authentication_token (4.0.0) 1 | plg_api-authentication_basic (4.0.0) 0 | plg_filesystem_local (4.0.0) 1 | plg_behaviour_versionable (4.0.0) 1 | plg_behaviour_taggable (4.0.0) 1 | plg_authentication_joomla (3.0.0) 1 | plg_authentication_ldap (3.0.0) 0 | plg_authentication_cookie (3.0.0) 1 | plg_quickicon_privacycheck (3.9.0) 1 | plg_quickicon_extensionupdate (3.0.0) 1 | plg_quickicon_phpversioncheck (3.7.0) 1 | plg_quickicon_downloadkey (4.0.0) 1 | plg_quickicon_joomlaupdate (3.0.0) 1 | plg_quickicon_overridecheck (4.0.0) 1 | plg_media-action_rotate (4.0.0) 1 | plg_media-action_resize (4.0.0) 1 | plg_media-action_crop (4.0.0) 1 | plg_webservices_plugins (4.0.0) 1 | plg_webservices_tags (4.0.0) 1 | plg_webservices_redirect (4.0.0) 1 | plg_webservices_newsfeeds (4.0.0) 1 | plg_webservices_languages (4.0.0) 1 | plg_webservices_users (4.0.0) 1 | plg_webservices_templates (4.0.0) 1 | plg_webservices_content (4.0.0) 1 | plg_webservices_messages (4.0.0) 1 | plg_webservices_privacy (4.0.0) 1 | plg_webservices_menus (4.0.0) 1 | plg_webservices_installer (4.0.0) 1 | plg_webservices_modules (4.0.0) 1 | plg_webservices_config (4.0.0) 1 | plg_webservices_banners (4.0.0) 1 | plg_user_token (3.9.0) 1 | plg_user_contactcreator (3.0.0) 0 | plg_user_joomla (3.0.0) 1 | plg_user_terms (3.9.0) 0 | plg_user_profile (3.0.0) 0 | plg_finder_categories (3.0.0) 1 | plg_finder_tags (3.0.0) 1 | plg_finder_newsfeeds (3.0.0) 1 | plg_finder_contacts (3.0.0) 1 | plg_finder_content (3.0.0) 1 | plg_captcha_recaptcha_invisible (3.8) 0 | plg_captcha_recaptcha (3.4.0) 0 | plg_fields_subform (4.0.0) 1 | plg_fields_calendar (3.7.0) 1 | plg_fields_usergrouplist (3.7.0) 1 | plg_fields_radio (3.7.0) 1 | plg_fields_integer (3.7.0) 1 | plg_fields_text (3.7.0) 1 | plg_fields_editor (3.7.0) 1 | plg_fields_checkboxes (3.7.0) 1 | plg_fields_color (3.7.0) 1 | plg_fields_user (3.7.0) 1 | plg_fields_imagelist (3.7.0) 1 | plg_fields_list (3.7.0) 1 | plg_fields_url (3.7.0) 1 | plg_fields_textarea (3.7.0) 1 | plg_fields_sql (3.7.0) 1 | plg_fields_media (3.7.0) 1 | plg_search_categories (3.0.0) 1 | plg_search_tags (3.0.0) 0 | plg_search_newsfeeds (3.0.0) 1 | plg_search_contacts (3.0.0) 1 | plg_search_content (3.0.0) 1 | plg_content_confirmconsent (3.9.0) 0 | plg_content_emailcloak (3.0.0) 1 | plg_content_joomla (3.0.0) 1 | plg_content_pagenavigation (3.0.0) 1 | plg_content_finder (3.0.0) 0 | plg_content_fields (3.7.0) 1 | plg_content_loadmodule (3.0.0) 1 | plg_content_vote (3.0.0) 1 | plg_content_pagebreak (3.0.0) 1 | plg_workflow_featuring (4.0.0) 1 | plg_workflow_publishing (4.0.0) 1 | plg_workflow_notification (4.0.0) 1 | plg_extension_joomla (3.0.0) 1 | plg_extension_namespacemap (4.0.0) 1 | plg_extension_finder (4.0.0) 1 | plg_privacy_consents (3.9.0) 1 | plg_privacy_message (3.9.0) 1 | plg_privacy_user (3.9.0) 1 | plg_privacy_actionlogs (3.9.0) 1 | plg_privacy_content (3.9.0) 1 | plg_installer_urlinstaller (3.6.0) 1 | plg_installer_packageinstaller (3.6.0) 1 | plg_installer_folderinstaller (3.6.0) 1 | plg_installer_override (4.0.0) 1 | plg_installer_webinstaller (4.0.0) 1 |
3rd Party:: plg_system_jce (2.9.11) 1 | PLG_SYSTEM_ADMINTOOLS (6.1.1) 1 | plg_system_jcemediabox (2.1.1) 0 | PLG_SYSTEM_FORSEO (1.3.1.1083) 1 | System - YOOtheme Framework (2.6.0-beta.3) 1 | PLG_SYSTEM_BACKUPONUPDATE (8.0.10) 1 | PLG_ACTIONLOG_AKEEBABACKUP (8.0.10) 0 | PLG_ACTIONLOG_ADMINTOOLS (6.1.1) 0 | plg_quickicon_akeebabackup (8.0.10) 1 | plg_quickicon_jce (2.9.11) 1 | plg_editors_jce (2.9.11) 1 | plg_editors_tinymce (5.8.2) 1 | plg_editors_codemirror (5.62.2) 1 | Fields - YOOtheme Location (2.6.0-beta.3) 1 | plg_fields_mediajce (2.9.11) 1 | plg_content_jce (2.9.11) 1 | plg_extension_jce (2.9.11) 1 | PLG_INSTALLER_AKEEBABACKUP (8.0.10) 1 | plg_installer_jce (2.9.11) 1 | PLG_INSTALLER_ADMINTOOLS (6.1.1) 1 | PLG_INSTALLER_FORSEO (1.3.1.1083) 1 | Installer - YOOtheme (1.0.3) 1 |
Templates Discovered :: wrote:Templates :: Site :: cassiopeia (1.0) 1 | yootheme (2.6.0-beta.3) 1 |
Templates :: Admin :: atum (1.0) 1 |
Joomler in Sweden :-)
https://www.formfranska.com

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 20652
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ Germany/ S'pore/Bogor/ North America
Contact:

Re: Class 'JString not found Joomla 4.0

Post by leolam » Thu Aug 26, 2021 4:45 pm

Many of your extensions are not compliant to/with Joomla 4; Templates, modules, components and more. Do your homework and follow the steps as outlined https://docs.joomla.org/Planning_for_Mi ... 0.x_to_4.x

Leo 8)
Joomla's #1 Professional Services Provider:
#Joomla Professional Support: https://gws-desk.com -
#Joomla Specialized Hosting Solutions: https://gws-host.com -

User avatar
formfranska
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 179
Joined: Sun Dec 28, 2008 3:25 pm
Location: Sweden
Contact:

Re: Class 'JString not found Joomla 4.0

Post by formfranska » Fri Aug 27, 2021 12:30 pm

@leolam,
Thank you. I did follow those steps. Wish now that I had taken a screenshot of the warnings in precheck. Akeeba software was warned about, but I have to keep them and install the new version alongside the old in J4 (as I've understood the docs for Akeeba). There was also a warning for a language file (there's no update for it yet, SE). Could that have caused this? I'm afraid I still have no idea how to solve this.
Also, the template I'm using is YOOtheme Pro (2.6.0-beta.3) which is compatible with J4 according to YOOtheme.

I have now activated debug via config.php but I still can't understand what is wrong. Maybe I should add that I'm not a developer 😊

It would be super helpful if I could somehow know which component/module is causing this.
Last edited by formfranska on Fri Aug 27, 2021 1:27 pm, edited 2 times in total.
Joomler in Sweden :-)
https://www.formfranska.com

Harm222
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sun Aug 22, 2021 4:18 pm

Re: Class 'JString not found Joomla 4.0

Post by Harm222 » Fri Aug 27, 2021 12:40 pm

formfranska wrote:
Fri Aug 27, 2021 12:30 pm
@leolam,
Thank you. I did follow those steps. Wish now that I had taken a screenshot of the warnings in precheck. Akeeba software was warned about, but I have to keep them and install the new version alongside the old in J4 (as I've understood the docs for Akeeba). There was also a warning for a language file (there's no update for it yet, SE). Could that have caused this? I'm afraid I still have no idea how to solve this.
I had a clean install of version 3.10 and then an update to version 4.0. But even then I got the same error message. Maybe it's the settings at my hosting provider. That is now the question.

User avatar
formfranska
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 179
Joined: Sun Dec 28, 2008 3:25 pm
Location: Sweden
Contact:

Re: Class 'JString not found Joomla 4.0

Post by formfranska » Fri Aug 27, 2021 12:46 pm

Harm222,
Yes, well I provided the FPA cause I was thinking that would help finding a solution (not sure if it will though). But maybe you could try that and see if you get help. My server config was all green in in the precheck. I had also tested and installed a fresh J4 on that exact server beforehand and it worked fine. If you suspect it's server related, maybe try a fresh J4 install first?
Joomler in Sweden :-)
https://www.formfranska.com

Harm222
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sun Aug 22, 2021 4:18 pm

Re: Class 'JString not found Joomla 4.0

Post by Harm222 » Fri Aug 27, 2021 12:49 pm

formfranska wrote:
Fri Aug 27, 2021 12:46 pm
Harm222,
Yes, well I provided the FPA cause I was thinking that would help finding a solution (not sure if it will though). But maybe you could try that and see if you get help. My server config was all green in in the precheck. I had also tested and installed a fresh J4 on that exact server beforehand and it worked fine. If you suspect it's server related, maybe try a fresh J4 install first?
I'm going to try that now ;)

User avatar
formfranska
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 179
Joined: Sun Dec 28, 2008 3:25 pm
Location: Sweden
Contact:

Re: Class 'JString not found Joomla 4.0

Post by formfranska » Fri Aug 27, 2021 1:06 pm

This is what I see from debug in the backend:
Screenshot:
https://www.dropbox.com/s/7flxsq53x3hq4 ... .png?raw=1
---
Call stack
# Function Location
1 () JROOT/language/sv-SE/sv-SE.localise.php:99
2 Sv_SELocalise::transliterate() JROOT/libraries/src/Language/Language.php:404
3 Joomla\CMS\Language\Language->transliterate() JROOT/libraries/src/Filter/OutputFilter.php:88
4 Joomla\CMS\Filter\OutputFilter::stringURLSafe() JROOT/libraries/src/Application/ApplicationHelper.php:103
5 Joomla\CMS\Application\ApplicationHelper::stringURLSafe() JROOT/administrator/components/com_cpanel/src/View/Cpanel/HtmlView.php:61
6 Joomla\Component\Cpanel\Administrator\View\Cpanel\HtmlView->display() JROOT/libraries/src/MVC/Controller/BaseController.php:692
7 Joomla\CMS\MVC\Controller\BaseController->display() JROOT/administrator/components/com_cpanel/src/Controller/DisplayController.php:54
8 Joomla\Component\Cpanel\Administrator\Controller\DisplayController->display() JROOT/libraries/src/MVC/Controller/BaseController.php:730
9 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/libraries/src/Dispatcher/ComponentDispatcher.php:146
10 Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:389
11 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:143
12 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:186
13 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:278
14 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/includes/app.php:63
15 require_once() JROOT/administrator/index.php:32
---
Does this help anyone to see what's wrong, please?
Joomler in Sweden :-)
https://www.formfranska.com

User avatar
formfranska
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 179
Joined: Sun Dec 28, 2008 3:25 pm
Location: Sweden
Contact:

Re: Class 'JString not found Joomla 4.0

Post by formfranska » Fri Aug 27, 2021 4:31 pm

I've now had it confirmed from the SE translation team that my issue is due to the missing SE language pack for J3.10 (which is not yet available).

Apparently there they are having issues with a file called locale.php which is part of the language pack. So I will delete my failed J4 upgrade and try again once I've been able to update the SE language for J3.10.

So my issue was not due to any components, templates, modules etc.

.ps If anyone knows about issues with changing the locale.php file for J4 in languages with weird characters (like å ä ö) it would be super if you could give me a shout out here, cause the SE team still has no solution.
Joomler in Sweden :-)
https://www.formfranska.com

User avatar
brian
Joomla! Master
Joomla! Master
Posts: 12787
Joined: Fri Aug 12, 2005 7:19 am
Location: Leeds, UK
Contact:

Re: Class 'JString not found Joomla 4.0

Post by brian » Sat Aug 28, 2021 6:14 am

The problem is that there is an error in the locale.php the SE team have created for swedish.
Code_2021-08-28_07-13-08.png
You do not have the required permissions to view the files attached to this post.
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/

User avatar
brian
Joomla! Master
Joomla! Master
Posts: 12787
Joined: Fri Aug 12, 2005 7:19 am
Location: Leeds, UK
Contact:

Re: Class 'JString not found Joomla 4.0

Post by brian » Sat Aug 28, 2021 6:23 am

Can you tell them there is an additional bug in their language pack with a missing version number attribute in the xml

Code: Select all

<version/>
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/

Harm222
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sun Aug 22, 2021 4:18 pm

Re: Class 'JString not found Joomla 4.0

Post by Harm222 » Sat Aug 28, 2021 9:48 am

Apparently the problem is in the translation modules. When I download the English version there is no problem. But when I download the Dutch version, I get the error message.

User avatar
formfranska
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 179
Joined: Sun Dec 28, 2008 3:25 pm
Location: Sweden
Contact:

Re: Class 'JString not found Joomla 4.0

Post by formfranska » Sat Aug 28, 2021 2:15 pm

brian wrote:
Sat Aug 28, 2021 6:23 am
Can you tell them there is an additional bug in their language pack with a missing version number attribute in the xml

Code: Select all

<version/>
Thank you so much Brian 👍🏽😊🙏🏽 I will give them the link to this whole topic and tell them about this.
Joomler in Sweden :-)
https://www.formfranska.com

User avatar
formfranska
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 179
Joined: Sun Dec 28, 2008 3:25 pm
Location: Sweden
Contact:

Re: Class 'JString not found Joomla 4.0

Post by formfranska » Sat Aug 28, 2021 2:25 pm

Harm222 wrote:
Sat Aug 28, 2021 9:48 am
Apparently the problem is in the translation modules. When I download the English version there is no problem. But when I download the Dutch version, I get the error message.
Talk to the Dutch translation people. Maybe they have the same issue with this localize-file (and/or other stuff that Brian pointed out for the SE pkg). Apparently it's tricky with our languages with weird characters ;D
Joomler in Sweden :-)
https://www.formfranska.com

User avatar
brian
Joomla! Master
Joomla! Master
Posts: 12787
Joined: Fri Aug 12, 2005 7:19 am
Location: Leeds, UK
Contact:

Re: Class 'JString not found Joomla 4.0

Post by brian » Sat Aug 28, 2021 4:00 pm

Apparently it's tricky with our languages with weird characters
No it was just a regular code bug
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/

StiffeL
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Sat Feb 16, 2008 9:28 am
Location: Sweden

Re: Class 'JString not found Joomla 4.0

Post by StiffeL » Mon Aug 30, 2021 9:21 am

Can confirm that the Swedish language pack is the problem. Once I rolled back, uninstalled it the upgrade went just fine.

Balazs
Joomla! Apprentice
Joomla! Apprentice
Posts: 27
Joined: Mon Mar 31, 2008 8:51 pm

Re: Class 'JString not found Joomla 4.0

Post by Balazs » Sat Sep 04, 2021 11:28 pm

I also got this error in the Hungarian language pack, but I fixed it. The Joomla 3 Hungarian language pack includes an hu-HU.localise.php, which has a transliterate function that uses JString, but Joomla 4 no longer includes JString.
In the transliterate function I replaced the following line:
$str = JString::strtolower($string);
for this line:
$str = StringHelper::strtolower($string);
Also, after the header, I added the following line:
use Joomla\String\StringHelper;
localise.php.txt
You do not have the required permissions to view the files attached to this post.

User avatar
formfranska
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 179
Joined: Sun Dec 28, 2008 3:25 pm
Location: Sweden
Contact:

Re: Class 'JString not found Joomla 4.0

Post by formfranska » Sun Sep 05, 2021 10:11 am

Balazs wrote:
Sat Sep 04, 2021 11:28 pm
I also got this error in the Hungarian language pack, but I fixed it. The Joomla 3 Hungarian language pack includes an hu-HU.localise.php, which has a transliterate function that uses JString, but Joomla 4 no longer includes JString.
In the transliterate function I replaced the following line:
$str = JString::strtolower($string);
for this line:
$str = StringHelper::strtolower($string);
Also, after the header, I added the following line:
use Joomla\String\StringHelper;

localise.php.txt
Super! Thank you for sharing this 👍🏽😊🙏🏽
Joomler in Sweden :-)
https://www.formfranska.com

Kuper_s
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Tue Jun 13, 2017 10:05 am

Re: Class 'JString not found Joomla 4.0

Post by Kuper_s » Mon Sep 20, 2021 6:55 pm

I did a clean install of 4 and there is no error
but if i update 3.10 to 4 i get this error
I repeated this several times

janbulens
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Oct 20, 2021 6:03 pm

Re: Class 'JString not found Joomla 4.0

Post by janbulens » Wed Oct 20, 2021 6:12 pm

In language/nl-NL/nl-NL.localise.php toevoegen na:

In header:
use Joomla\String\StringHelper;

De zin $str = JString::strtolower($string);

vervangen door:
$str = StringHelper::strtolower($string);

dra_kynox
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sat Jan 15, 2022 6:56 am

Re: Class 'JString not found Joomla 4.0

Post by dra_kynox » Sat Jan 15, 2022 7:05 am

Balazs wrote:
Sat Sep 04, 2021 11:28 pm
I also got this error in the Hungarian language pack, but I fixed it. The Joomla 3 Hungarian language pack includes an hu-HU.localise.php, which has a transliterate function that uses JString, but Joomla 4 no longer includes JString.
In the transliterate function I replaced the following line:
$str = JString::strtolower($string);
for this line:
$str = StringHelper::strtolower($string);
Also, after the header, I added the following line:
use Joomla\String\StringHelper;

localise.php.txt
Bonjour,
J'avais eu le soucis de cette erreur et avec vous j'ai pu régler mon soucis, je vous remercie beaucoup!
Bien cordialement!

jeannoellayat
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Wed Feb 11, 2015 12:06 pm

Re: Class 'JString not found Joomla 4.0

Post by jeannoellayat » Thu Jan 27, 2022 11:45 am

dra_kynox wrote:
Sat Jan 15, 2022 7:05 am
Balazs wrote:
Sat Sep 04, 2021 11:28 pm
I also got this error in the Hungarian language pack, but I fixed it. The Joomla 3 Hungarian language pack includes an hu-HU.localise.php, which has a transliterate function that uses JString, but Joomla 4 no longer includes JString.
In the transliterate function I replaced the following line:
$str = JString::strtolower($string);
for this line:
$str = StringHelper::strtolower($string);
Also, after the header, I added the following line:
use Joomla\String\StringHelper;

localise.php.txt
Bonjour,
J'avais eu le soucis de cette erreur et avec vous j'ai pu régler mon soucis, je vous remercie beaucoup!
Bien cordialement!
Thx a lot, many time for nothing.

jnl

ardor
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Fri Aug 14, 2015 9:19 pm

Re: Class 'JString not found Joomla 4.0

Post by ardor » Thu Jul 28, 2022 7:25 pm

I migrated a small Joomla site from 3.10 to 4 and ran into the same problem as some of you above.

As the pre-update check had complained about a Swedish language pack in Joomla 3.10, I removed it before starting the version 4 upgrade.

After the J4 upgrade, I tried to install Akeeba version 9 but received the "Jstring" error message. By installing the Swedish language pack in J4 I could subsequently install Akeeba without problem.

jpm_86
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sat Aug 20, 2022 2:55 pm

Re: Class 'JString not found Joomla 4.0

Post by jpm_86 » Sat Aug 20, 2022 2:59 pm

I have a Bulgarian language package and had the same Error.
After changing $str = JString::strtolower($string);
to
$str = StringHelper::strtolower($string);
and the header addition, everything works perfectly.
:geek:


Post Reply

Return to “Language - Joomla! 4.x”