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

vnc

  • **
  • 13 posts
Osclass translation update error
« on: February 06, 2023, 02:56:03 PM »
Hello,

Recently an update appear to language, when we try to update it appear an error unzip failed.

How can we fix this?

*

MB Themes

Re: Osclass translation update error
« Reply #1 on: February 06, 2023, 06:24:30 PM »
You must upload &  unzip manually, osclass was not able to do it
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Mindaugas

  • **
  • 20 posts
Re: Osclass translation update error
« Reply #2 on: April 13, 2023, 10:00:05 AM »
Same problem!!! Impossible upgrade or install language after removing.

How to manual install language??? After unzipping language file content to /oc-content/languages/xx-XX its stil not present on dashbuard. Dashbuard showing on top "1 Language update", but language is removed.

After enabling debug, no errors?

OsClass 8.1.1
PHP 7.4.3
Zip version    1.15.6
Libzip headers version    1.5.1
Libzip library version    1.5.1

P.S. maybe its same error on utils.php when i try make web site backup ===> PHP Warning:  ZipArchive::close(): Can't open file: Permission denied in /var/www/html/domain.xx/oc-includes/osclass/utils.php on line 1413, referer: https://www.domain.xx/oc-admin/index.php?page=tools&action=backup

=========== Resolved =====

Its bad archive of language zip file (20230411_lang_osclass_ru_RU_8.1.1.zip). After downloading manually language file, unzip and zip again the installation success!
« Last Edit: April 13, 2023, 10:12:34 AM by Mindaugas »

*

MB Themes

Re: Osclass translation update error
« Reply #3 on: April 13, 2023, 01:11:28 PM »
Fixed, for some reason it is zipped by osclass and cannot be unzipped (not always).
function create_zip_archive

Code: [Select]
  function create_zip_archive($zip_path, $dir_path, $dir_name) {
    $zip = new ZipArchive;
    $zip->open($zip_path, ZipArchive::CREATE | ZipArchive::OVERWRITE);

    if ($handle = opendir($dir_path)) {
      while (false !== ($file = readdir($handle))) {
        if ($file != "." && $file != "..") {
          $zip->addFile($dir_path . '/' . $file, $dir_name . '/' . $file);
        }
      }
     
      closedir($handle);
    }

    return $zip->close();
  }

do not see problem here... :/
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Mindaugas

  • **
  • 20 posts
Re: Osclass translation update error
« Reply #4 on: April 24, 2023, 02:14:40 PM »
The system constantly indicates that the language is not updated. I tried to update, tried uninstalling and reinstalling. Anyway shows that there is an update. Where to look for error?

*

MB Themes

Re: Osclass translation update error
« Reply #5 on: April 24, 2023, 03:20:35 PM »
There can be incorrect version in index.php of language file.
Take a look an max it to osclass version.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Mindaugas

  • **
  • 20 posts
Re: Osclass translation update error
« Reply #6 on: April 26, 2023, 08:56:51 AM »
Yes, in file index.php wrong version ",'version'         => '8.0.2'" it could by ",'version'         => '8.1.1'".

After correcting version in index.php file same problem exist.

*

MB Themes

Re: Osclass translation update error
« Reply #7 on: April 26, 2023, 10:10:49 AM »
By "same problem" you mean that you see update available?
Check for updates again to refresh toolbars.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Mindaugas

  • **
  • 20 posts
Re: Osclass translation update error
« Reply #8 on: April 26, 2023, 10:35:03 AM »
Refreshed webpage, opened in other browser, checked for updates. Anyway shows that there is an update for language ru_RU.

*

MB Themes

Re: Osclass translation update error
« Reply #9 on: April 26, 2023, 01:03:56 PM »
Right, you must update _t_locale table as well to reflect correct version.
Then it should be finally fine.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

Marked as best answer by frosticek on April 26, 2023, 02:56:05 PM
*

Mindaugas

  • **
  • 20 posts
Re: Osclass translation update error
« Reply #10 on: April 26, 2023, 02:32:00 PM »
After version adjustment in the database, everything is fine now, thank you  :)