Uploaded image for project: 'Planet4'
  1. Planet4
  2. PLANET-5654

WP 5.5: WP_Block_Type_Registry::register was called incorrectly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Released
    • Icon: Should have Should have
    • 2.52.0
    • None
    • 5
    • Admin Panel
    • Sprint #151
    • titan

      Administration side of WP 5.5 throw a Notice:

      Notice:  WP_Block_Type_Registry::register was called incorrectly. Block type "core/image" is already registered
      

      This is due to our code registering the "core/image" block a second time to add a render callback. See https://github.com/greenpeace/planet4-master-theme/blob/5ed59fe8122fe23c93a8373dcff41c022de25a29/src/MasterSite.php#L1103

      Changing priority of our registration still raises the issue, provoked by the registration of core blocks by Wordpress.

       

      I've made a proposition there https://github.com/greenpeace/planet4-master-theme/compare/fix/wp55-block-callback

      We could also unregister/re-register this block, or find a different solution.

            fhernand Florent Hernandez
            fhernand Florent Hernandez
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: