WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 7 days ago

#31907 accepted defect (bug)

get_post_gallery()["src"] sometimes return empty on list views.

Reported by: odie2 Owned by: antpb
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.1
Component: Gallery Keywords: reporter-feedback
Focuses: Cc:

Description

Hello,

As wrote there: https://wordpress.org/support/topic/bug-get_post_gallery-on-7th-execution, sometimes get_post_gallery()["src"] is empty on list views (like post format view, main page pagination etc.)

Only ["src"] is not added to array (ids etc. are there), so it's returning false for if statement.

Greetings

Change History (3)

#1 @swissspidy
2 years ago

  • Keywords needs-patch added

#2 @antpb
7 days ago

  • Keywords reporter-feedback added; needs-patch removed

In the screenshot provided in the support issuehttps://wordpress.org/support/topic/bug-get_post_gallery-on-7th-execution/ (pictured below) this looks to be a problem with a plugin that modifies gallery view. The slider/pagination option does not seem to be available by default. Also mentioned in the support issue was that the example site was a modified version of twentyfourteen.

I've replicated gallery views in and unmodified twentyfourteen instance with 11 posts. All showed to be uniform on the main page (with pagination)

@odie2 can you confirm that this is still an issue? Maybe I'm missing something.

Below is the provided example from the support issue:

http://maciej.kuzniczysko.pl/images/zs-bug.jpg

#3 @antpb
7 days ago

  • Owner set to antpb
  • Status changed from new to accepted
Note: See TracTickets for help on using tickets.