• Resolved brbrbr

    (@brbrbr)


    I noticed that the (local) link checker does not fix links inside the rank-math FAQ block. It updates the link in the html, but apparently not in the JSON block.

    On a test site, I tried the cloud version, and it got worse. Seems like the update does not encode the data correctly, resulting in:

    u003ca href=u0022https://example.com/in-faq-blocku0022u003eFaq Anchoru003c/au003e

    The link is the original link in the faq block not the replacement. So it does not replace in the json data neither.

    This is on wordpress 6.7.1 with only the TwentyFour theme, Rank Math, the link checker and the dasboard plugin active. all up to data.

    I did dig into the code a bit, the legacy version uses an object for wp_update_post (which is passed thru wp_slash ) and the cloud uses an array (which is not slashed).

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Nebu John – WPMU DEV Support

    (@wpmudevsupport14)

    Hi @brbrbr,

    I hope this message finds you well.

    I was unable to notice any similar issues reported at our end. Since RankMath is a premium plugin, I was unable to test the mentioned issue using a lab website at our end.

    As the website URL was not provided, I couldn’t review our logs to gather information that might help diagnose the issue further. Could you please share the website URL so we can investigate this further?

    If you’re uncomfortable sharing access credentials here publicly, you can email us at wpsupport@incsub.com using the following template.

    Subject: ATTN: WPMU DEV support – wp.org

    Please send:
    – Link to your WordPress site
    – Link back to this thread for reference (https://wordpress.org/support/topic/rank-math-issue/)
    – Any other relevant URLs/info

    To ensure we don’t miss your email, please let us know here once you’ve emailed us, and make sure you use “ATTN: WPMU DEV support – wp.org” as the email subject.

    Kind Regards,
    Nebu John

    Thread Starter brbrbr

    (@brbrbr)

    Hi,

    Thanks for your reply.

    I’m using the free version of Rank Math SEO.

    However, I think the problem affects any wp-block that has encoded HTML in the json setting.

    I saw the same issue with Yoast SEO, although the problem is less visible since Yoast stores the settings differently

    I recreated the issue on a blank WordPress site:

    https://wp.projecten.dev/sample-page/

    Thread Starter brbrbr

    (@brbrbr)

    AFTER the test above, I did change app/broken-links-actions/processors/class-main.php

    return wp_update_post(
    //quick type cast - now WP will slash the content
    (object) array(
    'ID' => $post_id,
    'post_content' => $new_content,
    )
    );

    And did a replacement on a different page. Now the content is not mutilated anymore, the link in the generated(!) HTML is updated but not in the block-settings. So I still get a message ‘Block contains unexpected or invalid content.’ in the block editor, as the stored generated HTML does not match the settings anymore.

    As the HTML is re-generated from the settings when the page is loaded on the front end, the broken link is still visible on the front end.

    So for blocks with links in generated HTML, the cloud checker can detect broken links but not fix.

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @brbrbr

    It appears to be related to how the links are encoded for Rank Math and other SEO plugin FAQ, I ran some tests with Rank Math free and was able to replicate this issue.

    I already reported this issue to our BLC team to investigate further however I’m afraid can’t give an exact ETA about when its going to be fixed.

    Kind Regards
    Amin

    Thread Starter brbrbr

    (@brbrbr)

    Not just SEO plugin FAQ’s. Any block with the tokens ‘<‘ ‘>’ ‘\”‘ or ‘&’ within the block attributes is encoded. And will cause issues if the content is not properly escaped when sent to wp_update_post.

    wp-includes/blocks.php: serialize_block_attributes

    • This reply was modified 1 year, 4 months ago by brbrbr.
    Plugin Support Laura – WPMU DEV Support

    (@wpmudev-support8)

    Hi @brbrbr ,

    I hope you’re doing well and I’m sorry to see that you’re facing this issue.

    I’ve forwarded this info as well to the BLC team so they can keep it in mind.

    Best Regards,
    Williams Valerio

    Plugin Support Saurabh – WPMU DEV Support

    (@wpmudev-support7)

    Hello @brbrbr

    Hope you’re doing well today!

    I would like to update you regards the current issue, we have it tasked as a bug and unfortunately, the fix requires updating the plugin code but we already reported it to our developers.

    We can’t give an estimated time yet for the fix but subscribing to our roadmap https://wpmudev.com/roadmap/ is a good way to be posted about upcoming versions, once they are released, it is going to be described at changelog found on https://wordpress.org/plugins/broken-link-checker/#developers

    Since the bug was acknowledged, reported and tasked to be fixed, we are marking this as resolved, but feel free to let us know if you have any additional questions.

    Kind Regards,
    Saurabh

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Rank Math Issue’ is closed to new replies.