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

Timeline block breaks the editing of media blocks

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Released
    • Icon: Should have Should have
    • 2.50.0
    • None
    • 1
    • Admin Panel, Block: Timeline
    • Sprint #155
    • pluto

      A Timeline block can break the editing process of other blocks, probably by a loading  Lodash in the Underscore object "_".

      The resulting error is

      Uncaught TypeError: this.activateMode is not a function
          _createModes media-views.js:2815
      

      This is a call to an underscore function _.each in a wordpress file https://github.com/WordPress/wordpress-develop/blob/f2bd8d048116e40892df4d6429dad99ede2e4c12/src/js/media/views/frame.js#L77 (that ends up compiled in wp-includes/js/media-views.js)

      _.each( this.options.mode, function( mode ) {
          this.activateMode( mode );
      }, this );
      

       

      "_" object in the console before and after inserting a Timeline block:

       

      Replicate this bug by importing the campaign attached here and trying to edit the carousel header. Clicking on it will make the block switch to an error mode "This block has encountered an error etc."

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

              Created:
              Updated:
              Resolved: