Cant delete many row.

Cant delete many row.

LeonKLeonK Posts: 13Questions: 5Answers: 1

The address string is too long:

Failed to load resource: the  http://0.0.0.0:3000/transactions/96,97,98,99,100,101,108?action=remove&data%5B96%5D%5Bid%5D=96&data 
server responded with a status of 414 (Request-URI Too Large)

It would be great to have an option to use short url like: http://0.0.0.0:3000/transactions/96,97,98,99,100,101,108

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,573Questions: 1Answers: 10,483 Site admin
    Answer ✓

    Can you use POST rather than GET?

    Another option is to use preSubmit to remove the parameters that you don't need:

    editor.on( 'preSubmit', function ( e, d, action ) {
      if ( action === 'remove' ) {
        delete d.data;
      }
    } );
    

    should do it!

    Regards,
    Allan

  • LeonKLeonK Posts: 13Questions: 5Answers: 1

    Thank you. And how can I use POST?

  • allanallan Posts: 63,573Questions: 1Answers: 10,483 Site admin

    Editor will use POST be default. Are you specifying that the DELETE HTTP verb should be used? If so, not all server's can read data from a request body, which is why Editor submits it as query parameters.

    Allan

This discussion has been closed.