Make WordPress Core

Opened 7 years ago

Closed 3 months ago

#40930 closed defect (bug) (wontfix)

Twenty Seventeen: Sharing buttons not showing with Video, Audio, or Gallery post format

Reported by: chocopress's profile chocopress Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Bundled Theme Keywords: needs-testing close 2nd-opinion
Focuses: Cc:

Description

What's expected:
When sharing buttons are setup to show on the front page, they should be showing regardless of the post format.

What happened:
Sharing buttons aren't showing with Video, Audio, or Gallery format.

https://cldup.com/gbtIq-Ohq4-3000x3000.png

Discussed with @thomasguillot, who figured out the cause:

if ( ! is_single() ) {     

	// If not a single post, highlight the video file.     
	if ( ! empty( $video ) ) {         
		foreach ( $video as $video_html ) {             
			echo '<div class="entry-video">';                 
				echo $video_html;             
			echo '</div>';      
		}     
	}; 
};

If it’s not single, only the video is displayed and nothing else, the sharing buttons require something like the_content() but it’s not being called for video post formats. This also applies to audio, and gallery post format.

Change History (5)

#1 @joyously
7 years ago

I discovered this same thing a different way. See item 3 on a support ticket that has been ignored for 4 months.

#2 @karmatosed
4 months ago

  • Keywords needs-testing added

#3 @poena
3 months ago

  • Keywords close added

Sharing buttons are not part of WordPress, I am going to guess that these buttons are added by the JetPack plugin, but it is difficult to know for sure.

Whichever plugin is used, I think the theory is correct: that plugins are filtering the content to add the sharing buttons and because the content is not used in a standard way, the buttons do not show.

With new content created in the block editor, this is not an issue, because when the post contains the
gallery, audio or video blocks, the conditions in the post format template parts do not apply.
The conditions in these older PHP files are not written to recognize the blocks, so the post content is used, and with it, the plugin filters.

I did confirm that the sharing buttons work on these post formats by installing Jetpack version 13.3.1 and enabling the sharing buttons option.

Because of this, I suggest closing this issue.

  • It requires a plugin to add the sharing buttons
  • It can not be reproduced with the block editor, which is the current default experience.

#4 @poena
3 months ago

  • Keywords 2nd-opinion added

Or, I may be wrong and perhaps JetPack is working around the theme limitation.

In twentyseventeen\template-parts\post\content-gallery.php, the theme uses the core function
get_post_gallery which in turn uses get_post_galleries, which does check for the gallery block. Both the new and old formats.

Either way I am not able to reproduce the issue where the sharing buttons are not showing on the post formats.

#5 @karmatosed
3 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

I agree with closing this, thank you @poena. Thank you everyone for your collaboration.

Note: See TracTickets for help on using tickets.