Osclass Themes and Osclass Plugins

Why Some ZIP Archives Failed to Upload in Osclass

Some plugins and themes could not be uploaded even though their ZIP archives appeared valid. After investigating many archive files, we discovered compatibility issues related to archive structure and path handling.
Platform News
9. June 2026
4 min read
29 views
Why Some ZIP Archives Failed to Upload in Osclass

Recently I've faced several support tickets from customers complaining that product uploads and installations from ZIP does not work as expected. After selecting zip file to upload in Osclass oc-admin - no matter if it was theme or plugin, either there was error "The zip file is not valid" or there was success message but nothing really happened.

Investigation itself was not that simple as it was not reproducible on all Osclass installations and updates of existing products sometimes worked fine without any issue and we needed to expand analysis over multiple Osclass instances with different versions to identify root cause.

Unix-style ZIP archive

First issue we've found was that some archives has been generated in Unix style. What it means? Well, only problem was that paths of files was using backslash \ instead of standard windows slash /. 

How to identify using invalid slash in ZIP

No special tools are required for this - just text editor like Notepad or Notepad++. When you right click on archive and open it with standard text editor, usually when you scroll down to part where files are listed, you can find what slash is used, if it's Unix style with \ or Windows style with /

Unix backslash in ZIP:

Zip with Unix backslash

Windows slash in ZIP:

Windows slash in ZIP

How to fix: Easiest wa you fix this problem is simply re-zip archive on your desktop. Use ie 7zip, extract all files and put them back into new ZIP archive. After this action you should see Windows slash in archive. Then upload theme/plugin into Osclass backoffice.

Root cause analysis and real issue behind

While fixing Unix backslash to Windows one fix problem with false updates and uploads, real problem is not with backslash - becuase PHP ZIP library can identify what slash is used and how to handle it. Real problem is different.

Unix-style ZIP has no folders

When you would use PHP ZIP extension to analyze problematic ZIP file, besides having Unix backslash you might notice that in this style of ZIP archive folders are not explicitely defined.

$zip = new ZipArchive();

if($zip->open('archive.zip') === true) {
  echo 'Entries: ' . $zip->numFiles;

  for($i = 0; $i < $zip->numFiles; $i++) {
    $file = $zip->statIndex($i);

    echo htmlspecialchars($file['name']);
  }

  $zip->close();
} else {
  echo 'Cannot open ZIP archive';
}

What does that mean? Osclass when extracting ZIP is not really checking if file has or has not folder created. It simply expects that as it loop through ZIP archive entries, first folder is listed and then files are followed. This is not true with Unix zip - folders are not there and files are not unzipped until folders were explicitely created in target destination.

How to fix missing folders in ZIP

As mentioned before, easiest fix is to simply re-zip archive on your desktop. Long term fix is different and will be applied in Osclass core v8.4.

Osclass update: Starting with Osclass 8.4, when unzipping themes, plugins, language files etc. Osclass will verify if given folder of file exists already - and if not, folder will be automatically generated by Osclass. So from 8.4 explicit definition of folders in ZIP will not be required and upload will be just fine.

Conclusion and lessons learned

In case you encounter issue with uploading ZIPs into Osclass, follow these steps:

  • Re-zip archive on your computer and upload it again
  • Review ZIP structure via Notepad or text editor
  • Test different product versions on your staging Osclass installation
  • Contact support and provide details and bit of your inteligence and findings for faster resolution

If you feel that support team is not doing enough for you, don't fall into false feeling. We always collect and double-review all tickets and patterns in tickets and as far as we notice customers started to have same kind of issue, we are working hard to identify root-cause, not just patch current problem - but this may take longer as you think.

Hope this article helps you to get your products updated and ready to use in future!

About the Author

My passion is building classifieds marketplaces, automating workflows, and turning messy data into useful products. From PHP, HTML, CSS, and JavaScript to Python, crawlers, imports, and SEO, I enjoy solving technical challenges and sharing lessons learned from real-world projects. Most ideas start with a problem, a cup of coffee, and a curiosity to see how far automation can go.
Osclass, PHP, JavaScript, CSS, Python
47 posts Publishing since 04/2018

Shopping cart
Support tickets Downloads Reviews Orders & Invoices Payments
Dashboard My profile Change password Download user data
Logout