Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#48791 closed defect (bug) (invalid)

Shortcodes not working since 5.3

Reported by: programmin's profile programmin Owned by: audrasjb's profile audrasjb
Milestone: Priority: normal
Severity: normal Version: 5.3
Component: Widgets Keywords:
Focuses: Cc:

Description

Text widget shortcodes are not displaying on a non-homepage for me, when they did work in 5.2. There is nothing displayed. Furthermore when I call a certain ajax display on the page it does not return the right result as it did in 5.2:

As shown in Firefox network panel Params=

action: parse-media-shortcode
shortcode: [widget+id="text-12"]
type: widget
post_ID: 7053

Instead of a proper response, for a widget that does exist, I get:

{"success":false,"data":{"type":"no-items","message":"No items found."}}

back. Going back to 5.2, this works correctly. Saw this on 2 sites so far.

Attachments (2)

Capture d’écran 2019-12-04 à 16.37.08.png (38.0 KB) - added by audrasjb 5 years ago.
Works fine with log out shortcode plugin (Admin)
Capture d’écran 2019-12-04 à 16.37.24.png (24.2 KB) - added by audrasjb 5 years ago.
Works fine with log out shortcode plugin (Public, with Twenty Nineteen)

Download all attachments as: .zip

Change History (13)

#1 @mukesh27
5 years ago

  • Component changed from General to Shortcodes

#2 @audrasjb
5 years ago

  • Milestone changed from Awaiting Review to 5.3.1
  • Owner set to audrasjb
  • Status changed from new to reviewing

#3 @audrasjb
5 years ago

  • Keywords reporter-feedback added

Hi @programmin and thanks for your ticket,

Could you try to give us some steps to reproduce the bug, please?
What plugin are you using? Does the issue happens in every browsers? Are you using a WordPress Core Bundled Theme?

I can not reproduce the issue on my side with a fresh install and various plugins that bring some shortcodes, so I'm inclined to say that it is not related to WordPress Core, but we'll appreciate some further context to make a better opinion on this issue :-)

Cheers,
Jb

Last edited 5 years ago by audrasjb (previous) (diff)

#4 @hometowntrailers
5 years ago

Recently, I cannot get shortcodes to display in an HTML widget anymore, though they work in Text widgets.

Fresh install, 5.2.4 and 5.3.0, variety of native WordPress themes, same with two browsers I tried (Chrome and Edge).

Using these simple shortcodes https://wordpress.org/plugins/log-out-shortcode/ which haven't changed in seven months (meaning, something else changed).

That plugin is the only plugin.

@audrasjb
5 years ago

Works fine with log out shortcode plugin (Admin)

@audrasjb
5 years ago

Works fine with log out shortcode plugin (Public, with Twenty Nineteen)

#5 @hometowntrailers
5 years ago

Yes, it works in a TEXT widget, but NOT in the HTML widget (as it used to).

#6 @audrasjb
5 years ago

  • Component changed from Shortcodes to Widgets

Ok, so let's move this ticket to Widget component.
I don't think HTML Widget have to interpret shortcodes, but I'll try to see if it was the case before.

Last edited 5 years ago by audrasjb (previous) (diff)

#7 @programmin
5 years ago

I briefly looked over the relevant functions in diff of WP5.2-5.3 the other day and didn't see relevant differences. Sorry, the theme is a proprietary theme I was using, but it sounds like @hometowntrailers also had the same issue as it was a text/html widget lookup issue in my case too.

#8 @audrasjb
5 years ago

  • Keywords close added

Thank you for the update @programmin 👍

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


5 years ago

#10 @audrasjb
5 years ago

  • Keywords reporter-feedback close removed
  • Milestone 5.3.1 deleted
  • Resolution set to invalid
  • Status changed from reviewing to closed

#11 @programmin
5 years ago

It looks like this was added in newer versions of WP, the_widget() in wp-includes/widgets.php:


	/** This filter is documented in wp-includes/class-wp-widget.php */
	$instance = apply_filters( 'widget_display_callback', $instance, $widget_obj, $args );

	if ( false === $instance ) {
		return;
	}

Thus the hidden widgets as compared to old versions.

Note: See TracTickets for help on using tickets.