You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The match_block() function is not correctly identifying HTML blocks based on their innerHTML content when using the 'with_innerhtml' parameter. This issue specifically affects core/html blocks containing connatix-related content.
Expected behavior:
match_block() should return true for the core/html block containing the connatix div.
Actual behavior:
match_block() returns false, failing to identify the block.
Possible causes:
The Block_InnerHTML validator may not be correctly parsing or comparing the innerHTML content.
The 'with_innerhtml' parameter might not be properly integrated with the core/html block type in the match_block() function.
Steps To Reproduce
Create a WordPress post with a core/html block containing the following content:
Use the following pattern to match the block:
['name' => 'core/html', 'with_innerhtml' => 'connatix-']
Call match_block() with this pattern on the post content
Additional Information
WordPress version: 6.3
match_block plugin version: 3.1
A manual check using strpos() on the innerHTML successfully identifies the block, suggesting the issue is specific to the match_block() function or its underlying Block_InnerHTML validator.
Suggested investigation:
Review the implementation of the Block_InnerHTML validator.
Check if there are any filters or actions modifying the block content before it reaches match_block().
Test with different variations of innerHTML content to identify any patterns in the matching failure.
This bug significantly impacts the ability to accurately detect and handle specific types of content blocks, particularly those related to advertising or third-party content integration in this case.
The text was updated successfully, but these errors were encountered:
It's an empty div <div id="connatix-outstream-video></div> I moved away from using match block in this context, so it's not a time sensitive thing but seemed like the plugin wasn't correctly matching innerhtml in testing.
Might be interacting with some other code in a weird way. I've already moved on to keep on deadline, so feel free to close this if you think it's not a legit bug.
Thanks. I'm still not able to replicate it, but I don't want to say that it's not a legit bug yet. I think this can stay open in case you or someone else has a similar experience later. If you have any old branches or commits from the project that I could take a look at, feel free to send me those in Slack as well.
Description of the bug
The match_block() function is not correctly identifying HTML blocks based on their innerHTML content when using the 'with_innerhtml' parameter. This issue specifically affects core/html blocks containing connatix-related content.
Expected behavior:
match_block() should return true for the core/html block containing the connatix div.
Actual behavior:
match_block() returns false, failing to identify the block.
Possible causes:
Steps To Reproduce
['name' => 'core/html', 'with_innerhtml' => 'connatix-']
Additional Information
Suggested investigation:
This bug significantly impacts the ability to accurately detect and handle specific types of content blocks, particularly those related to advertising or third-party content integration in this case.
The text was updated successfully, but these errors were encountered: