Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jesse Andrews 191 posts 716 karma points c-trib
    Aug 09, 2019 @ 01:12
    Jesse Andrews
    0

    Content Editor opened via the editorService not triggering the submit callback

    Umbraco: 8.1.1

    I'm creating a custom control that allows for infinite editor of content nodes it's linked to with the editorService. I have it mostly working, but the editor that opens doesn't display the "Save and Close" button, which is needed to trigger the callback logic. I dug into the source code a bit and determined the issue is that "page.allowInfinitePublishAndClose" is not true, so it displays the normal publish button instead. I'm not sure where that setting is controlled though. I do have culture variants enabled on the content being opened, in case that affects things, though the issue persisted when I tried turning off that option for the content type.

    For reference, I'm calling the editorService with the following data.

    editorService.contentEditor({
        id: content.udi,
        submit: function (result) {
            console.log(result);
            editorService.close();
        },
        close: function (result) {
            console.log(result);
            editorService.close();
        }
    });
    

    The close callback fires correctly, but the submit callback does not due to the reason above.

    Any ideas on what I'm missing?

Please Sign in or register to post replies

Write your reply to:

Draft