Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I recently committed version 2 of my new plugin to the Plugin Directory, but now when you install the plugin for the first time, you get this error on activation: "The plugin does not have a valid header."

alt text

You can workaround it by browsing to the plugin section of wp-admin and activating from there with no errors, but this is still not ideal.

As far as I can tell, the header looks fine, and is pretty much the same as version 1.0. Which leave me to wonder why I get this error?

Here is the plugin: http://wordpress.org/extend/plugins/export-to-text/

share|improve this question
add comment

6 Answers

up vote 5 down vote accepted

From what you write, it looks to me that you accidentially copied/tagged the whole /trunk directory in your SVN while tagging/branching. As the wordpress plugin directory just grabs the full directory that got tagged, the zip package was invalidated.

You can recover from that. I once made the same mistake. Just do a full checkout on your local machine in another directory (not the working copy in which you develop your plugin). That check downloads everything, the current trunk and all tags.

Then go inside the tags directory and locate the tag in which you accidentially created the mess. SVN-Delete it and commit that change. You probably can revert the accidental change as well, but I think deleting the directory of the concrete tag is more straight forward.

Next time you tag your plugin, tag the working copy and not the trunk directory.

If you're using SVN on the commandline:

Tags - Chapter 4. Branching and Merging

If you're using Tortoise SVN:

Branching / Tagging - Chapter 4. Daily Use Guide

share|improve this answer
add comment

It seems you have some issue with folder structure, fresh install (or download) of your plugin has following:

export-to-text/trunk/[plugin files]
export-to-text/[plugin files]

The trunk copy seems like an error and is what likely messes up WP scanning for plugin files.

share|improve this answer
    
Not entirely sure what that means, or how to fix it? I tried re-committing, but no joy. –  jnthnclrk Nov 12 '10 at 14:50
    
Ah, looks like I have another copy of trunk in tags/. See here: plugins.svn.wordpress.org/export-to-text/tags/1.1 . I wonder how I should delete that? –  jnthnclrk Nov 12 '10 at 14:54
    
@trnsfrmr sorry, I am weak with version control. You should probably uncheck my answer as accepted so someone who is better with that takes a look. –  Rarst Nov 12 '10 at 15:00
    
OK, done....... –  jnthnclrk Nov 12 '10 at 15:48
    
OK, do a local SVN update of your plugin, clean out the extra directories, then force an SVN commit of the cleaned version. This should remove the extra directories from the repository version and restore things to working order. –  EAMann Nov 12 '10 at 18:42
add comment

After checking the plugin package (1.1), something else popped into my eyes in the readme:

Requires at least: 3.01 Tested up to: 3.01

I do not know if this is causing the error, but probably you should write 3.0.1 (see the dot between 0 and 1).

share|improve this answer
add comment

I had the exact same error before and I was not using any kind of version control when I faced the issue. But I will just go ahead and tell you what solved the problem for me and it might actually help you.

The problem for me was the IDE I was using. It was inserting a blank invisible char just before the PHP opening tag. Problem solved by trying a different IDE which is the regular notepad :)

share|improve this answer
add comment

That error generally occurs when it's missing one of the key header fields WP requires. Always include a name, author, URL, author URL, description, and version.

share|improve this answer
    
Plugin in question seems to have all of these in order. btw plugin name is the only field that is actually technically required, rest are obviously good practice to include, but optional. –  Rarst Nov 12 '10 at 22:10
add comment

i think first you have to check either you are istalling a theme or a plugin because some time when you install a zip file of theme in a newplugin this error cause and its a blunder mistake but can happened specialy for new users.

mortgage-lowest-rates<

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.