Make WordPress Core

Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#23822 closed defect (bug) (duplicate)

Invalid Plugin Contributors JSON from Plugin API

Reported by: bpetty's profile bpetty Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Site Keywords:
Focuses: Cc:


Under some rare conditions, some plugins can break the plugin API with invalid JSON, specifically in regards to the list of contributors returned. This is likely because of the string encoding used to either parse or store the values returned from the plugin file headers.

Basically though, it results in using a null name for a JSON object member where there absolutely needs to be a string.

For example, the "Aaaaah Lek Lek" plugin (aaaaaaah-lek-lek) returns the following JSON:

    "name": "Aaaaah Lek Lek",
    "slug": "aaaaaaah-lek-lek",
    "version": "1.0",
    "author": "<a href=\"http:\/\/\">Val&#233;rio Souza<\/a>",
    "author_profile": "http:\/\/\/valeriosza",
    "contributors": {
        null: ""
    "requires": "3.0.1",
    "tested": "3.5.1",
    "compatibility": [
    "rating": 0,
    "num_ratings": 0,
    "downloaded": 20,
    "last_updated": "2013-03-12",
    "added": "2013-03-12",
    "homepage": "http:\/\/",
    "sections": {
        "description": "<p>Coloque a frase da m&#250;sica LekLek em seu WordPress, dentro do painel administrativo.<\/p>",
        "installation": "<p>Siga para Instalar<\/p>\n\n<ol>\n<li>Fa&#231;a Upload <code>aaaaaaah-lek-lek<\/code> para a pasta <code>\/wp-content\/plugins\/<\/code><\/li>\n<li>Ative no menu 'Plugins' no seu WordPress<\/li>\n<\/ol>",
        "changelog": "<h4>1.0<\/h4>\n\n<ul>\n<li>Lan&#231;ada Vers&#227;o 1.<\/li>\n<\/ul>",
        "faq": "<h4>What about foo bar?<\/h4>",
        "other_notes": "<h3>Arbitrary section<\/h3>"
    "short_description": "Coloque o Lek Lek no seu WordPress",
    "download_link": "http:\/\/\/plugin\/",
    "tags": {
        "frases": "frases",
        "leklek": "leklek"

JSONLint comes back with:

Parse error on line 7:
...ibutors": {        null: ""    },    
Expecting 'STRING', '}'

These plugin details come from these files:

(it mentions a stable tag, but there are no actual tags)

You might also notice that Extend is unable to display these details correctly either:

Change History (4)

#1 @SergeyBiryukov
11 years ago

FWIW, that readme.txt file is in Windows-1252 instead of UTF-8.

#2 @bpetty
10 years ago

I could still use a fix on this btw...

Additionally, here's the full list of plugins that trigger this same error for the same reason:


Here's another plugin with this encoding problem, but with tags rather than contributors:


#3 @samuelsidler
10 years ago

  • Milestone deleted
  • Status changed from new to closed

Migrated to #meta157

#4 @SergeyBiryukov
10 years ago

  • Resolution set to duplicate
Note: See TracTickets for help on using tickets.