WordPress.org

Forums

Loco Translate
[resolved] Invalid Header (22 posts)

  1. Karsten
    Member
    Posted 1 year ago #

    When trying to activate the plugin (v1.4.1), I get this error:
    "This plugin can not be activated because of invalid headers"

    Any Ideas?

    http://wordpress.org/plugins/loco-translate/

  2. timwhitlock
    Member
    Plugin Author

    Posted 1 year ago #

    I'm afraid I can't reproduce this error, even on an empty WordPress installation.
    What version of WordPress are you running?

  3. Karsten
    Member
    Posted 1 year ago #

    I'm using WordPress 3.8.1.
    I'll check if this plugin conflicts with another one and will report.

  4. Karsten
    Member
    Posted 1 year ago #

    Ok, I Install the plugin and activate it from the installation process - I get the error.
    I install the plugin and go back to plugin-page and activate it from there - No error.

    May still be something with a different plugin or not, but this way I can still use it.

  5. richpav
    Member
    Posted 1 year ago #

    I had the same problem: I got an invalid error when trying to activate immediately after installing, but if I went to the plugin page I could activate there.

    Here's my rig:

    ### Begin System Info ###
    
    	** WORDPRESS DATA **
    Multisite:				No
    SITE_URL:				http://localhost
    HOME_URL:				http://localhost
    WP Version:				3.8.1
    Permalink:				/%category%/%postname%/
    Cur Theme:				Firmasite-child
    Post Types:				post, page, attachment, revision, nav_menu_item, forum, topic, reply, incsub_event, wpcf7_contact_form, groups, sfwd-courses, sfwd-lessons, sfwd-quiz, sfwd-topic, sfwd-certificates, sfwd-transactions
    Post Stati:				publish, future, draft, pending, private, trash, auto-draft, inherit, closed, spam, orphan, hidden, recurrent
    User Count:				4
    
    	** WORDPRESS CONFIG **
    WP_DEBUG:				Enabled
    WP Memory Limit:			40MB
    Show On Front:				posts
    Page On Front:				Koga Eikaiwa (ID# 62)
    Page For Posts:				Posts (ID# 2050)
    
    	** BROWSER DATA **
    Platform:				Apple
    Browser Name:				Chrome
    Browser Vers:				32.0.1700.107
    UA String:				Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36
    
    	** SERVER DATA **
    jQuery Version				1.10.2
    PHP Version:				5.5.3
    MySQL Version:				5.5.33
    Server Software:			Apache/2.2.25 (Unix) mod_ssl/2.2.25 OpenSSL/0.9.8y DAV/2 PHP/5.5.3
    
    	** PHP CONFIGURATION **
    Safe Mode:				No
    Memory Limit:				256M
    Upload Max:				32M
    Post Max:				32M
    Time Limit:				30
    Max Input Vars:				1000
    Display Errors:				Off
    Sessions:				Enabled
    Session Name:				PHPSESSID
    Cookie Path:				/
    Save Path:				/Applications/MAMP/tmp/php
    Use Cookies:				On
    Use Only Cookies:			On
    FSOCKOPEN:				Your server supports fsockopen.
    cURL:					Your server supports cURL.
    SOAP Client:				Your server has the SOAP Client enabled.
    SUHOSIN:				Your server does not have SUHOSIN installed.
    
    	** PLUGIN INFORMATION **
    Total Plugins:				33
    Must-Use Plugins: (2)
    	- Gateway Relay 1.0
    	- WPMU Assist 1.0.2
    
    Active Plugins: (21)
    	- bbPress 2.5.3
    	- bbPress Admin Bar Addition 1.7.1
    	- BuddyPress 1.9.2
    	- BuddyPress Multilingual 1.4.2
    	- BuddyPress Toolbar 1.6.0
    	- CodeStyling Localization 1.99.30
    	- Contact Form 7 3.7
    	- Events + 1.7.2
    	- FirmaSite Theme Enhancer 1.2.5
    	- Google Maps 2.7.1
    	- Hotfix 1.0
    	- LearnDash LMS 1.5.0.1
    	- Loco Translate 1.4.1
    	- Membership Premium 3.4.6.1
    	- ServerBuddy 1.0.5
    	- Subscribe by Email 2.5.1
    	- System Snapshot Report 1.0.0
    	- WPML Media 2.1.1
    	- WPML Multilingual CMS 3.0.1
    	- WPMU DEV Dashboard 3.4.1
    	- WP Multibyte Patch 1.9
    
    Inactive Plugins: (10)
    	- Duplicator 0.5.2
    	- Groups 1.4.7
    	- Installer 0.7.1
    	- Maintenance Mode 5.4
    	- POEditor 0.9.3
    	- Quick Localization (Quick Localisation) 0.0.9
    	- Remember Me Checked 1.0.1
    	- vBsocial Goals 2.0
    	- WPTB Language 1.0.1
    	- xili-dictionary 2.4.0
    
    ### End System Info ###

    [Moderator Note: Please post log files between backticks or use the code button.]

  6. timwhitlock
    Member
    Plugin Author

    Posted 1 year ago #

    If you didn't install from the plugins page, where were you installing from?
    Were you using WordPress's FTP install method?

  7. richpav
    Member
    Posted 1 year ago #

    I installed from the wp-admin plugin page. Searched for the plugin by name and clicked the install link on the wp-admin page. WordPress said it installed. I clicked the activate link on the wp-admin page. WordPress said it had an invalid header.

    Next I went to the plugin page in wp-admin. I was able to activate it from there.

  8. timwhitlock
    Member
    Plugin Author

    Posted 1 year ago #

    Sorry, but I'm not following the difference between the "wp-admin plugin page" and the "plugin page in wp-admin"

  9. Karsten
    Member
    Posted 1 year ago #

    What richpav describes is 100% what I am facing.
    - Install from within WordPress and activate and the end of installation -> header error
    - install from within WordPress and do not activate, but return to plugin-page (install, but let the plugin deactivated). Activate it now from the list of inactive plugins -> no problem.

  10. timwhitlock
    Member
    Plugin Author

    Posted 1 year ago #

    Ok, so you are installing via WordPress's FTP method straight from the plugin directory. This is what I was trying to understand.

    I don't currently have an FTP server running anywhere, but I'll look into what is required to support this install method and hopefully fix it.

  11. timwhitlock
    Member
    Plugin Author

    Posted 1 year ago #

    Dumb question perhaps, but can you install other plugins directly from the repository this way?

  12. Karsten
    Member
    Posted 1 year ago #

    Hi Tim,
    just to clarify:

    - I install your Plugin from http://myWordpressDomain/wp-admin/plugin-install.php (From the Dashboard it's Menu Plugin > Install)
    - Yes other plugins work this way.
    - The only plugins form richpav list taht I use too, is Contact Form 7.

  13. timwhitlock
    Member
    Plugin Author

    Posted 1 year ago #

    I just tried the direct install method by changing the FS_METHOD to 'direct' rather than the default FTP - and I got no activation error when clicking activate straight away.

    I need to find what bit of code the error is coming from. Searching for the error message "this plugin cannot be activated" in the WordPress codebase brings up nothing in my install. Is this the exact wording of the error?

  14. timwhitlock
    Member
    Plugin Author

    Posted 1 year ago #

    Can you clarify whether the exact error text is in fact "The plugin does not have a valid header." As this is a known error message.

  15. richpav
    Member
    Posted 1 year ago #

    Yes, that was the error message. I tried twice to install the plugin and got the same result.

    Also, does Loco Translate detect translation files the exactly same way as WordPress does? I should create another topic instead of going off on a tangent…

  16. timwhitlock
    Member
    Plugin Author

    Posted 1 year ago #

    re translation files. yes please open another thread if you think there's a problem there.

    re "invalid headers"
    There are a number of things that cause this --

    1.
    One cause is incorrectly nested folders inside the zip file. This shouldn't be the case because WordPress is zipping it themselves. However, I did have a problem with an accidental extra folder, but this was deleted. If you see a folder called "trunk" inside "loco-translate" folder then this might explain it, but it has since been removed.

    2.
    Another cause is double line spacing in PHP files caused by DOS line breaks. These can appear when using FTP if the FTP server is set to translate them. However, the fact that a second attempt to install the plugin does work, makes this an unlikely cause. But I'm not ruling it out.

    3.
    Another cause is when the "Tested up to" header contains a lower version of WordPress that you're using. Loco-translate has this set to 3.8, but this should cover 3.8.1 - I've tried it myself and I don't get an error.

    I'm afraid I'm not much closer to working this out. As the plugin does install, I can't put this to the top of my priority list. I'll update the thread if I solve this (i.e. if I can reproduce this) but I'm hoping it may "fix itself" in the next release as I've not had any reports before this version, and I suspect it may be related to the extra folder issue.

  17. Karsten
    Member
    Posted 1 year ago #

    I just found this, about another Plugin having same issue.
    Came out that multiple Plugin-Name-Header caused problems.
    Maybe worth a look?

    http://premium.wpmudev.org/forums/topic/install-error-the-plugin-does-not-have-a-valid-header

  18. timwhitlock
    Member
    Plugin Author

    Posted 1 year ago #

    Well this duplicate header would have been a problem when there was a duplicate folder, but that's removed now. When was the last time you tried an install? I removed the extra folder quite recently. Does your download contain the extra "trunk" folder?

  19. richpav
    Member
    Posted 1 year ago #

    Maybe using MAMP for a development platform is causing the error.

  20. timwhitlock
    Member
    Plugin Author

    Posted 1 year ago #

    I don't see why MAMP would be a problem, but I'm not ruling anything out completely at this stage.

    I'm still not clear on whether this problem persists since I removed the erroneous folder. Can you please let me know if it is still persisting?

  21. Karsten
    Member
    Posted 1 year ago #

    Uninstalled / removed plugin, reinstalled. No error. o_O

  22. timwhitlock
    Member
    Plugin Author

    Posted 1 year ago #

    Great. I'm assuming the extra folder was the reason.
    I'll reopen this issue if anyone else reports the problem.

    Thanks for your patience.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Loco Translate
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.