Support » Plugin: Caxton - Create Pro page layouts in Gutenberg » Single Column Section “Encounters Error”

  • Resolved John Antonacci

    (@johnnya23)


    The full width section shows “encounterd an error – can’t be previewed”
    Chrome Console (on the edit screen) shows:
    TypeError: Cannot read property ‘length’ of undefined
    at Object.responsiveLayoutPicker [as render] (blocks.js:formatted:2304)
    at t.value (caxton.js:2)
    at t.value (caxton.js:2)
    at t.value (caxton.js:2)
    at t.value (caxton.js:2)
    at t.value (caxton.js:2)
    at p (caxton.js:2)
    at Ed (react-dom.min.js:86)
    at ph (react-dom.min.js:98)
    at eg (react-dom.min.js:125)

    this line of code is highlighted in console > sources (caxton/assets/block.js line 2340):
    for (var r = [], l = _altLayouts.default[JSON.parse(e.attrs.tpl).length + “-sections”], n = 0; n < l.length; n++)

    thx,
    john

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thanks for the report John,

    We’ll get fixed up asap 🙂

    jamie

    replaced:
    for (var r = [], l = _altLayouts.default[JSON.parse(e.attrs.tpl).length + “-sections”], n = 0; n < l.length; n++)

    with:

    var l = 1;
                if (typeof _altLayouts.default[JSON.parse(e.attrs.tpl).length + "-sections"] !== 'undefined')
                    l = _altLayouts.default[JSON.parse(e.attrs.tpl).length + "-sections"];
                for (var r = [], n = 0; n < l.length; n++) r.push(responsiveLayoutElement(l[n], n, t));

    seems to be working, but not sure if there are unintended consequences?

    Hi John,

    We fixed today – in latest master here https://github.com/pootlepress/caxton

    Will be testing tomorrow and pushing out an update Monday all being well,

    jamie

    perfect, thanks!

    Actually it looks like we got a problem with the latest master – we’ll fix up 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.