Skip Navigation

[Resolved] Error while using the toolset installer to push content template updates

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

Problem:
I exported Views from Toolset settings >> extracted and re-zipped file >> Then try to import the new views.zip file and it fails.

Solution:
This issue was not reproduced and it turns out that client was doing something wrong while generating zip file. Please make sure when you re-zip file there is no folder existing within the zip file, xml and settings file should be without any folder within the zip. Sample Views exported files here:
https://drive.google.com/file/d/0B5EmJQ1qcuyqTm1Ic2plWTNsTWc/view?usp=sharing

Relevant Documentation:
https://toolset.com/documentation/user-guides/how-to-importexport-types-structures/

This support ticket is created 7 years, 2 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
- 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 -
- 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 9 replies, has 2 voices.

Last updated by Charles-Antoine 7 years, 1 month ago.

Assisted by: Noman.

Author
Posts
#567236

I am trying to use the nice library wich allow to distribute toolset based theme, and update some of the content managed by toolset (CPT, content templates) as explained here: https://toolset.com/documentation/user-guides/how-to-build-toolset-based-themes/

I generate myself the types.zip and views.zip and layouts.zip because it is so much simpler to edit the xml files than creating a dummy dev site and exporting those archives. Then instead of distributing the theme via your site, I test it directly (again, way simpler in my development process).
It works fine for types.zip, but the import always fails for views.zip, as long as I am the one generating the .zip (even if I didn't touched the xml file). Is this due to the settings.php file which contains a timestamp ? Do I have to generate a specific timestamp here ?

Thx for your help !

#567512

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Charles,

Thank you for contacting Toolset support.

But the import always fails for views.zip, as long as I am the one generating the .zip
==> I am not sure how you have created the Views xml zip file at your own? The recommended way is to export these files from Toolset -> Export/Import page, otherwise it will not work.

And one needs to have an Author Account or license to build toolset based theme:
https://toolset.com/buy-toolset-author/
There have been different checks in the plugin for security purpose that will break functions if you don’t have correct license or if process is not followed as exactly defined, since Types has a free version also that might be the reason you were able to get it work somehow outside our defined process.

Thank you

#567527

I do have the correct licence since I am able to do the full stuff by strictly following the "recommended way". Still, exporting files from Toolset -> Export/Import page is very inconvenient for me for several raisons:
1/ You cannot choose what to export, so you might end up with some junk you dont need.
2/ You cannot handle your changes in a git repo
3/ It takes a LOT of time, and for small modification, changing the xml file directly is way better: managed by git, doable in my own IDE, etc etc

Basically when I develop a theme, I work as a developper: git + IDE. Switching to a "toolset" based development inside wordpress dashboard is something I want to avoid. Obviously it's great for my users, but again, as a theme developper, I need to be able to code in my usual environment.

#567698

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

1. Please let us know how you have exported the Views zip file using Toolset >> Export/Import page?

2. And then modified it using some code editor >> and then tried to import it again using Toolset >> Export/Import page?

3. And what exactly you have modified in xml file by editing it in code editor?

4. Please provide us step by step details with example change you have made, screenshots of steps or xml file also will help us to see whats going on with it.

5. Send me your Views exported original xml file and edited xml file as well, you can upload it to Google Drive or Dropbox and share links with me.

Typically we do not recommend editing XML files once exported from any Toolset plugin, as it often cause issues.

Thank you

#567960
Capture d’écran 2017-09-08 à 15.24.43.png

Hi Norman,

Thx for your kind answer.
1. Please let us know how you have exported the Views zip file using Toolset >> Export/Import page?
-> Yes

2. And then modified it using some code editor >> and then tried to import it again using Toolset >> Export/Import page?
-> Not exactly... I am in fact using the zip file inside my theme files, into the "update library":
wp-content/themes/my-theme/library/toolset/settings/views.zip

3. And what exactly you have modified in xml file by editing it in code editor?
-> As it didn't worked, I event tried not to modify ANYTHING. So the initial zip files work, but if I unzip it and zip it again, the new archive won't work.

4. Please provide us step by step details with example change you have made, screenshots of steps or xml file also will help us to see whats going on with it.
-> I hope my explanation is good enough... but the end result (failure state) is shown in the attached printscreen.

5. Send me your Views exported original xml file and edited xml file as well, you can upload it to Google Drive or Dropbox and share links with me.
-> As explained I don't think it's relevant, as a forged archive does not work, event if the files inside are exactly the same ones as those contained in an "original" views.zip file that indeed works.

Typically we do not recommend editing XML files once exported from any Toolset plugin, as it often cause issues.
-> I completely understand. Obviously, I am not in the "usual" use case. I really appreciate your help and I understand that I am pushing Toolset out of the "usual boundaries". Still, for theme developers, I think my issue is relevant.

Thx !

#568045

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for providing detailed explanation. Now I understand your actual issue. So the basic problem is just about re-zipping the Views zip file (that was exported from Toolset):

“ So the initial zip files work, but if I unzip it and zip it again, the new zip file won't work. ”

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

Whereas this same re-zipping process works fine for Types zip file.

I am going to reproduce this issue at my end and see what happens when I export >> re-zip >> and import the re-zipped file. Then I will be able to escalate it accordingly. I will update you with my findings.

Thank you

#568064

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

I have tested it at my end, below is what I found:
- I exported Views zip file using Toolset >> Export/Import page -- (filename: views-training.views.2017-09-08.zip)

- Imported that into another site using Toolset >> Export/Import page -- (filename: views-training.views.2017-09-08.zip)

- It imported Views and worked fine.

- After that I unzip and re-zip the Views file -- (filename: view-re-zip.zip)
>> I used Winrar software to zip the file.

- Imported this new zip file again using Toolset >> Export/Import page.

- It imported Views and worked fine as well.

Here are both my original views and re-zipped views file, so you can test these by importing directly or from within your theme update process: hidden link

Please make sure when you re-zip file there is no folder existing within the zip file, xml and settings file should be without any folder within the zip.

At this point, it looks like there might be something wrong with the Views file or your site that is breaking the process, or something like that.

Thanks

#568633

Thx Norman,

Indeed it seems like I did something wrong (or if not me, my code....). I'll investigate further and keep you updated on this.

#568641

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Yes, sure.

Have a great day, thank you

#568752

Norman, I was indeed generating the zip file incorrectly, my process is working smoothly now. Thx again for your help (and your patience!).