New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete checkbox does not change deletedby/deletedon #14349

Open
Jako opened this Issue Feb 8, 2019 · 3 comments

Comments

Projects
None yet
4 participants
@Jako
Copy link
Collaborator

Jako commented Feb 8, 2019

Bug report

Summary

Delete checkbox does not change deletedby/deletedon.

Step to reproduce/Observed behavior

Delete a resource with the deleted checkbox in the resource. The column deletedby and deletedon in the trash manager do not change. The opposite could only seen directly in the database. Deleting a resource with the context menu changes both fields.

Expected behavior

The column deletedby and deletedon should change.

Environment

MODX 2.7

@Ruslan-Aleev

This comment has been minimized.

Copy link
Contributor

Ruslan-Aleev commented Feb 9, 2019

Yes, I can reproduce the bug.

@tolanych

This comment has been minimized.

Copy link
Contributor

tolanych commented Feb 9, 2019

I'm looking at the present implementation. I have got options.

  1. Should just update fields deletedby/deletedon...
  2. Should duplicate all delete logic in update processor...
  3. or just call delete/undelete resource processor inside method update processor? (possibly trouble with addLock, but can run delete processor in cleanup method after removeLock())
@Jako

This comment has been minimized.

Copy link
Collaborator Author

Jako commented Feb 12, 2019

I would run run the processor to delete the childs too, but make sure to handle $modx->error right. That part is a bit annoying when running a processor without using $this->success/$this->failure (or wherever the reset of $modx->error happens).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment