I will try to describe what I tested and what worked or not:
With the code above in my site/config/config.php.
If I wrote it correctly, it should create a test-*.txt file in the content folder depending on actions from the panel.
My Process:
when I create a new page in the panel, test-create.txt is writing: OK
when I update content of a hidden page in the panel, test-update.txt is writing: OK
when I update content of a visible page in the panel, test-sort.txt is writing, but not test-update.txt: Not OK, should not be just panel.page.update (or panel.page.update + panel.page.sort if you change content and position)?
when I sort a page in the panel, test-sort.txt is write: OK
and I don’t know what «panel.page.move» could mean from the panel, so I not able to test it.
Thank you for taking time to read my ugly english.
This triggers when you rename the page slug with the panel option “Change URL”.
Yes, you are right. On updating, when the page is invisible, panel.page.update is triggered, when the page is visible, panel.page.sort is triggered instead of panel.page.update.
Piggybacking on this, there also seems to be an issue with the ‘panel.file.upload’ and ‘panel.file.update’ hooks. When panel.file.update is set, panel.file.upload doesn’t get triggered.
In one plugin, for panel.file.upload, we would grab some data from an uploaded CSV/JSON, update the page, and delete the file. In another plugin, the panel.file.update hook would rename an updated file under certain circumstances. This caused the upload hook to not work. We tried bringing the update hook into the same file, and putting it both before and after the upload hook, and the upload hook only worked when the update hook was removed entirely.
Are the multiple hooks on files not intended to work sequentially like we’re trying to do? Or is there a cache somewhere that should be getting reset between those hooks getting triggered?