[Resolved] [Plugin: User meta shortcodes] Invalid header
Installed fine, but failed to activate due to “invalid header”
It was easy to fix but is nonetheless a weird error.
Just create a new own plugin and copy-paste all the stuff from the broken plugin to the new one… 🙂
The plugin author forgot to close the plugin details/comments section in PHP and then begin the plugin code.
If this is added after the comments at the top then the plugin works again
Here is a copy of the PHP, this can replace the user-meta-shortcodes.php file.
Okay, that works as well. My installed plugin works without the extra closing/opening of the PHP Section. I have just copied the code to a newly created plugin. At least it’s fixed.
@imeson Thanks, didn’t knew about that. I will update the plugin with your change.
This plugin is ALMOST exactly what I was looking for. One minor problem, this whole invalid header issue deal.
Took me a lot of screwing around with this over the past few hours, and I wasn’t even able to create a plugin with just three lines of code:
Plugin Name: Rob Wafle
I had, of course downloaded the user-meta-shortcodes file MANY MANY times, and used wordpad instead of notepad to edit it… since the file has unix style line breaks… But, this time I thought to myself, could this whole invalid header deal be something with the line breaks.. because what could cause my simple three line plugin to not add to the plugin list..
Sure enough, I copied the file out of this fancy new text editor I decided to use instead of notepad (sublime text 2) .. pasted it into notepad, saved the file, uploaded via ftp, refreshed the plugin page, and sure enough, the user meta shortcodes plugin was finally listed..
Now to see if this puppy works……
I tried another fix then pushed the version 0.2.3 to the repository. It should be available for upgrade in a couple of hours.
Just curious, I have this installed and works almost the way that I need it to, but it seems to only work if a user is logged into the site, in other words if I go to my site and DO NOT log in (as most visitors will be doing) they do not see my shortcodes, but when you are logged in you do see them?
Is that what is suppose to occur?
true, when you use author info there is no need for the user to be logged in. it slipped to my mind, I will need to update the code to remove this
thanks for notice, please check for updates soon
rvencu – thanks for your post, but not sure I am clear. You indicated above that the user does not need to be logged in when using “author info” but that is opposite of what I am experiencing?
Thanks for the quick reply.
You are correct. It should not but it is doing so now. Since I am traveling until March 23 I cannot do much now, but I will fix it for sure on march 23.
No problems – couldn’t ask for better responses. Thanks again and travel safe.
I still got “Invalid Header” issues with the last version of the plugin.
I solved it by replacing all the carriage return “Ctrl+M” by the regular “\r” character.
In vim ‘
:%s/^M/\r/g‘ where ‘
^M‘ is obtained by doing Ctrl+v then Enter.
For information, I am working on a linux, the wordpress is hosted on a linux too and that may explain why it does not like the “Ctrl+M”.
And for what I have seen, the other plugins I have downloaded use the regular carriage return character and not the “Ctrl+M”
You can find here (for one month) the modified version that worked for me. https://transfert.inria.fr/fichiers/53aaff2a28284957c6c9167c234e97e2/user-meta-shortcodes.0.2.3.zip
- The topic ‘[Resolved] [Plugin: User meta shortcodes] Invalid header’ is closed to new replies.