frontend_editing icon indicating copy to clipboard operation
frontend_editing copied to clipboard

Change server AJAX response

Open Messj1 opened this issue 5 years ago • 0 comments

Change the server response to something more meaningful so we can better handle ajax responses:

Yes, the error occurs if a empty string get respond. And if no lock was found no output get > produced.

action=lockedRecord returns currently on

  • lock: '{success=true, message=''}'
  • unlock: ''

better would be to use something like:

  • lock: '{"lock":true}'
  • unlock: '{"locked"=false}'
  • error: '' with HTTP 5xx on server error or 4xx on client side error like resource not found

Hint: Translation can be done on client

This should be improved later. For a fast hack i will do an fix as workaround in checkIfRecordIsLocked method. :raised_eyebrow:

Originally posted by @Messj1 in https://github.com/FriendsOfTYPO3/frontend_editing/issues/506#issuecomment-806043482

Messj1 avatar Mar 24 '21 18:03 Messj1