Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shortcodes don't work in Hybrid Theme Template Parts (WordPress 6.2-RC2) #49233

Closed
aurooba opened this issue Mar 21, 2023 · 2 comments
Closed
Labels
[Type] WP Core Ticket Requires an upstream change from WordPress. Core Trac ticket should be linked.

Comments

@aurooba
Copy link
Member

aurooba commented Mar 21, 2023

Description

I'm testing in a hybrid theme that declares support for Template Parts. While shortcodes (or blocks that transform shortcodes) work in the Site Editor itself, on the front-end those shortcodes do not get parsed and show up as plain text. I've tested this with the Gravity Forms block, Gravity Forms shortcode, and just a random shortcode providing plugin I found in the plugin repo.

This doesn't seem to be an issue for block themes, the shortcodes work there as expected

I tested with and without the Gutenberg plugin installed, and the result is the same.

Step-by-step reproduction instructions

  1. Create a template part in a hybrid theme (a classic theme that declares support for template parts)
  2. Try adding a shortcode to a template part
  3. See the shortcode plain text on the front end.

Screenshots, screen recording, code snippet

Screen Shot 2023-03-21 at 8 26 33 AM

Environment info

=== Environment

  • WordPress: 6.2-RC2
  • PHP: 8.1.9 (also tested on PHP 7.4.30)
  • Server: nginx/1.16.0
  • Database: mysqli (Server: 8.0.16 / Client: mysqlnd 8.1.9)
  • Browser: Chrome 111.0.0.0 (macOS)
  • Theme: hybridtheme-test
  • MU-Plugins: None activated
  • Plugins:
    • Advanced Custom Fields PRO 6.0.7
    • Gravity Forms 2.7.3
    • Imagify 2.1.1
    • Query Monitor 3.11.1
    • Safe SVG 2.0.3
    • Shortcode For Current Date 2.1.7
    • WordPress Beta Tester 3.3.4

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

No

@Mamaduka Mamaduka added the [Type] WP Core Ticket Requires an upstream change from WordPress. Core Trac ticket should be linked. label Mar 21, 2023
@Mamaduka
Copy link
Member

Hi, @aurooba

The bug needs to be resolved in the WP core, specifically in the block_template_part() function.

Trac Ticket: https://core.trac.wordpress.org/ticket/56780.

@Mamaduka Mamaduka closed this as not planned Won't fix, can't repro, duplicate, stale Mar 21, 2023
@aurooba
Copy link
Member Author

aurooba commented Mar 21, 2023

Thanks @Mamaduka. I did a search there and didn't find anything (and also..trac is just unfriendly) I appreciate the direct link!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] WP Core Ticket Requires an upstream change from WordPress. Core Trac ticket should be linked.
Projects
None yet
Development

No branches or pull requests

2 participants