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/Emojis are NOT rendered in WP:Pattern #37312

Closed
BicanMarianValeriu opened this issue Dec 12, 2021 · 8 comments
Closed

Shortcodes/Emojis are NOT rendered in WP:Pattern #37312

BicanMarianValeriu opened this issue Dec 12, 2021 · 8 comments
Labels
[Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Feature] Shortcodes Related to shortcode functionality [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed.

Comments

@BicanMarianValeriu
Copy link

Description

WP Pattern should work the same way as template part, rendering shortcodes and smilies.
Bellow there are 3 screenshots showing before/after changing the behaviour.

Step-by-step reproduction instructions

  1. Create a pattern
  2. Add shortcode in it
  3. Try to use it on a template

Screenshots, screen recording, code snippet

image
image
image

Environment info

No response

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

Yes

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

Yes

@talldan talldan changed the title Shortcodes/Emonjis are NOT rendered in WP:Pattern Shortcodes/Emojis are NOT rendered in WP:Pattern Dec 16, 2021
@talldan
Copy link
Contributor

talldan commented Dec 16, 2021

@BicanMarianValeriu Would you be able to provide a code snippet for a pattern that has this issue? Thanks.

@talldan talldan added [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Status] Needs More Info Follow-up required in order to be actionable. labels Dec 16, 2021
@BicanMarianValeriu
Copy link
Author

BicanMarianValeriu commented Dec 16, 2021

Try to place any shortcode (I dont know any core shortocodes - maybe [audio] ) inside a pattern and try to render them - it will show as shortcode tag instead as rendered markup.

@carolinan
Copy link
Contributor

carolinan commented Dec 21, 2021

Hi
It is unclear to me what you are trying to do:
Did you place a shortcode block <!-- wp:shortcode -->[audio]<!-- /wp:shortcode --> inside the pattern, or only the [shortcode] ?

@BicanMarianValeriu
Copy link
Author

<!-- wp:shortcode -->[audio]<!-- /wp:shortcode -->

@carolinan carolinan added the [Feature] Shortcodes Related to shortcode functionality label Dec 21, 2021
@github-actions
Copy link

github-actions bot commented Jan 6, 2022

Help us move this issue forward. This issue is being marked stale since it has no activity after 15 days of requesting more information. Please add info requested so we can help move the issue forward. Note: The triage policy is to close stale issues that need more info and no response after 2 weeks.

@github-actions github-actions bot added the [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. label Jan 6, 2022
@devinmaeztri devinmaeztri removed the [Status] Needs More Info Follow-up required in order to be actionable. label Jan 12, 2022
@mrfoxtalbot
Copy link

@BicanMarianValeriu I am seeing that @carolinan mentioned this in #37545

I did a quick test to register a patter with the following content:

'content' => '[audio mp3="https://gutenbergcore.mystagingwebsite.com/wp-content/uploads/2022/09/Conducta-en-los-velorios-Julio-Cortázar.mp3"]

The shortcode audio content seems to be rendered as expected:

Screen.Capture.on.2022-09-12.at.17-30-33.mp4

I am going to close this as solved but please feel free to reopen if the original issue was different and/or if there are any lingering problems. Thank you!

@nebulousGirl
Copy link

I am having this issue in a template files. I am using a shortcode in a pattern that is included in a template file.

Example:

archive.html

<!-- wp:pattern {"slug":"nouvelles/archive"} /-->

Pattern

<!-- wp:shortcode -->
[facetwp facet="tri_des_nouvelles"]
<!-- /wp:shortcode -->

The result is the shortcode tag in plain text instead of the rendered version.

@Triloworld
Copy link

Triloworld commented Feb 9, 2024

Yes, Contact Form added is:

  1. Added example shortcode in Pattern
  2. This pattern is in footer.html
  3. File footer.html is in theme
  4. Theme is enabled as FSE

Pattern do not render shortcode.

Temporary fix insert into theme or as standalone plugin: https://core.trac.wordpress.org/ticket/58333#comment:72

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Feature] Shortcodes Related to shortcode functionality [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed.
Projects
None yet
Development

No branches or pull requests

7 participants