• Hi,
    we encountered a version incompatibility issues. Our current version is v1.0.8 and there are a lot of blocks on our sites. These blocks are saved like:

    <!-- wp:tiptip/hyperlink-group-block {"backgroundColor":"pale-cyan-blue","textColor":"theme-info-default"} -->
    <a class="wp-block-hyperlink-group"  target="_blank" rel="nofollow noopener"><div class="wp-block-tiptip-hyperlink-group-block has-theme-info-default-color has-pale-cyan-blue-background-color has-text-color has-background"></div></a>
    <!-- /wp:tiptip/hyperlink-group-block -->

    But after plugin updating to the latest version v1.17.1 I see that you have completely changed the way attributes are stored in favor of JSON.

    "<!-- wp:tiptip/hyperlink-group-block {"colorText":"#fcb900","colorBkg":"#7bdcb5","colorBkgHover":"#f78da7","url":"https://newtest.ua"} -->
    <a class=""wp-block-hyperlink-group"" href=""https://test123.ua"" rel=""nofollow"" data-event-label=""analytics""><div class=""wp-block-tiptip-hyperlink-group-block""></div></a>
    <!-- /wp:tiptip/hyperlink-group-block -->"

    At the same time, you did not take into account that customers who use this plugin and have a large number of blocks on the site after the update will be forced to make manually block recovery of each block. After that they will lose all the data on the links (attributes) that were previously stored in html of block and attributes are now stored in JSON format.
    It’s example block after block recovery, and as you can see we lost all data related to link (url, target, etc.)

    <!-- wp:tiptip/hyperlink-group-block {"backgroundColor":"pale-cyan-blue","textColor":"theme-info-default"} -->
    <a class="wp-block-hyperlink-group"><div class="wp-block-tiptip-hyperlink-group-block"></div></a>
    <!-- /wp:tiptip/hyperlink-group-block -->

    This is a huge problem, but that’s not all.
    You became use render_callback instead javascript function save(). However, in doing so, you also renamed attributes to completely different names than they were in the previous version (textColor became colorText, backgroundColor became colorBkg) and render new attributes in render_callback:

    And now, in addition to losing data on all links, we also lose the “old” data (textColor, backgroundColor) needed to style the block.

    Сould you please answer me how you suggest users of your plugins should solve these issues?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Compatibility issues. Block data is lost after the update.’ is closed to new replies.