How to make 'error' display visible?

How to make 'error' display visible?

loukinglouking Posts: 259Questions: 52Answers: 0

I have successfully received fieldErrors at the browser and displayed them, but have been unable to get error to work.

When the server transmits json {data: [], error: "Unknown error occurred: invalid id detected", fieldErrors: []}, the create page just sits there without displaying the error message.

I'm not quite sure how to create this situation in a codepen, jsbin, etc.

But on review, this appears to be happening because of two settings.

Within editor.jqueryui.css, the footer is not being displayed.

div.DTE div.DTE_Footer {
    display: none;
}

And opacity: 0 within the div

<div data-dte-e="form_error" class="DTE_Form_Error" style="opacity: 0; display: block;">Unknown error occurred: invalid id detected</div>

I assume I have to set some option to see the errors, but am not sure which one. Please advise.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,522Questions: 1Answers: 10,473 Site admin

    I've not had a chance to look into this today, but will do so tomorrow.

    Allan

  • allanallan Posts: 63,522Questions: 1Answers: 10,473 Site admin
    Answer ✓

    I'm afraid this is a bug in the Editor / jQuery UI integration. Fortunately it is an easy fix. In the editor.jqueryui.js file you'll find the following in the init function:

            $(dte.dom.formError).appendTo(
                dte.__dialouge.parent().find('div.ui-dialog-buttonpane')
            );
    

    Move it into the open function immediately after .dialog( 'open' );.

    Unfortunately Editor 1.5.5 went out yesterday without this change, so it won't be in until 1.5.6.

    Regards,
    Allan

  • loukinglouking Posts: 259Questions: 52Answers: 0

    Thanks, will change. I will take this opportunity to update dataTables to 1.10.11 as well.

    Couple of packaging issues:

    I notice your packaging results for dataTables 1.10.11 include the old version of Editor 1.5.4

    Also Package results indicates jQuery-2.2.0 even though I selected jQuery-1.x

  • allanallan Posts: 63,522Questions: 1Answers: 10,473 Site admin

    Thanks for reminding me about the Editor version bump for the downloader.

    Regarding the jQuery version - I can't seem to reproduce that error. Selecting 1.12.0 does use that version for me: https://cdn.datatables.net/t/dt/jqc-1.12.0,dt-1.10.11/datatables.min.js .

    Allan

  • loukinglouking Posts: 259Questions: 52Answers: 0
    edited February 2016

    I can't seem to reproduce that error

    My selections were

    Main libraries

    • jQuery 1.x
    • jQuery UI
      • No styling library
    • DataTables

    Extensions

    • AutoFill
    • Buttons
    • HTML5 export
    • Print view
    • Editor
    • Selectize
    • Select

    Packaging options

    • Minify
    • Individual files
    • Local files

    Here are the full package results I saw on the builder page. The files which was provided were jQuery-1.2.0, though

    <link rel="stylesheet" type="text/css" href="DataTables-1.10.11/css/dataTables.jqueryui.min.css"/>
    <link rel="stylesheet" type="text/css" href="AutoFill-2.1.1/css/autoFill.jqueryui.css"/>
    <link rel="stylesheet" type="text/css" href="Buttons-1.1.2/css/buttons.jqueryui.min.css"/>
    <link rel="stylesheet" type="text/css" href="Editor-1.5.4/css/editor.jqueryui.min.css"/>
    <link rel="stylesheet" type="text/css" href="FieldType-Selectize/editor.selectize.min.css"/>
    <link rel="stylesheet" type="text/css" href="Select-1.1.2/css/select.jqueryui.min.css"/>
     
    <script type="text/javascript" src="jQuery-2.2.0/jquery-2.2.0.min.js"></script>
    <script type="text/javascript" src="DataTables-1.10.11/js/jquery.dataTables.min.js"></script>
    <script type="text/javascript" src="DataTables-1.10.11/js/dataTables.jqueryui.min.js"></script>
    <script type="text/javascript" src="AutoFill-2.1.1/js/dataTables.autoFill.min.js"></script>
    <script type="text/javascript" src="AutoFill-2.1.1/js/autoFill.jqueryui.min.js"></script>
    <script type="text/javascript" src="Buttons-1.1.2/js/dataTables.buttons.min.js"></script>
    <script type="text/javascript" src="Buttons-1.1.2/js/buttons.jqueryui.min.js"></script>
    <script type="text/javascript" src="Buttons-1.1.2/js/buttons.html5.min.js"></script>
    <script type="text/javascript" src="Editor-1.5.4/js/dataTables.editor.min.js"></script>
    <script type="text/javascript" src="Editor-1.5.4/js/editor.jqueryui.min.js"></script>
    <script type="text/javascript" src="FieldType-Selectize/editor.selectize.min.js"></script>
    <script type="text/javascript" src="Select-1.1.2/js/dataTables.select.min.js"></script>
    
  • loukinglouking Posts: 259Questions: 52Answers: 0

    I verified the change you suggested works.

    Note: should the error be in red like the fieldErrors ?

  • allanallan Posts: 63,522Questions: 1Answers: 10,473 Site admin

    Add this to your CSS if you would like it to be in red:

        div.DTE_Form_Error {
            color: #b11f1f;
        }
    
  • loukinglouking Posts: 259Questions: 52Answers: 0

    I figured I could change it myself, but thought you might want it red out of the box.

    Thanks again for all your help.

This discussion has been closed.