onOffice-Web-Org / oo-wp-plugin

onOffice for WP-Websites
https://wp-plugin.onoffice.com
GNU General Public License v3.0
9 stars 9 forks source link

Fix Shortcode Recognition for Detail Pages in WP Bakery Builder #852

Open fredericalpers opened 2 months ago

fredericalpers commented 2 months ago

Fix Shortcode Recognition for Detail Pages in WP Bakery Builder

User Story

As a user of the onOffice WordPress plugin, I want the shortcode for detail pages to be recognized correctly when using the "Raw HTML" or "Code" elements in WP Bakery Builder, so that I can utilize these elements without issues.

Customers have reported that the shortcode for detail pages is not recognized when using the "Raw HTML" or "Code" elements in WP Bakery Builder. However, the shortcode works correctly when using the normal text element. This bug needs to be investigated and fixed to ensure that the shortcode functions properly regardless of the WP Bakery element used.

By addressing this bug, users will be able to utilize the detail page shortcode within any WP Bakery Builder element, improving the flexibility and usability of the onOffice WordPress plugin.

Tasks / Requirements

yeneastgate commented 1 month ago

@fredericalpers After investigate, I found that saving the content of the detail page does not work because the post content of Raw HTML is being encoded, which prevents adding Dynamic Rewrite Rules and causes the detail page to not display. image

  • The shortcode for detail pages should be recognized and rendered correctly when placed inside the "Code" element in WP Bakery Builder.

image

Currently, I see that only Raw HTML and Raw JS are being encoded when saved. Can you clarify which Code element you are referring to?

fredericalpers commented 1 month ago

@yeneastgate I think the Code element might have been a custom element. I can not find it anymore. You can ignore this.

yeneastgate commented 1 month ago

@fredericalpers I got it, thank you

yeneastgate commented 1 month ago

@fredericalpers I have implemented and here is video evidence:

https://github.com/user-attachments/assets/b1d4a6cd-3bb3-425f-aea1-94de182f14ea

Please check and let me know your opinion. Thanks!

fredericalpers commented 1 month ago

@yeneastgate thank you, we will review this as soon as possible :)