Error loading language file

Benutzeravatar
Otis
Beiträge: 8
Registriert: Mo 24. Feb 2020, 13:26

Error loading language file

Beitrag von Otis »

Every time I try to install BlackCat it fails, and I'm sure it's something stupid. The database gets created, but the Install never "Finishes" the 'Finished' step just displays Step 1 of installation. Then I get the following Error no matter what I do or change:

Error loading language file DEFAULT_LANGUAGE, please check configuration

I did download the latest Release v1.3.3 and patch with the update I found here for v1.3.4. I tried patching the files before and after uploading, before and after "installing". I've even tried every set of settings combinations in case perhaps my host was having an issue with it. The only thing I haven't tried it setting it up in XAMPP or something to see if it's simply my live host being an arse. The server is on PHP 7.3 and I did try lowering it, but it broke one of my other projects and it didn't change anything so I raised it back to 7.3.

I've gone through and turned 'php_flag display_errors on' in my htaccess with no change in success and not displayed errors. I'm not sure where I can edit or look at these configurations either. I did some digging and attempted to make changes after going through some config files, but no positive results. I really loved what I experienced in a BlackCat demo I was playing with and I would really like to employ this CMS for my own projects and possibly play with it a little more so any help would be appreciated on what might be the cause of this error or an manual way of fixing it.
I can provide screen captures of the install and error as well as link to the live test if needed.

I'm sorry if this was posted before. My German is not the best and searching both German and English yielded no results for my keywords.

------------

Jedes Mal, wenn ich versuche, BlackCat zu installieren, schlägt dies fehl und ich bin sicher, dass es etwas Dummes ist. Die Datenbank wird erstellt, aber die Installation "beendet" nie. Der Schritt "Fertig" zeigt nur Schritt 1 der Installation an. Dann erhalte ich den folgenden Fehler, egal was ich tue oder ändere:

Fehler beim Laden der Sprachdatei DEFAULT_LANGUAGE. Überprüfen Sie die Konfiguration

Ich habe die neueste Version v1.3.3 heruntergeladen und mit dem Update gepatcht, das ich hier für v1.3.4 gefunden habe. Ich habe versucht, die Dateien vor und nach dem Hochladen, vor und nach der "Installation" zu patchen. Ich habe sogar alle Einstellungskombinationen ausprobiert, falls mein Host möglicherweise ein Problem damit hatte. Das einzige, was ich nicht ausprobiert habe, um es in XAMPP einzurichten oder so, um zu sehen, ob es einfach mein Live-Host ist, der ein Arsch ist. Der Server ist auf PHP 7.3 und ich habe versucht, ihn zu senken, aber er hat eines meiner anderen Projekte kaputt gemacht und nichts geändert, also habe ich ihn wieder auf 7.3 angehoben.

Ich habe 'php_flag display_errors on' in meinem htaccess ohne Änderung des Erfolgs und ohne angezeigte Fehler aktiviert. Ich bin mir nicht sicher, wo ich diese Konfigurationen bearbeiten oder ansehen kann. Ich habe ein bisschen gegraben und versucht, Änderungen vorzunehmen, nachdem ich einige Konfigurationsdateien durchgesehen hatte, aber keine positiven Ergebnisse. Ich habe das, was ich in einer BlackCat-Demo erlebt habe, mit der ich gespielt habe, wirklich geliebt, und ich würde dieses CMS wirklich gerne für meine eigenen Projekte einsetzen und möglicherweise ein bisschen mehr damit spielen, sodass jede Hilfe für die Ursache dieses Fehlers willkommen wäre oder eine manuelle Methode zur Behebung.
Ich kann Screenshots der Installation und des Fehlers bereitstellen sowie bei Bedarf einen Link zum Live-Test erstellen.

Es tut mir leid, wenn dies zuvor gepostet wurde. Mein Deutsch ist nicht das Beste und die Suche in Deutsch und Englisch ergab keine Ergebnisse für meine Keywords.
Benutzeravatar
shadowcat
Administrator
Beiträge: 5283
Registriert: Di 5. Feb 2013, 10:36
Kontaktdaten:

Re: Error loading language file

Beitrag von shadowcat »

Hm, the installer tries to get the language from the browser and then set the default language. At the moment, we only have EN an DE as languages. Can you tell which language is set in the <prefix>settings database table? If it's something different than "en" or "de", you may try to copy the en.php to <your-language>.php in the languages subfolder.
My software never has bugs, it just develops random features.
If it’s not broken, keep fixing it until it is
Benutzeravatar
Otis
Beiträge: 8
Registriert: Mo 24. Feb 2020, 13:26

Re: Error loading language file

Beitrag von Otis »

On the install is says "default_language EN" however in the settings table that you mention there is no language row only "default_charset
utf-8"

Below is a dump of that whole table.

Code: Alles auswählen

(1, 'auth_max_login_length', '128'),
(2, 'auth_max_pass_length', '128'),
(3, 'auth_min_login_length', '5'),
(4, 'auth_min_pass_length', '5'),
(5, 'auto_disable_users', 'true'),
(6, 'cat_default_date_format', '%d.%m.%Y'),
(7, 'cat_default_time_format', '%H:%M:%S'),
(8, 'catmailer_default_sendername', 'Black Cat CMS Mailer'),
(9, 'catmailer_routine', 'phpmail'),
(10, 'catmailer_smtp_auth', ''),
(11, 'catmailer_smtp_host', ''),
(12, 'catmailer_smtp_password', ''),
(13, 'catmailer_smtp_username', ''),
(14, 'default_charset', 'utf-8'),
(15, 'default_date_format', 'd.m.Y'),
(16, 'default_template', 'mojito'),
(17, 'default_theme', 'freshcat'),
(18, 'default_theme_variant', ''),
(19, 'default_time_format', 'H:i:s'),
(20, 'er_level', '8191'),
(21, 'frontend_login', 'false'),
(22, 'frontend_signup', 'false'),
(23, 'github_proxy', ''),
(24, 'github_proxy_port', ''),
(25, 'github_catalog_location', 'https://raw.githubusercontent.com/BlackCatDevelopment/bcExtensionsCatalog/master/catalog.json'),
(26, 'home_folders', 'true'),
(27, 'homepage_redirection', 'false'),
(28, 'initial_page', 'false'),
(29, 'intro_forward_by', 'disabled'),
(30, 'intro_forward_by_domain_settings', ''),
(31, 'intro_page', 'false'),
(32, 'maintenance_mode', 'true'),
(33, 'maintenance_page', '3'),
(34, 'manage_sections', 'true'),
(35, 'max_attempts', '9'),
(36, 'media_directory', '/media'),
(37, 'mediasettings', ''),
(38, 'multiple_menus', 'true'),
(39, 'page_extension', '.php'),
(40, 'page_languages', 'true'),
(41, 'page_level_limit', '4'),
(42, 'page_spacer', '-'),
(43, 'page_trash', 'true'),
(44, 'pages_directory', '/page'),
(45, 'prompt_mysql_errors', 'true'),
(46, 'redirect_timer', '1500'),
(47, 'search', 'public'),
(48, 'sec_anchor', 'cat_'),
(49, 'section_blocks', 'true'),
(50, 'server_email', 'admin@yourdomain.tld'),
(51, 'token_lifetime', '1800'),
(52, 'upload_allowed', 'jpg,jpeg,gif,gz,png,pdf,tif,zip'),
(53, 'upload_enable_mimecheck', '1'),
(54, 'upload_mime_default_type', 'text/plain'),
(55, 'users_allow_mailaddress', 'false'),
(56, 'website_description', ''),
(57, 'website_footer', 'settings/website footer'),
(58, 'website_header', 'Black Cat CMS'),
(59, 'website_keywords', '');
Also for the languages sub-folder it contains the following:
-old
---EN.php
---DE.php
DE.php
de.png
EN.php
en.png
index.php

For the SQL should there be a default_language row?
Benutzeravatar
shadowcat
Administrator
Beiträge: 5283
Registriert: Di 5. Feb 2013, 10:36
Kontaktdaten:

Re: Error loading language file

Beitrag von shadowcat »

Sorry for being late, I am quite busy these days.

The installer should have asked you which language you'd like to use as default, EN or DE, and store your choice in the database settings table as "default_language".

Some more questions:

* Are the database tables created? -> It seems, as you posted a dump, but the default_language setting is missing?
* Do you have a log file? -> <CAT_PATH>/temp

@creativecat: Hatten wir das Problem mit fehlenden Konstanten nicht schon mal? Ich meine du hättest da mal was von gesagt und auch was getan...
(Didn't we have the missing constants before? As far as i remember you've reported something like this and made a fix...)
My software never has bugs, it just develops random features.
If it’s not broken, keep fixing it until it is
Benutzeravatar
Otis
Beiträge: 8
Registriert: Mo 24. Feb 2020, 13:26

Re: Error loading language file

Beitrag von Otis »

Yes, I do have a log! I didn't think to seek this out. :oops: For the last three installs I attempted I do have a log with the exact same errors on each.

Code: Alles auswählen

2020-02-26 9:05:22 - CRIT --> [exceptionHandler()] Exception with message [An internal error occured. We're sorry for inconvenience.] emitted in [/home/htdocs/cat/framework/CAT/Helper/DB.php] line [291] [ :(604) ] 
2020-02-26 9:05:22 - CRIT --> [exceptionHandler()] [DB Exception] An internal error occured. We're sorry for inconvenience.<br /> [ :(606) ] 
2020-02-26 9:05:23 - CRIT --> [exceptionHandler()] Exception with message [An internal error occured. We're sorry for inconvenience.] emitted in [/home/htdocs/cat/framework/CAT/Helper/DB.php] line [291] [ :(604) ] 
2020-02-26 9:05:23 - CRIT --> [exceptionHandler()] [DB Exception] An internal error occured. We're sorry for inconvenience.<br /> [ :(606) ] 
Benutzeravatar
shadowcat
Administrator
Beiträge: 5283
Registriert: Di 5. Feb 2013, 10:36
Kontaktdaten:

Re: Error loading language file

Beitrag von shadowcat »

So the error seems to be located somewhere in the check_db() step of the installer, which is around line 604, but I must admit that these line numbers are not always accurate.

There should be a file namend inst.log in the temp folder and it *should* contain some lines that look like this:

> [check_step_db()]
trying to create /path/to/framework/CAT/Helper/DB/D981D9B0-FB78-5303-364C-D084553A0CE5.bc.php
created database settings file [D981D9B0-FB78-5303-364C-D084553A0CE5.bc.php]
< [check_step_db()]

The file name is generated randomly on every installation, so your file will have a different name, but the name should look similar. Please take a look at / into the /path/to/framework/CAT/Helper/DB folder to see if there's a file named <some line noise>.bc.php. This file contains the database access data, this is why the name is different on every installation for security reasons. Please do not post the contents of that file or it's name here, I'd only like to know if it's there.

The error you have is a database exception, but unfortunately, there are no details about the reason. Can you tell which version of mySQL or mariaDB you have? Have you added any optional modules to your download? (If yes, try to uncheck them in the appropriate installation step. You can install them later.)

There should be at least 28 tables the installer creates, the modules may create more later on. I'd like to know which tables are already there, maybe this will help to figure out what's wrong. You can post sensible data as a PN.

The name of the first table (in alphabetical order) should be <prefix>addons, the last table of the core is named <prefix>user_has_group.
My software never has bugs, it just develops random features.
If it’s not broken, keep fixing it until it is
Benutzeravatar
Otis
Beiträge: 8
Registriert: Mo 24. Feb 2020, 13:26

Re: Error loading language file

Beitrag von Otis »

The inst.log contained nothing of any use. Just a few lines of empty:
current step: [site]
> [show_step_site()]

and
current step: [postcheck]
> [show_step_site()]


The .bc.php file was there though, and the info contained was correct.

The DB is a SQL it's version info is:
5.6.45-86.1
Percona Server (GPL), Release 86.1, Revision 5bc37b1
Linux

I have not added anything except the update I found here for v1.3.4.

And as for Tables I seem to be missing some as my total table list is only 26. So it would appear that I am missing 2 of them. The first and last as you have listed are correct.

Code: Alles auswählen

1. cat_addons
2. cat_class_secure
3. cat_dashboard
4. cat_groups
5. cat_mimetypes
6. cat_mod_captcha_control
7. cat_mod_droplets
8. cat_mod_droplets_extension
9. cat_mod_droplets_permissions
10. cat_mod_droplets_settings
11. cat_mod_initial_page
12. cat_mod_menu_link	
13. cat_mod_wrapper	
14. cat_mod_wysiwyg
15. cat_mod_wysiwyg_admin_v2
16. cat_pages
17. cat_pages_headers
18. cat_pages_settings
19. cat_page_langs
20. cat_search
21. cat_sections
22. cat_settings
23. cat_system_permissions
24. cat_users
25. cat_users_options
26. cat_user_has_group
Benutzeravatar
shadowcat
Administrator
Beiträge: 5283
Registriert: Di 5. Feb 2013, 10:36
Kontaktdaten:

Re: Error loading language file

Beitrag von shadowcat »

First, thank you for being patient and keep trying! :daumen:

The tables missing are:

cat_mod_filter
cat_pages_load

Both tables are dropped by the installer and created later in the module install part. As it seems, the installer never reaches that installation step, so the 26 tables you have are exactly the 26 you *should* have after the database step. So let's assume the create tables part succeeded.

After the tables are created, they are filled. Since you had already written that you have settings in the settings table, it seems to have worked.The next step would be to install the modules. Do you have any content in the <prefix>addons table?

In my current BC 1.3.4 Portable installation the module installation steps are logged like so:
> [install_modules()]
------------------------------------
----- installing addons -----
------------------------------------
installing module/template [blackcat]
running blackcat/install.php
Module [blackcat] sucessfully installed
installing module/template [blackcatFilter]
running blackcatFilter/install.php
Module [blackcatFilter] sucessfully installed
installing module/template [droplets]
running droplets/install.php
Module [droplets] sucessfully installed
installing module/template [jquery_plugin_mgr]
running jquery_plugin_mgr/install.php
Module [jquery_plugin_mgr] sucessfully installed
installing module/template [lib_csrfmagic]
running lib_csrfmagic/install.php
Module [lib_csrfmagic] sucessfully installed
installing module/template [lib_doctrine]
running lib_doctrine/install.php
Module [lib_doctrine] sucessfully installed
installing module/template [lib_dwoo]
running lib_dwoo/install.php
Module [lib_dwoo] sucessfully installed
installing module/template [lib_getid3]
running lib_getid3/install.php
Module [lib_getid3] sucessfully installed
installing module/template [lib_images]
running lib_images/install.php
Module [lib_images] sucessfully installed
installing module/template [lib_jquery]
running lib_jquery/install.php
Module [lib_jquery] sucessfully installed
installing module/template [lib_pclzip]
running lib_pclzip/install.php
Module [lib_pclzip] sucessfully installed
installing module/template [lib_wblib]
running lib_wblib/install.php
Module [lib_wblib] sucessfully installed
installing module/template [lib_zendlite]
running lib_zendlite/install.php
Module [lib_zendlite] sucessfully installed
installing module/template [menu_link]
running menu_link/install.php
Module [menu_link] sucessfully installed
installing module/template [show_menu2]
running show_menu2/install.php
Module [show_menu2] sucessfully installed
installing module/template [wysiwyg]
running wysiwyg/install.php
Module [wysiwyg] sucessfully installed
installing module/template [wysiwyg_admin]
running wysiwyg_admin/install.php
Module [wysiwyg_admin] sucessfully installed
installing module/template [blank]
running blank/install.php
Template [blank] sucessfully installed
installing module/template [freshcat]
running freshcat/install.php
Template [freshcat] sucessfully installed
installing module/template [mojito]
running mojito/install.php
Template [mojito] sucessfully installed
installing language [DE.php]
Language [DE.php] sucessfully installed
installing language [EN.php]
Language [EN.php] sucessfully installed
< [install_modules()]
As you do not have the mod_filter table, which is related to the second module in the list (blackcatFilter), you may try to create it using an admin tool your provider hopefully provides:

Code: Alles auswählen

CREATE TABLE `cat_mod_filter` (
	`filter_name` VARCHAR(50) NOT NULL,
	`module_name` VARCHAR(50) NULL DEFAULT NULL,
	`filter_description` TEXT NULL,
	`filter_code` TEXT NULL,
	`filter_active` ENUM('Y','N') NOT NULL DEFAULT 'Y',
	UNIQUE INDEX `filter_name_module_name` (`filter_name`, `module_name`)
)
COMMENT='Successor of Output Filters'
COLLATE='utf8_general_ci'
ENGINE=InnoDB
;
Please note: "cat_" is the default prefix, so please replace it with yours. So assuming your prefix is "mytest_", change

CREATE TABLE `cat_mod_filter` (

to

CREATE TABLE `mytest_mod_filter` (


If you get an SQL error here, please let me know.
My software never has bugs, it just develops random features.
If it’s not broken, keep fixing it until it is
Benutzeravatar
Otis
Beiträge: 8
Registriert: Mo 24. Feb 2020, 13:26

Re: Error loading language file

Beitrag von Otis »

Ok, there is nothing in the Addons folder, and I got no error adding the table you posted.

However, after seeing the Addons table empty i decided to export the entire database as a PDF just to look at all the tables and a vast majority of them are empty.

BlackCat SQL Dump

If this helps at all here are the screens I see when attempting any install The info on display is all temporary so I don't mind posting it.
[One] [Two] [Three] [Four] [Five]
Benutzeravatar
shadowcat
Administrator
Beiträge: 5283
Registriert: Di 5. Feb 2013, 10:36
Kontaktdaten:

Re: Error loading language file

Beitrag von shadowcat »

The tables look exactly as I'd expect in this case, so no need to worry. There are no users yet, because the admin user gets added later. So what worked:

* Database access
* Create basic tables
* Fill basic tables (like 'settings')

It is clearly the next step that fails - adding additional settings like default language, operating system name, website title, and so on. So just to give it a try, I disabled that part in the index.php of the installer. I'm not sure if it will help to pass, but let's just try. IF installation succeeds with this change, you will have to add some settings manually before you can login into the backend:

INSERT INTO `<PREFIX>settings` (`name`, `value`) VALUES
('guid', ''),
('app_name', 'cat1234'),
('cat_build', ''),
('cat_version', '1.3.4'),
('default_language', 'EN'),
('default_timezone_string', 'America/Detroit'),
('installation_time', NOW()),
('operating_system', 'linux'),
('string_dir_mode', '0755'),
('string_file_mode', '0644'),
('website_title', ''),
('wysiwyg_editor', '')
;

The red parts explained:

<PREFIX> - your prefix
1234 - this is used for the cookie, the installer creates a random number, so just use any number you like

Other
guid - we don't use it, so just leave it blank
string_dir_mode / string_file_mode - you may have to tune these, you can do it in the backend later or now
website_title - you can set it here or later in the backend

I am going to create a full dump of a fresh installation later, so if installation still fails, you may try to "install" by hand.

The index.zip attached contains the patched index.php to be replaced in the CAT_PATH/install folder.
Dateianhänge
index.zip
(16.95 KiB) 159-mal heruntergeladen
My software never has bugs, it just develops random features.
If it’s not broken, keep fixing it until it is
Antworten