2 Replies Latest reply on Aug 7, 2012 11:35 PM by Sorin87bv

    POST.jsp error deleting the component CQ 5.4

    Sorin87bv

      Hi,

       

      I am trying to send data from a component back to it for validation and changes to the some nodes data. I have created two files:

       

      - GET.JSP and

      - POST.jsp

       

      The form on GET.jsp sends data to currentNode.getPath(); using a POST, which triggers POST.jsp, where the rest of the logic is implemented. Everything seems to be working fine, but my issue is that if a user tries to delete the component from the page he gets a "Unspecified error" message. If I remove the POST.jsp page, I am able to remove the component. Any ideas why is this happening or what how should I approach this without POST.jsp?

        • 1. Re: POST.jsp error deleting the component CQ 5.4
          Sorin87bv Level 1

          Just as an update, if I create a POST.jsp file to any component I have the same issue (this might be neccessary when you want to overwrite the Sling default behahiour on POST). Steps to reproduce the issue:

           

          - Add a POST.jsp file to a component that you have created;

          - Drag the component from the sidekick to the a page;

          - Try to delete the newly added component -> it will result in a "Unspecified error" message from the top right corner of the page.

           

          Is there a way that I can avoid this to happen?

          • 2. Re: POST.jsp error deleting the component CQ 5.4
            Sorin87bv Level 1

            Just in case someone else encounters this issue, it seems to be caused by the fact that the default Sling servlet is not invoked (as you overwrite it). You'll need to verify if the POST request parameters are those specific to a system request ( I checked for the existence of a parameter called ":status") and in case you find it, include the below:

             

            <sling:include resourceType="/sling/servlet/default" >