CMS Development

joriswvanrijn
Member

Bug report Wordpress plugin: Disabling support for full site editor has side effects

SOLVE

In update 11.0.55 (2024-04-12) of the Wordpress plugin, in registerFormBlock.tsx (line 47) a condition has been added to disable the Hubspot blocks in the full site editor. 

 

Unfortunately, this condition breaks the blocks in the previous gutenberg editor as well (see screenshot 1). Fortunately, due to the shortcode still being rendered, pages in production are not affected.

 

Screenshot 1

 

Screenshot 2024-08-26 at 12.19.45.png

0 Upvotes
1 Accepted solution
joriswvanrijn
Solution
Member

Bug report Wordpress plugin: Disabling support for full site editor has side effects

SOLVE
0 Upvotes
3 Replies 3
Lpoint2
Member

Bug report Wordpress plugin: Disabling support for full site editor has side effects

SOLVE
It appears that the condition added in registerFormBlock.tsx (line 47) in update 11.0.55 (2024-04-12) has inadvertently disabled HubSpot blocks not only in the full site editor but also in the previous Gutenberg editor. This issue likely stems from the condition not differentiating between the two editors.

Suggested Solution:

  1. Modify the Condition: Update the condition in registerFormBlock.tsx to check specifically if the full site editor is being used. You can do this by inspecting the editor context before disabling the blocks.

    Example:

    tsx
    const isFullSiteEditor = wp.data.select('core/edit-site') !== undefined;
    if (isFullSiteEditor) { // Disable HubSpot blocks only in the full site editor }
  2. Testing: Once the condition is adjusted, test the HubSpot blocks in both the full site editor and the Gutenberg editor to ensure they function correctly in both environments.

This should restore the functionality in the Gutenberg editor while keeping the intended behavior for the full site editor.

Lpoint2
Website

0 Upvotes
BarryGrennan
Guide

Bug report Wordpress plugin: Disabling support for full site editor has side effects

SOLVE

I don't think this is the best forum to report this. 

 

People here won't necessarily have anything to do with the development of that plugin.

 

You're much more likely to get the attention of the developers of that plugin on the WordPress support page for the plugin

 

https://wordpress.org/support/plugin/leadin/

 


profile2022aBarry Grennan

Freelance HubSpot CMS Developer

Website | Contact | LinkedIn

 

 

0 Upvotes
joriswvanrijn
Solution
Member

Bug report Wordpress plugin: Disabling support for full site editor has side effects

SOLVE
0 Upvotes