WordPress.org

Ready to get started?Download WordPress

Forums

User meta shortcodes
[resolved] Invalid header (20 posts)

  1. James Carroll
    Member
    Posted 2 years ago #

    Installed fine, but failed to activate due to "invalid header"

    http://wordpress.org/extend/plugins/user-meta-shortcodes/

  2. Blake Imeson
    Member
    Posted 2 years ago #

    I have the exact same invalid header issue.

  3. Lace
    Member
    Posted 2 years ago #

    Add me to that list ;) I got the same notice.

  4. bit-wire
    Member
    Posted 2 years ago #

    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... :)

  5. Blake Imeson
    Member
    Posted 2 years ago #

    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

    ?>
    <?php

    Here is a copy of the PHP, this can replace the user-meta-shortcodes.php file.
    http://paste2.org/p/1815895

  6. bit-wire
    Member
    Posted 2 years ago #

    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.

    SOLVED

  7. Richard Vencu
    Member
    Plugin Author

    Posted 2 years ago #

    @Imeson Thanks, didn't knew about that. I will update the plugin with your change.

  8. robwafle
    Member
    Posted 2 years ago #

    Hi Rvencu:

    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......

  9. Maryke
    Member
    Posted 2 years ago #

    I cannot get it to work as described here.

  10. Richard Vencu
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  11. regator99
    Member
    Posted 2 years ago #

    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?

  12. Richard Vencu
    Member
    Plugin Author

    Posted 2 years ago #

    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

  13. regator99
    Member
    Posted 2 years ago #

    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.

  14. Richard Vencu
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  15. regator99
    Member
    Posted 2 years ago #

    No problems - couldn't ask for better responses. Thanks again and travel safe.

  16. cladmi
    Member
    Posted 2 years ago #

    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

  17. Richard Vencu
    Member
    Plugin Author

    Posted 2 years ago #

    Yes, I have no idea why it came like this. Thanks for the input. All plugins I wrote with Notepad++, only this one put this kind of problems

  18. Richard Vencu
    Member
    Plugin Author

    Posted 2 years ago #

    posted a new version (0.2.4) with latest suggestion and fixes

  19. cladmi
    Member
    Posted 2 years ago #

    It is just the end of line character format which differs in dos,unix,mac.

    From what the vim website tells me about it and what I remember, the "CR" character is present in the "dos" and "mac" file formats.
    http://vim.wikia.com/wiki/File_format

    You can specify the end of line characters used in notepad++ with "Edit -> EOL Conversion" and I think that using "UNIX format" can solve this.

  20. Richard Vencu
    Member
    Plugin Author

    Posted 2 years ago #

    Yes, I figured it out. Please let me know if there are more problems around this issue

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic