• Resolved wolfgegenlicht

    (@wolfgegenlicht)


    Hey there,

    i’ve encountered a problem with the copy/paste function of wysiwyg-fields within flexible content:

    Everytime i paste a WYSIWYG-Field i get the “Invalid data” Error.

    What i paste looks for example like this:

    {"source":"acf[field_5f2a4e280b030][row-0][field_5f2a66fde964d_field_5f2a4f8ce008c]","layouts":"<div class=\"layout\" data-id=\"5f5b418ce02ae\" data-layout=\"testwysiwyg\">\n \n <input type=\"hidden\" name=\"acf[field_5f2a4e280b030][row-0][field_5f2a66fde964d_field_5f2a4f8ce008c][5f5b418ce02ae][acf_fc_layout]\" value=\"testwysiwyg\"> \n <div class=\"acf-fc-layout-handle\" title=\"Drag to reorder\" data-name=\"collapse-layout\"><span class=\"acf-fc-layout-order\">1</span> <span class=\"acfe-layout-title acf-js-tooltip\" title=\"Layout: testwysiwyg\"><span class=\"acfe-layout-title-text\"><span class=\"no-thumbnail\">testwysiwyg</span></span></span></div>\n \n <input type=\"text\" id=\"acf-field_5f2a4e280b030-row-0-field_5f2a66fde964d_field_5f2a4f8ce008c-5f5b418ce02ae-field_layout_5f5b41357f20a_title\" class=\"acfe-flexible-control-title\" name=\"acf[field_5f2a4e280b030][row-0][field_5f2a66fde964d_field_5f2a4f8ce008c][5f5b418ce02ae][field_layout_5f5b41357f20a_title]\" value=\"testwysiwyg\" placeholder=\"testwysiwyg\" data-acfe-flexible-control-title-input=\"1\"> \n <div class=\"acf-fc-layout-controls\">\n \n \n <a class=\"acf-icon small light acf-js-tooltip acfe-flexible-icon dashicons dashicons-category\" href=\"#\" title=\"Copy layout\" data-acfe-flexible-control-copy=\"testwysiwyg\"></a> \n \n <a class=\"acf-icon -plus small light acf-js-tooltip\" href=\"#\" data-name=\"add-layout\" title=\"Add layout\"></a> \n \n <a class=\"acf-icon -duplicate small light acf-js-tooltip\" href=\"#\" data-name=\"duplicate-layout\" title=\"Duplicate layout\"></a> \n \n <a class=\"acf-icon -minus small light acf-js-tooltip\" href=\"#\" data-name=\"remove-layout\" title=\"Remove layout\"></a> \n \n <a class=\"acf-icon -collapse small acf-js-tooltip\" href=\"#\" data-name=\"collapse-layout\" title=\"Click to toggle\"></a> \n \n </div>\n \n \n <div class=\"acf-fields \">\n \n <div class=\"acf-field acf-field-wysiwyg acf-field-5f5b413a7f20b\" data-name=\"test\" data-type=\"wysiwyg\" data-key=\"field_5f5b413a7f20b\">\n<div class=\"acf-label\">\n<label for=\"acf-field_5f2a4e280b030-row-0-field_5f2a66fde964d_field_5f2a4f8ce008c-5f5b418ce02ae-field_5f5b413a7f20b\">test</label></div>\n<div class=\"acf-input\">\n\t\t<div id=\"wp-acf-editor-40-wrap\" class=\"acf-editor-wrap wp-core-ui wp-editor-wrap tmce-active\" data-toolbar=\"full\">\n\t\t\t<div id=\"wp-acf-editor-40-editor-tools\" class=\"wp-editor-tools hide-if-no-js\">\n\t\t\t\t\t\t\t\t<div id=\"wp-acf-editor-40-media-buttons\" class=\"wp-media-buttons\">\n\t\t\t\t\t<button type=\"button\" class=\"button insert-media add_media\" data-editor=\"acf-editor-40\"><span class=\"wp-media-buttons-icon\"></span> Add Media</button>\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wp-editor-tabs\">\n\t\t\t\t\t\t<button id=\"acf-editor-40-tmce\" class=\"wp-switch-editor switch-tmce\" data-wp-editor-id=\"acf-editor-40\" type=\"button\">Visual</button>\n\t\t\t\t\t\t<button id=\"acf-editor-40-html\" class=\"wp-switch-editor switch-html\" data-wp-editor-id=\"acf-editor-40\" type=\"button\">Text</button>\n\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t<div id=\"wp-acf-editor-40-editor-container\" class=\"wp-editor-container\">\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<textarea id=\"acf-editor-40\" class=\"wp-editor-area\" name=\"acf[field_5f2a4e280b030][row-0][field_5f2a66fde964d_field_5f2a4f8ce008c][5f5b418ce02ae][field_5f5b413a7f20b]\" style=\"height: 300px;\" aria-hidden=\"true\">testtext</textarea>\t\t\t</div>\n\t\t<div class=\"uploader-editor\">\n\t\t<div class=\"uploader-editor-content\">\n\t\t\t<div class=\"uploader-editor-title\">Drop files to upload</div>\n\t\t</div>\n\t</div></div>\n\t\t</div>\n</div>\n \n \n </div>\n \n \n </div>"}

    is this a bug?

    Thanks for your hard work and cheers

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Thanks for the feedback! I just tested it, and you’re right, there’s something wrong with the copy/paste function & WYSIWYG fields. It is probably related to the latest WP/ACF Pro version, as it worked as expected before.

    I’m currently investigating the problem and will keep you updated here.

    Sorry for the inconvenience.

    Regards.

    Thread Starter wolfgegenlicht

    (@wolfgegenlicht)

    Thanks a lot!

    btw. you should put a donate-button on your website ??

    Cheers
    Wolf

    Any update on this? Also experiencing the same bug on a recently updated site.

    Thanks for your incredible work on this plugin!

    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello @wolfgegenlicht & @spencerlavery,

    Just a heads up, yes I found the origin of the problem. Since the latest ACF 5.9.0 update, ACF introduced its own “Duplicate” feature for Repeater Flexible Content fields.

    This new code works with the ACF Extended way to duplicate (copy/paste) layouts in flexible content, at the exception of the WYSIWYG field (which is a very special field).

    I already have a working fix on an internal build, and I plan to add it in the next update. Unfortunately I was very busy last week (it was my birthday ?? ) and haven’t got the time to finalize the patch. I’m doing my best to push it up ASAP.

    Sorry for the inconvenience.

    Regards.

    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello @wolfgegenlicht @spencerlavery,

    Just a heads up to let you know that the latest ACF Extended: 0.8.7.3 Update fix this issue. Thanks for your patience and sorry for the inconvenience.

    Have a nice day ??

    Regards.

    Hey @hwk-fr,

    Thanks for letting us know, and for sorting it so quickly! Much appreciated!

    And I hope you had an excellent birthday! Cheers! Agree about the donate button.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Copy Paste WYSIWYG’ is closed to new replies.