WordPress.org

Making WordPress.org

Opened 13 months ago

Closed 13 months ago

Last modified 13 months ago

#3675 closed defect (invalid)

Readme validator for plugins appears to be broken

Reported by: duanestorey Owned by:
Milestone: Priority: normal
Component: Plugin Directory Keywords:
Cc:

Description

I tried using the readme validator located at https://wordpress.org/plugins/developers/readme-validator/ to test the readme of a new plugin.

Despite it looking fine to me, I kept getting an error:

Fatal Errors:
No plugin name detected. Plugin names look like: === Plugin Name ===

After making a few changes, I decided to try the sample readme provided at https://wordpress.org/plugins/readme.txt by cutting and pasting it into the same validator - the error was the same.

I tried using the URL for the sample readme as well, and it produced the same error. So it seems like something may be broken in the validator.

Attachments (1)

Screen Shot 2018-06-20 at 9.01.34 PM.png (187.1 KB) - added by duanestorey 13 months ago.
Readme validator, showing result of https://wordpress.org/plugins/readme.txt

Download all attachments as: .zip

Change History (11)

#1 follow-up: @dd32
13 months ago

  • Component changed from General to Plugin Directory
  • Keywords reporter-feedback added

@duanestorey Can you let us know what you're supplying to the validator?

The error is a bit obtuse, but the plugin header should be literally === MY PLUGIN NAME ===.

https://plugins.svn.wordpress.org/hello-dolly/trunk/readme.txt is parsing correctly for me.

#2 in reply to: ↑ 1 ; follow-up: @duanestorey
13 months ago

Replying to dd32:

@duanestorey Can you let us know what you're supplying to the validator?

The error is a bit obtuse, but the plugin header should be literally === MY PLUGIN NAME ===.

https://plugins.svn.wordpress.org/hello-dolly/trunk/readme.txt is parsing correctly for me.

I tried the one I was working on, which didn't work. But I also tried the sample readme provided at https://wordpress.org/plugins/readme.txt.

I'll try to attach a photo.

I sounds like it's expecting === MY PLUGIN NAME ===, but in the sample readme it's === PLUGIN NAME ===.

#3 in reply to: ↑ 2 @dd32
13 months ago

Replying to duanestorey:

I sounds like it's expecting === MY PLUGIN NAME ===, but in the sample readme it's === PLUGIN NAME ===.

It expects that === Plugin Name === is replaced by the plugin name, for example, === Hello Dolly === in the example above.

#4 @duanestorey
13 months ago

Ahh, of course! Sorry, I started with the sample and started editing the other fields without realizing I had to change that. The error message may need to be improved though, because it made it sound like it expected that but couldn't find it.

Regardless doesn't seem to be a bug. Cheers, thanks.

#5 @duanestorey
13 months ago

  • Resolution set to invalid
  • Status changed from new to closed

#6 follow-up: @Otto42
13 months ago

To explain this more clearly to anybody else reading this ticket, many people don't quite grasp the idea here, and leave the literal text of "=== Plugin Name ===" there in the readme.txt file. We see it happen all the time in committed code.

So, the checker is checking for that specific text. You're supposed to replace the words "Plugin Name" with the actual name of your plugin. If you don't do that, then you get the error in question.

You should actually not have "=== Plugin Name ===" there, but instead have three equal signs, the actual name of your plugin, and then three more equal signs.

#7 in reply to: ↑ 6 @duanestorey
13 months ago

I'm not sure if this happens enough to do something about it, but a simple change in the validator that looks for that original string and gives a different error message might be useful. For example the error message now is:

No plugin name detected. Plugin names look like: === Plugin Name ===

Perhaps something more like:

You need to add your plugin's name to the readme file; please change '=== Plugin Name ===' to reflect the actual name of your plugin, for example '=== Tony's Great Image Plugin ===

or something that makes it more obvious? Just a suggestion in an attempt to reduce these issues if you do see this more often.

Replying to Otto42:

To explain this more clearly to anybody else reading this ticket, many people don't quite grasp the idea here, and leave the literal text of "=== Plugin Name ===" there in the readme.txt file. We see it happen all the time in committed code.

So, the checker is checking for that specific text. You're supposed to replace the words "Plugin Name" with the actual name of your plugin. If you don't do that, then you get the error in question.

You should actually not have "=== Plugin Name ===" there, but instead have three equal signs, the actual name of your plugin, and then three more equal signs.

#8 follow-up: @duanestorey
13 months ago

I should have known better when I did this, as I have written and released plugins before :S . But I just started with the readme and started hacking on it.

My personal confusion came because all of the other equals == sections are fixed, like == Description ==, == Installation ==. For some reason I just thought the top section, === Plugin Name ===, was a heading, and everything under it was the information about the plugin.

I interpreted that original error message,

No plugin name detected. Plugin names look like: === Plugin Name ===

as saying it was looking for a specific heading in the readme file but was unable to find it, rather than I should change it to something unique. The name of the plugin is also defined in the plugin's primary PHP file, and for some reason I assumed (in this case) that it was grabbing it from there once in the repository.

So as I pointed out above, perhaps changing that error message to be slightly more action orientated may help alleviate confusion in people who may make the same mistake I did.

Last edited 13 months ago by duanestorey (previous) (diff)

#9 @SergeyBiryukov
13 months ago

In 7356:

Plugin Directory, Readme Validator: Clarify "No plugin name detected" error message.

Add a note that Plugin Name should be changed to reflect the actual name of the plugin.

Props duanestorey.
See #3675.

#10 in reply to: ↑ 8 @SergeyBiryukov
13 months ago

  • Keywords reporter-feedback removed

Replying to duanestorey:

So as I pointed out above, perhaps changing that error message to be slightly more action orientated may help alleviate confusion in people who may make the same mistake I did.

Makes sense to me, the message is now updated. Thanks for the suggestion!

Note: See TracTickets for help on using tickets.