Plugin: do something onAdminSave, but only if folder isn't being moved

Hey everybody,

I have a tiny bit of custom admin processing for pages with a certain template. All is working fine so far, but not when the page’s folder is being renamed, because I’m checking whether a certain file exists under that route.

My problem here is that I don’t know how to say “don’t do this if folder is being moved (renamed)”. When I dump($event['object']) after a folder rename, I can find an action “move” at the end of a long list of Page details:

Page {#300 ▼
  [lots of stuff goes here]
  #debugger: null
  #forms: null
  -_original: Page {#254 ▶}
  -_action: "move"
  #media: null

But how do I check this private property? I’m sure I’m missing something simple here…

Thanks for your time!

I still do not know the answer to this, but I actually found a better solution. So far I have been doing the custom processing bit in the event onAdminSave, and now I simply moved it under onAdminAfterSave. By then the folder has already been renamed and everything just works fine. :slight_smile: