This topic contains a post which is marked as Best Answer. Press here if you would like to see it.
*

netbauer

  • **
  • 14 posts
Language Trouble
« on: June 10, 2023, 11:08:33 AM »
OsClass language update is constantly displayed in the backend although the system is newly installed with all updates. This is extremely annoying. Sometimes it is also not possible to install translations. It is only displayed unzip failed. Not for all languages! This is also extremely annoying. It would be nice if the basics at least work from the beginning. OsClass is really cool but things like this pull you right back down to earth.

Distributor ID: Ubuntu
Description:    Ubuntu 22.04.2 LTS
Release:        22.04
Codename:       jammy

PHP 8.1.2-1ubuntu2.11 (cli) (built: Feb 22 2023 22:56:18) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.2, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.2-1ubuntu2.11, Copyright (c), by Zend Technologies

nginx version: nginx/1.18.0 (Ubuntu)


*

MB Themes

Re: Language Trouble
« Reply #1 on: June 10, 2023, 11:40:50 AM »
Sometimes, language version is wrong i side zip.
Easiest solution is to complete translation (if something missing) and hit "share translation" in backoffice.
These gets all details populated correctly and will resolve not just your issue  ;)
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

netbauer

  • **
  • 14 posts
Re: Language Trouble
« Reply #2 on: June 10, 2023, 12:12:42 PM »
Of course, I'm happy to share any translations. That is no problem at all. But your answer does not explain why the backend always says that an update would be available although this is not the case. So where does this message come from. Everything is freshly installed with the default language English (US).

*

MB Themes

Re: Language Trouble
« Reply #3 on: June 10, 2023, 03:15:30 PM »
If inside zip, version is 3.1, but in zip name it says 3.2, osclass will do update but after version will still be 3.1 so will promot to uodate again.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

netbauer

  • **
  • 14 posts
Re: Language Trouble
« Reply #4 on: June 14, 2023, 08:50:14 PM »
Since now 2 days I try to install the language 20230312_lang_osclass_en_DE_8.1.1.zip from the market and it is extemly annoying that it does not work. It is always displayed Unzip Failed. But if I install for example the language 20210226_lang_osclass_hr_HR_4.3.2.zip then it works. I have tried it with some other languages and it always comes Unzip Failed. Based on the fact that it works with 20210226_lang_osclass_hr_HR_4.3.2.zip, I assume that it is not a problem of my host, because here no erros are displayed. Neither in the logs nor in the backend itself.

Here is the information of my host, which is completely freshly installed and running clean:

Server information
Server information: Linux odin 5.15.0-73-generic #80-Ubuntu SMP Mon May 15 15:18:26 UTC 2023 x86_64
Server software version: ()
PHP version: 8.1.2-1ubuntu2.11
Memory limit: 256M
Max execution time: 600s
Upload max file size: 32M
Max input vars: 30000
Allow URL Fopen: Enabled

Osclass information
Osclass version: 8.1.2
Web URL: url://test-domain-com/
Web path: /var/www/html/domain/public/
Oc-admin URL: url://test-domain-com/oc-admin/
Last update check: 2023-06-14 01:43:56
Using dev cron: Yes
Current front theme: Delta Osclass Theme (delta)
Current oc-admin theme: Omega Admin Theme (omega)
PHP error log: Disabled
PHP errors output to file: Disabled
Database debug mode: Disabled
Cache: Disabled


Permissions information

In case folder is not readable or writtable, it may be issue when updating or upgrading osclass, themes or plugins.
Folders those are not readable:
All folders are readable
Folders those are not writtable:
All folders are writtable

Database information
MySQL version: 8.0.33-0ubuntu0.22.04.2

root@odin:/var/log/nginx# php -version
PHP 8.1.2-1ubuntu2.11 (cli) (built: Feb 22 2023 22:56:18) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.2, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.2-1ubuntu2.11, Copyright (c), by Zend Technologies

root@odin:/var/log/nginx# php -m
[PHP Modules]
bcmath
calendar
Core
ctype
curl
date
dom
exif
FFI
fileinfo
filter
ftp
gd
gettext
hash
iconv
imagick
imap
intl
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
soap
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
xmlreader
xmlrpc
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

root@odin:/var/log/nginx# nginx -v
nginx version: nginx/1.18.0 (Ubuntu)

So, I would now be grateful if someone could explain this to me. Especially why it works with one language and not with the other.
Otherwise, I'm not making any progress with the translations here.

*

netbauer

  • **
  • 14 posts
Re: Language Trouble
« Reply #5 on: June 14, 2023, 08:53:42 PM »
I notice the same behavior with my hoster, which hosts thousands of domains and supports X CMS solutions. I think it is understandable that I am slowly annoyed.

Marked as best answer by frosticek on June 14, 2023, 10:31:43 PM
*

MB Themes

Re: Language Trouble
« Reply #6 on: June 14, 2023, 09:12:06 PM »
It's problem of ZIP for some reason. It's funny that ZIP is created by same library that is unzipping it, but is not able to do so.
Quick solution is to download ZIP into your desktop and simply re-zip language pack and manually add from backoffice.

//Edit: I've been able to analyze issue. Problem is that Osclass create folder in ZIP without explicitely creating empty DIR first. Then when it's read by unzip function, it cannot extract files as that folder is not explicitely defined here.

Will be fixed in next update by a) adding support to unzipper to create empty dir if it is not defined, b) translation function now always create empty directory for language files.
« Last Edit: June 14, 2023, 10:31:08 PM by MB Themes »
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

netbauer

  • **
  • 14 posts
Re: Language Trouble
« Reply #7 on: June 14, 2023, 09:25:26 PM »
Interesting. Now I did exactly that but not with Windows 11's own Zip. It worked with 7ZIP. This is extremely annoying. Now I still do not know what the error is. This Windows ..... sucks. But most of all it sucks that the error is not logged. I think the default error message "Unzip Failed" should be adjusted by default to: If Unzip Failed is displayed, then download the archive manually. Unzip it and rezip it with e.g. 7ZIP and upload it manually.

*

netbauer

  • **
  • 14 posts
Re: Language Trouble
« Reply #8 on: June 14, 2023, 09:32:02 PM »
In general now a big thank you for the help. Now I'm getting further and can check the next errors that are present in a template and I can continue to diligently adjust the languages. Too bad there is no donate option here. I would do immediately.

*

MB Themes

Re: Language Trouble
« Reply #9 on: June 14, 2023, 10:31:24 PM »
It's problem of ZIP for some reason. It's funny that ZIP is created by same library that is unzipping it, but is not able to do so.
Quick solution is to download ZIP into your desktop and simply re-zip language pack and manually add from backoffice.

//Edit: I've been able to analyze issue. Problem is that Osclass create folder in ZIP without explicitely creating empty DIR first. Then when it's read by unzip function, it cannot extract files as that folder is not explicitely defined here.

Will be fixed in next update by a) adding support to unzipper to create empty dir if it is not defined, b) translation function now always create empty directory for language files.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots