ezakimak Posted July 1, 2010 Share Posted July 1, 2010 Hi , I have this error"1 error 1. archive cannot be extracted"when trying to import a language pack I downloaded from the prestashop siteI dont know what could be the problem , is there something that i have to configure before importing a language pack ?thanks Link to comment Share on other sites More sharing options...
Guest Posted July 1, 2010 Share Posted July 1, 2010 step 1 : Back Office >> Tools >> Languages Add Newstep 2 : Back Office >> Tools >> Translations >> Translation exchange > import Link to comment Share on other sites More sharing options...
ezakimak Posted July 1, 2010 Author Share Posted July 1, 2010 I had done that , it complains that it cannot extract the gzipped file, I dont know what could be the problem , I turned php show errors on but it shows nothingany other tipthanks Link to comment Share on other sites More sharing options...
rocky Posted July 1, 2010 Share Posted July 1, 2010 Either the language gzip file is corrupted, or your server doesn't have gzip decompression enabled. Link to comment Share on other sites More sharing options...
ezakimak Posted July 1, 2010 Author Share Posted July 1, 2010 hi, thanks for the replyI tried this:1- went to my BO , exported a language pack, it gave me a nn.gzip file2- tried to import tha file and it gave the same errorI checked privilegies of the directory translations either in the root dir and the themes dir Languages in the server and both are set to 777is there any other possible reason for this errorthanks in advance Link to comment Share on other sites More sharing options...
rocky Posted July 2, 2010 Share Posted July 2, 2010 You should check that GZIP compression is enabled on your server. When you installed PrestaShop, was "GZIP compression is on (recommended)" ticked? It may be possible to enable it using a php.ini file, or you may need to contact your host to enable it on your server. Link to comment Share on other sites More sharing options...
ezakimak Posted July 2, 2010 Author Share Posted July 2, 2010 phpinfo'ing my server I got this settings [Apache Environment]-HTTP_ACCEPT_ENCODING gzip,deflate [HTTP Headers Information]-Accept-Encoding gzip,deflate _SERVER["HTTP_ACCEPT_ENCODING"] gzip,deflatefrom this info can I say that GZIP is available.by the way, I am using gzip normally from the command line on my server , I just dont know if there is something else to configure to make it available for php or apachethanks again Link to comment Share on other sites More sharing options...
rocky Posted July 2, 2010 Share Posted July 2, 2010 I think that allows you to compress your website before sending it to a client. Actually decompressing a GZIP file on the server may be different. There's not much more I can say. I suggest that you ask your host. Link to comment Share on other sites More sharing options...
ezakimak Posted July 7, 2010 Author Share Posted July 7, 2010 thanks for your reply, we asked our host, they say gzip is enabled I would like to ask how to show the error that $gz->extract() is returning , in that way I could send it to our host and see what they can do.The AdminTranslations class implements this method public function submitImportLang() { global $currentIndex; if (!isset($_FILES['file']['tmp_name']) OR !$_FILES['file']['tmp_name']) $this->_errors[] = Tools::displayError('no file selected'); else { $gz = new Archive_Tar($_FILES['file']['tmp_name'], true); if ($gz->extract(_PS_TRANSLATIONS_DIR_.'../', false)) Tools::redirectAdmin($currentIndex.'&conf=15&token;='.$this->token); $this->_errors[] = Tools::displayError('archive cannot be extracted'); } } so in the page I can only see the "archive cannot be extracted" error messagewhat code can I add to this method to show more detailed information about this errorthanks again Link to comment Share on other sites More sharing options...
rocky Posted July 8, 2010 Share Posted July 8, 2010 The error message are generated in classes/Archive_Tar.php, but strangely, they aren't displayed. Instead, it says "To be completed". Here's the code on lines 565-579: // [spam-filter]{ _error() function _error($p_message) { // ----- To be completed $this->raiseError($p_message); } // [spam-filter]} // [spam-filter]{ _warning() function _warning($p_message) { // ----- To be completed $this->raiseError($p_message); } // [spam-filter]} You could try changing this to: // [spam-filter]{ _error() function _error($p_message) { echo 'Error: ' . $p_message . ' '; // ----- To be completed $this->raiseError($p_message); } // [spam-filter]} // [spam-filter]{ _warning() function _warning($p_message) { echo 'Warning: ' . $p_message . ' '; // ----- To be completed $this->raiseError($p_message); } // [spam-filter]} This should display the error messages, unless the page is reloading after they are displayed. Link to comment Share on other sites More sharing options...
ezakimak Posted July 8, 2010 Author Share Posted July 8, 2010 thanks for the reply !, adding those lines showed the actual errors, since I added a few modules to our store they werent given 777 permision so the translation couldnt complete , now PS imported them with success.thanks !! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now