Skip Navigation

[Resolved] Module Manager : fail to open the downloaded zip file

This thread is resolved. Here is a description of the problem and solution.

Problem:

I am trying to use the module manager to export my custom fields to another toolset websites, but the zip file is broken.

Solution:

It should be a server issue, the client fixed it by re-setup
his local development server again.

Relevant Documentation:

This support ticket is created 4 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 9 replies, has 2 voices.

Last updated by puneetS-3 4 years, 3 months ago.

Assisted by: Luo Yang.

Author
Posts
#1743553

Tell us what you are trying to do?
I am trying to use the module manager to export my custom fields to another toolset websites.

Is there a similar example that we can see?
I have found similar issues on the forum :
https://toolset.com/forums/topic/unable-to-open-zip-file-using-module-manager/
https://toolset.com/forums/topic/module-manager-fails-to-open-zip-file/

As mentioned its by one of the supporters that this is because of the unavailability of ziparchive PHP module .

I am actually using laragon for my local dev, and I have insured that I have the zip extension : hidden link also the ziparchive archive class.

I did a small test to verify

php > $zip = new \ZipArchive();
php > $zip
php > echo $zip
php > var_dump($zip);

Parse error: syntax error, unexpected 'echo' (T_ECHO) in php shell code on line 2

php > var_dump($zip);
php shell code:1:
class ZipArchive#1 (5) {
  public $status =>
  int(0)
  public $statusSys =>
  int(0)
  public $numFiles =>
  int(0)
  public $filename =>
  string(0) ""
  public $comment =>
  string(0) ""
}

This is the sample zip : hidden link

#1743921

Hello,

I have tried the zip file you provided above, it is broken.

I suggest you try to export the zip file again, check if there is any PHP errors in your website.

Since I am are Windows + WAMP server + PHP 7.4, in my localhost the php Zip version is 1.15.5, which is lower than your website.

And I have checked the laragon official site:
hidden link
They can only provide PHP 7.2 in the downloads, how do you setup the zip version to 1.19.0?
I suggest you try to follow PHP document to test if your PHP zip extension works correct in your website:
hidden link

#1744033

Hey @Luo,

Thanks for the reply.

I tried all the steps that you asked but, it didn't solve my problem. For you to be able to sort this easily I did the same a development server having the same issue. It is an openlitespeed server on a digital ocean ubuntu OS.

I installed the zip extension in the following manner.

sudo apt install lsphp73-pear
sudo /usr/local/lsws/lsphp73/bin/pecl install zip

Which gives me the output of :

pecl/zip is already installed and is the same as the released version 1.19.0 

I have also added.

extension=zip.so

in the php.ini file.

I am adding the link to the phpinfo file : hidden link

There are no php error, when exporting the zip. (I checked at /wp-content/debug.log )Debugging is on.

#1744035

Did you get any PHP debug logs when export the module files? if you did, please share them.

And the problem is abnormal, please do the normal debug steps:
1) Make sure you are using the latest version of Toolset plugins, you can download them here:
https://toolset.com/account/downloads/

2) In case it is a compatibility problem, please deactivate all other plugins, and switch to wordpress default theme 2020, and test again

3) Also check if there is any PHP/JS error in your website:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/

4) If the problem still persists, please provide database dump file(ZIP file) of your website, you can put the package files in your own google drive disk, share the link only, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/

#1744255

The only error for today is in debug.log is

[19-Aug-2020 05:37:26 UTC] WordPress database error Deadlock found when trying to get lock; try restarting transaction for query UPDATE crush_actionscheduler_actions SET attempts = attempts+1, status='in-progress', last_attempt_gmt = '2020-08-19 05:37:26', last_attempt_local = '2020-08-19 11:07:26' WHERE action_id = 22514 made by do_action_ref_array('action_scheduler_run_queue'), WP_Hook->do_action, WP_Hook->apply_filters, ActionScheduler_QueueRunner->run, ActionScheduler_QueueRunner->do_batch, ActionScheduler_Abstract_QueueRunner->process_action, ActionScheduler_DBStore->log_execution

1. Updated all the installed toolset plugin.

2. In case it is a compatibility problem, please deactivate all other plugins, and switch to wordpress default theme 2020, and test again -
Done, the issue still persists.

3. Also check if there is any PHP/JS error in your website: - No JS Errors at all.

4. Database dump: XXXXXXXXXXXXXXXXXXX (My db dump is more than 120mb and I was unable to share the link for DB in private as there was no area for adding a link in the private area.)

#1744853

There isn't any file path and file name in your debug logs, can you share the integral debug logs?

And I have enabled the private message box again, please share your package file link in it, thanks

#1746117

Thanks for the details, I am downloading the files, will update here if find anything

#1746225

We need the full debug logs of your website.

And I have tried your database dump file in my localhost with a fresh WP installation + the latest version of Toolset plugins, it works fine, I can export the module file without any problem:
Dashboard-> Toolset-> Modules-> Define Modules
Export the module "test"

here is the zip file:
hidden link

#1746453

Hey Please, find the link for the complete log.

hidden link

Also,
Can you help me walk through the setup for it to work? I have seen that you use :
> Windows + WAMP server + PHP 7.4, in my localhost the php Zip version is 1.15.5

But are there anything extra that I have to do, in WAMP in order to make the Zip work.

I am on a Win 10 device and can use any install any tool which would work on a win 10 device.
I am also okay with a docker container configuration.

#1748835

I was able to solve the issue.

I used hidden link this project to set up my local environment on docker.
I then migrated the website to my new development environment.

The zip was not broken when I exported the module.