Plugin Upload Issue: plugin archive does not contain a folder that corresponds to the plugin name

I have a zip file that, when unzipped, contains a folder with my theme name (as set in the locale xml files). However, when trying to upload my plugin to a staging site, I am getting the following error:

The uploaded plugin archive does not contain a folder that corresponds to the plugin name.

Just trying to understand what the correct folder structure for the zipped plugin should be, and whether there’s a specific file format its expecting the zip? Thanks

Note: I’m not seeing any plugin specific errors in the log.

Hi @asasasasas,

I’d suggest downloading one of the existing theme plugins for comparison.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

Thanks for the reply. I’ve modelled the theme plugin on the defaultManuscript theme plugin here. Only difference being my zip file is named to match the actual theme name, not including the version. Not sure why I can’t upload though…

Hi @asasasasas,

Is it actually a .zip, or is it a .tar.gz? I think OJS requires plugins to be .tar.gz files.

Regards,
Alec Smecher
Public Knowledge Project Team

Yes, thats it! Thanks @asmecher!

Hmm, seems like that did not fix the issue. One of two things happen, seemingly at random, without any further information showing in the browser console or PHP logs:

  • The plugin upload screen closes, no confirmation is shown, and the plugin isn’t added
  • The upload fails and shows the same error: “The uploaded plugin archive does not contain a folder that corresponds to the plugin name.”

The file format is tar.gz and I am sure that the folder name matches the application name in the version.xml file. Not sure what else I am missing…

Hi @asasasasas,

Does your system allow you to upload other plugins? (If not, maybe it’s a matter of file permissions, or the tar tool not being available to PHP, or something else.)

Regards,
Alec Smecher
Public Knowledge Project Team

I have same problem. i do every thing but still have error

“The uploaded plugin archive does not contain a folder that corresponds to the plugin name”

Hello! I’m really sad because I have the same problem… I’m new to OJS, so I don’t know much about how to use the system. I went to the github link, downloaded all the files to my computer, named them QuickSubmit and I still got the message “The uploaded plugin archive does not contain a folder that corresponds to the plugin name”. Then, I converted the zip folder to tar.gz, and still got the same message. What should I do? Should I save the folder in some specific place in my computer, something like that? Thanks a lot

Hi @Fernanda,

This post is related to a different plugin, but otherwise the advice is the same: SWORD Plugin Not installing

Regards,
Alec Smecher
Public Knowledge Project Team

Hi.

I have the same problem:

“The uploaded plugin archive does not contain a folder that corresponds to the plugin name.”

Our OJS (2.4.8) runs on windows and I allreadt tried to put

tar = C:\\RUNTIME\\TAR\\bin\\tar.exe

or

tar = C:/RUNTIME/TAR/bin/tar.exe

in config.inc.php

Paath to the tar is also in “path”. I have also upload some libs on a server for tar, but I can not install a new plugin (Clarivate Publons).

изображение

It is funny, but this tar (http://gnuwin32.sourceforge.net/packages/gtar.htm) is actually does not work.

This version (http://gnuwin32.sourceforge.net/packages/libarchive.htm) is working fine with 2 attitioal libraries (Requirements) and allows OJS install a plugin under windows.

May be, it should be in FAQ?

Hi @IdeaFix,

It’s a good idea to capture the requirements for Windows users. Could you describe in a little more detail what was necessary, especially w.r.t. the other 2 libraries that needed to be installed?

Thanks,
Alec Smecher
Public Knowledge Project Team