Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-24851

Update the Editing UI based on the server side validation

    Details

    • Epic Name:
      UI Server Validation

      Description

      Some validation can not be fully made in the browser. In this case, the UI displayed to the editor should be updated based on the validation result provided by the server side API when the creation/saving of a draft fails.

      Now that EZP-24853 is solved we can improve UI to take data added to REST response this into account and update editing form to inline show which fields does not validate.

        Issue Links

          Issues in Epic

            Activity

            Damien Pobel (Inactive) created issue -
            Damien Pobel (Inactive) made changes -
            Field Original Value New Value
            Epic Link EZP-22993 [ 41397 ]
            Damien Pobel (Inactive) made changes -
            Link This issue is blocked by EZP-24850 [ EZP-24850 ]
            Damien Pobel (Inactive) made changes -
            Status Open [ 1 ] Confirmed [ 10037 ]
            Damien Pobel (Inactive) made changes -
            Link This issue is blocked by EZP-24853 [ EZP-24853 ]
            Damien Pobel (Inactive) made changes -
            Description Some validation can not be fully made in the browser. In this case, the UI displayed to the editor should be updated based on the validation result provided by the server side API. Some validation can not be fully made in the browser. In this case, the UI displayed to the editor should be updated based on the validation result provided by the server side API when the creation/saving of a draft fails.
            André Rømcke made changes -
            Epic Link EZP-22993 [ 41397 ] EZP-24845 [ 51542 ]
            André Rømcke made changes -
            Status Confirmed [ 10037 ] Backlog [ 10000 ]
            André Rømcke made changes -
            Rank Ranked higher
            André Rømcke made changes -
            Fix Version/s Known Issues List [ 14512 ]
            André Rømcke made changes -
            Rank Ranked higher
            Hide
            Sweta Pandey added a comment -

            Issues with error message:
            1.No proper error message is displayed when user tries to upload hero image less than 620px.It shows error message as "Error occurred while publishing an article".

            2. When a user is logged in as Journalist and try to access user roles
            The error message displayed is " Failed to load the location /api/ezp/v2/content/locations/1/5 "

            3. When journalist/ editor try to delete an author, the error message displayed is :
            User does not have access to 'read' 'content' with: contentId '303'

            4.When journalist try to create/edit an author, the error message displayed is :
            An error occurred while publishing the draft.

            Expected result:
            1.When journalist try to upload hero image less than 620px, proper message that 'Upload hero image with width more than or equal to 620 px " should be displayed.
            2. When journalist try to access user role, proper error message that he is not allowed to access user role should be displayed
            3. When journalist/ editor try to delete an author, proper error message that he is not allowed to delete should be displayed.
            4. When journalist try to create author ,proper error message that he is not allowed to create/edit author should be displayed.

            User with access to admin should see proper error message.

            Show
            Sweta Pandey added a comment - Issues with error message: 1.No proper error message is displayed when user tries to upload hero image less than 620px.It shows error message as "Error occurred while publishing an article". 2. When a user is logged in as Journalist and try to access user roles The error message displayed is " Failed to load the location /api/ezp/v2/content/locations/1/5 " 3. When journalist/ editor try to delete an author, the error message displayed is : User does not have access to 'read' 'content' with: contentId '303' 4.When journalist try to create/edit an author, the error message displayed is : An error occurred while publishing the draft. Expected result: 1.When journalist try to upload hero image less than 620px, proper message that 'Upload hero image with width more than or equal to 620 px " should be displayed. 2. When journalist try to access user role, proper error message that he is not allowed to access user role should be displayed 3. When journalist/ editor try to delete an author, proper error message that he is not allowed to delete should be displayed. 4. When journalist try to create author ,proper error message that he is not allowed to create/edit author should be displayed. User with access to admin should see proper error message.
            Hide
            Damien Pobel (Inactive) added a comment -

            Sweta Pandey your comment is partly related to this issue.

            For the 1, even if it's a business rule specific to your project that's indeed the same issue (that said, at the moment, there should be a JavaScript counter part to this server side validation).

            2 is completely unrelated to this, can you open a improvement for that.

            3 is also completely unrelated to this story but I wonder how an editor that can not see a User, can then try to remove it ?

            4 same as 2, that's unrelated to this, but we can maybe improve the message, can you open the corresponding improvement request ?

            Show
            Damien Pobel (Inactive) added a comment - Sweta Pandey your comment is partly related to this issue. For the 1, even if it's a business rule specific to your project that's indeed the same issue (that said, at the moment, there should be a JavaScript counter part to this server side validation). 2 is completely unrelated to this, can you open a improvement for that. 3 is also completely unrelated to this story but I wonder how an editor that can not see a User, can then try to remove it ? 4 same as 2, that's unrelated to this, but we can maybe improve the message, can you open the corresponding improvement request ?
            Eduardo Fernandes (Inactive) made changes -
            Link This issue relates to CS-5668 [ CS-5668 ]
            Eduardo Fernandes (Inactive) made changes -
            Link This issue relates to CS-5668 [ CS-5668 ]
            André Rømcke made changes -
            Link This issue is duplicated by EZS-898 [ EZS-898 ]
            André Rømcke made changes -
            Issue Type Story [ 7 ] Improvement [ 4 ]
            André Rømcke made changes -
            Fix Version/s Customer request [ 11018 ]
            André Rømcke made changes -
            Summary Update the UI based on the server side validation Update the Editing UI based on the server side validation
            André Rømcke made changes -
            Description Some validation can not be fully made in the browser. In this case, the UI displayed to the editor should be updated based on the validation result provided by the server side API when the creation/saving of a draft fails. Some validation can not be fully made in the browser. In this case, the UI displayed to the editor should be updated based on the validation result provided by the server side API when the creation/saving of a draft fails.


            Now that EZP-24853 is solved we can improve UI to take data added to REST response this into account and update editing form to inline show which fields does not validate.
            André Rømcke made changes -
            Issue Type Improvement [ 4 ] Epic [ 6 ]
            Workflow EZ* Development Workflow [ 95960 ] EZ* EPIC Workflow2 [ 100191 ]
            Status Backlog [ 10000 ] Specification [ 10002 ]
            Epic Name UI Server Validation
            Epic Status To Do [ 10300 ]
            André Rømcke made changes -
            Epic Link EZP-24845 [ 51542 ]
            André Rømcke made changes -
            Assignee Damien Pobel [ damien.pobel@ez.no ]
            Hide
            Damien Pobel (Inactive) added a comment -

            Rough plan:

            • analyze what was done in EZP-24845 and add spec to use that in PlatformUI
            • take FieldType per FieldType
            Show
            Damien Pobel (Inactive) added a comment - Rough plan: analyze what was done in EZP-24845 and add spec to use that in PlatformUI take FieldType per FieldType
            Damien Pobel (Inactive) made changes -
            Epic Child EZP-26239 [ 55588 ]
            Damien Pobel (Inactive) made changes -
            Epic Child EZP-26240 [ 55589 ]
            Hide
            Damien Pobel (Inactive) added a comment -

            Alright, it seems like it's not too complicated if we except that the REST spec was not updated with this change. I created and added EZP-26239 to this EPIC for that. I also created EZP-26240 for the main implementation. But I'm pretty sure we'll have some special cases, we'll see after EZP-26240.

            Besides this, there's one question, according to the PR of EZP-24853, several errors can be reported by the API but the current validation system for each field edit view is able to only report one message (and UI wise it's hard to report more than that, the place is very limited for error reporting). So in case of multiple errors, is it ok to just concatenate error messages as if there was only one error ? (ping Roland Benedetti)

            Show
            Damien Pobel (Inactive) added a comment - Alright, it seems like it's not too complicated if we except that the REST spec was not updated with this change. I created and added EZP-26239 to this EPIC for that. I also created EZP-26240 for the main implementation. But I'm pretty sure we'll have some special cases, we'll see after EZP-26240 . Besides this, there's one question, according to the PR of EZP-24853 , several errors can be reported by the API but the current validation system for each field edit view is able to only report one message (and UI wise it's hard to report more than that, the place is very limited for error reporting). So in case of multiple errors, is it ok to just concatenate error messages as if there was only one error ? (ping Roland Benedetti )
            Damien Pobel (Inactive) made changes -
            Assignee Damien Pobel [ damien.pobel@ez.no ]
            Damien Pobel (Inactive) made changes -
            Status Specification [ 10002 ] Open [ 1 ]
            Damien Pobel (Inactive) made changes -
            Status Open [ 1 ] Development [ 3 ]
            Stéphane Diot made changes -
            Status Development [ 3 ] Documentation [ 10010 ]
            Stéphane Diot made changes -
            Status Documentation [ 10010 ] Documentation [ 10010 ]
            Hide
            Stéphane Diot added a comment -

            @docTeam : added a comment in EZP-26240: Update the editing UI with server side validation that should help you for the user guide.

            Show
            Stéphane Diot added a comment - @docTeam : added a comment in EZP-26240 : Update the editing UI with server side validation that should help you for the user guide.
            Dominika Kurek made changes -
            Status Documentation [ 10010 ] Closed [ 6 ]
            Resolution Fixed [ 1 ]
            Transition Time In Source Status Execution Times Last Executer Last Execution Date
            Open Open Confirmed Confirmed
            22s 1 damien.pobel@ez.no 22/Sep/15 2:56 PM
            Confirmed Confirmed Backlog Backlog
            54m 51s 1 André Rømcke 22/Sep/15 3:51 PM
            Backlog Backlog Specification Specification
            342d 7m 1 André Rømcke 29/Aug/16 3:59 PM
            Specification Specification Open Open
            2d 20h 6m 1 damien.pobel@ez.no 01/Sep/16 12:05 PM
            Open Open Development Development
            7s 1 damien.pobel@ez.no 01/Sep/16 12:05 PM
            Development Development Documentation Documentation
            40d 4h 47m 1 Stéphane Diot 11/Oct/16 4:52 PM
            Documentation Documentation Documentation Documentation
            28s 1 Stéphane Diot 11/Oct/16 4:53 PM
            Documentation Documentation Closed Closed
            5d 15h 59m 1 Dominika Kurek 17/Oct/16 8:53 AM

              People

              • Assignee:
                Unassigned
                Reporter:
                Damien Pobel (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: