#48791 closed defect (bug) (invalid)
Shortcodes not working since 5.3
Reported by: | programmin | Owned by: | 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)
Change History (13)
#2
@
5 years ago
- Milestone changed from Awaiting Review to 5.3.1
- Owner set to audrasjb
- Status changed from new to reviewing
#4
@
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.
#6
@
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.
#7
@
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.
This ticket was mentioned in Slack in #core by audrasjb. View the logs.
5 years ago
#10
@
5 years ago
- Keywords reporter-feedback close removed
- Milestone 5.3.1 deleted
- Resolution set to invalid
- Status changed from reviewing to closed
#11
@
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.
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