[wp-trac] [WordPress Trac] #56780: shortcode block in block-based template part in a classic theme does not get expanded

WordPress Trac noreply at wordpress.org
Tue Dec 20 01:04:37 UTC 2022


#56780: shortcode block in block-based template part in a classic theme does not
get expanded
-------------------------------------------------+-------------------------
 Reporter:  pbiron                               |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  high                                 |   Milestone:  6.2
Component:  Editor                               |     Version:  6.1
 Severity:  normal                               |  Resolution:
 Keywords:  needs-patch early has-testing-info   |     Focuses:
  has-screenshots                                |
-------------------------------------------------+-------------------------
Changes (by ironprogrammer):

 * keywords:  needs-patch needs-testing early => needs-patch early has-
     testing-info has-screenshots


Comment:

 == Reproduction Report

 I was able to reproduce this issue.

 === Environment
 - Hardware: MacBook Pro Apple M1 Pro
 - OS: macOS 12.6.1
 - Browser: Safari 16.1
 - Server: nginx/1.23.2
 - PHP: 7.4.33
 - WordPress: 6.2-alpha-54642-src
 - Theme: test-56780 v0.1.0 (the provided attachment:test-56780.zip)
 - Active Plugins:
  - gutenberg v14.8.0-rc.1 (tested active/inactive)

 === Actual Results
 - ✅ Shortcodes are not processed when included in a
 `block_template_part`.

 === Additional Information
 - Shortcode was not processed in the template part, whether inside a `<!--
 wp:shortcode -->` or standalone.
 - Added paragraph and shortcode blocks to post to demonstrate the
 shortcode was otherwise functional.
 - Applied the following adjustments to the provided test theme for added
 clarity:
   - in `masthead.html`, added `<h3>masthead:</h3>` before the shortcode
 block
   - correct typo in shortcode to `[hello_world]`
   - in `functions.php`, updated return value of shortcode to `hello
 world!`

 === Supplemental Artifacts
 [[Image(https://cldup.com/_M3upWbG1n.png, 300px)]]

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56780#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list