redactor icon indicating copy to clipboard operation
redactor copied to clipboard

Fields disappearing when changing entry type in a structure

Open NicolasBarse opened this issue 3 years ago • 3 comments

Description

In a structure, when creating a new entry and selecting a different entry type, the textarea of the redactor fields are disappearing. They reappear after saving the entry and going back into it. Here is the console error:

Uncaught TypeError: Cannot read property 'menu' of undefined
    at s.constructor.updateTabs (CP.js:525)
    at s.constructor.handleWindowResize (CP.js:484)
    at s.constructor.<anonymous> (garnish.js:889)
    at o (jquery.js:10780)
    at dispatch (jquery.js:5430)
    at v.handle (jquery.js:5234)
    at Object.trigger (jquery.js:8719)
    at jquery.js:8797
    at Function.each (jquery.js:385)
    at b.fn.init.each (jquery.js:207)

Steps to reproduce

  1. Create a structure with multiple entry types.
  2. Create an entry in the structure.
  3. Switch the entry type.

Additional info

  • Craft version: Solo 3.6.13
  • PHP version: 7.2.24
  • Database driver & version: MySQL 5.7.33
  • Plugins & versions: Redactor 2.8.7

NicolasBarse avatar May 12 '21 12:05 NicolasBarse

Yes I am seeing this issue too.

Screenshot 2021-05-13 at 15 57 10 Screenshot 2021-05-13 at 15 56 13

terryupton avatar May 13 '21 15:05 terryupton

I noticed that this only happens when you have multiple tabs in the entry type. For the client's sake I put all the fields in the same tab at the moment.

NicolasBarse avatar May 13 '21 16:05 NicolasBarse

Can you still reproduce this on the latest Craft version? There's nothing that would be Redactor's fault, as the JS error just prevents other JS from executing.

andris-sevcenko avatar Jan 28 '22 10:01 andris-sevcenko