WordPress.org

Making WordPress.org

Opened 9 months ago

Closed 6 months ago

Last modified 6 months ago

#2651 closed defect (fixed)

Plugin Directory: Search result listing portion of full description instead of short description

Reported by: brianhogg Owned by: tellyworth
Milestone: Plugin Directory v3.0 Priority: high
Component: Plugin Directory Keywords: has-patch
Cc:

Description

May be related to #2585 but I just did a search for 'rating' and one plugin showed a portion of the full description instead of the short description from the readme.txt. Refreshed a few minutes later and it was back to normal (no changes made to the plugin).

Attachments (4)

Screenshot 2017-03-30 16.10.41.png (143.1 KB) - added by brianhogg 9 months ago.
Shown the first time I searched, incorrectly showing portion of the full description
Screenshot 2017-03-30 16.23.07.png (198.0 KB) - added by brianhogg 9 months ago.
After refreshing a few minutes later, showed correct short description
2651-readme-parser-colon-bug.diff (413 bytes) - added by tellyworth 9 months ago.
Fix a bug in the readme parser class where blank lines were sometimes ignored following the headers.
screenshot-wordpress.org-2017-04-01-08-21-46.png (167.1 KB) - added by pigeonhut 9 months ago.
Ratings for your:

Download all attachments as: .zip

Change History (14)

@brianhogg
9 months ago

Shown the first time I searched, incorrectly showing portion of the full description

#1 @samuelsidler
9 months ago

  • Component changed from Theme Directory to Plugin Directory
  • Milestone Plugin Directory v3.0 deleted

@brianhogg
9 months ago

After refreshing a few minutes later, showed correct short description

#2 @tellyworth
9 months ago

  • Owner set to tellyworth
  • Status changed from new to assigned

The second screenshot is from wp-admin, the first is from the web site.

I think this is either a bug in readme parsing, or something quirky in your readme.txt. Investigating.

@tellyworth
9 months ago

Fix a bug in the readme parser class where blank lines were sometimes ignored following the headers.

#3 @tellyworth
9 months ago

  • Keywords has-patch added

Yup, seems it was a readme parser bug triggered by the colon in your short description.

For future testing, here's the readme content to repro:

=== Rating-Widget: Star Review System ===
Contributors: ratingwidget, svovaf, leorw, freemius
Donate link: http://rating-widget.com/pricing/wordpress/
Tags: rate, rating, ratings, vote, votes, voting, star, stars, like, dislike, thumbs, widget, widgets, star rating, thumb rating, rating platform, rating system, seo, post rating, comment rating, 5 star, five star, sidebar, comment, comments, post, posts, page, pages, google, admin, administrator, review, reviews, rich-snippets, plugin, plugins, ajax, buddypress, bbpress, social, javascript, js, wordpress, meta, woocommerce, jquery, contest, competition, voting contest, rtmedia
Requires at least: 3.0
Tested up to: 4.7
Stable tag: 2.8.6
License: GPLv2 or later

The most popular Five Star Review System on the web. User-friendly ratings for: posts, pages, comments, WooCommerce, BuddyPress and bbPress forums.

== Description ==

#### Ratings for your:
* Post Ratings
* Page Ratings

Seems to be faulty logic in the parser's handling of long header lines.

#4 @brianhogg
9 months ago

As a note both screenshots were from wp.org, not one from /wp-admin and the other from wp.org. If it was from my wp-admin, it would have a "Compatible with..." part in the bottom right. Caching issue with the template rendering?

#5 @pigeonhut
9 months ago

I still see this

#6 @SergeyBiryukov
8 months ago

  • Milestone set to Plugin Directory v3 - Future

#7 follow-up: @Otto42
6 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 5565:

Plugin Directory: Fix a bug where blank lines were ignored following the headers, resulting in missing short descriptions in edge cases. Fixes #2651 props @tellyworth

#8 in reply to: ↑ 7 @dd32
6 months ago

Replying to Otto42:

In 5565:

Plugin Directory: Fix a bug where blank lines were ignored following the headers, resulting in missing short descriptions in edge cases. Fixes #2651 props @tellyworth

Just to note it here, IIRC me and @tellyworth chatted about that fix not being very complete.

There were a bunch of historical readme's which had extra line breaks between each header item, such as things like:

Some plugin name
===============
Tested Up To: Something

Stable Tag: 123

Tags: blah, blah blah

Version: 1.2.3
Licenced under the GPL v2+ or later

My Actual Short: Description

I'm totally happy for those readme's to break if they ever get re-parsed, but it's worth documenting here. Some may not have been historic even, and just poorly created text files.

Another "better" fix would be to only break if it was a non-header preceded by a blank line.

#9 @SergeyBiryukov
6 months ago

  • Milestone changed from Plugin Directory v3 - Future to Plugin Directory v3.0

#10 @Otto42
6 months ago

Another "better" fix would be to only break if it was a non-header preceded by a blank line.

The problem is that it's considering any line with a colon in it to be a "header", because many plugins have non-standard headers there that we know not about.

I'm okay with "breaking" those plugins if they include extra useless blank lines in their headers. They can remove the blank lines and make the file look normal. But not having the short description appear or even get saved properly in the DB just because it contains a colon is kind of a bigger problem.

Note: See TracTickets for help on using tickets.