• After upgrading the plugin on our customer sites, we discovered that links went missing, and the hyperlink group block is displayed with an error in the editor.

    I see that the way the block is saved has changed between the versions, but is there no way to automatically migrate between the two?

    In the old version of the block, that we have reverted to on our sites, the links are saved like this:

    <!-- wp:tiptip/hyperlink-group-block -->
    <a class="wp-block-hyperlink-group" ><div class="wp-block-tiptip-hyperlink-group-block">

    and in the new version, like this:

    <!-- wp:tiptip/hyperlink-group-block {"url":"https://example.com"} -->
    <a class="wp-block-hyperlink-group" ><div class="wp-block-tiptip-hyperlink-group-block">

    Will I need to run a regular expression search&replace across our sites, or is there a better way to handle it?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Daniel Floeter

    (@kometschuh)

    Sorry, for that breaking change. We use the render_callback instead Javascript save() and deprecation isn’t work with that constalation.

    Please try manually “Attempt Block Recovery”.

    Thread Starter David Tolnem

    (@tolnem)

    While the block recovery removes the error message, it unfortunately makes the block not have a link anymore.

    I’ll attempt writing a regular expression to handle the migration via wp search-replace.

    Thread Starter David Tolnem

    (@tolnem)

    For anyone else who comes across this thread, here is the search and replace I ended up going with. It doesn’t work for links that have other options set, like specific colors or opening in a new tab, but that’s rare enough for us that we could handle those few cases manually.

    wp search-replace '<!-- wp:tiptip/hyperlink-group-block -->\s*?<a class="wp-block-hyperlink-group" href="([^"]*)"' '<!-- wp:tiptip/hyperlink-group-block {"url":"\1"} -->
    <a class="wp-block-hyperlink-group" href="\1"' --regex --regex-flags=m --dry-run
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Version 1.0.9 and above breaks our links’ is closed to new replies.