pedroborges / kirby-autogit

⬢ Saves every change made via Kirby Panel to a Git repository
149 stars 23 forks source link

other panel.page.update #13

Closed puckey closed 7 years ago

puckey commented 7 years ago

I also have a few of my own hooks that change page content on 'panel.page.update':

kirby()->hook('panel.page.update', function($page) {
  if ($page->intendedTemplate() === 'channel') {
    $page->update(array(
      'history' => '',
      'functioning' => 'true'
    ));
  }
});

But it seems that these changes are not being committed by Auto Git.

Any ideas what to do about this? Is it a case of hook order perhaps? (not sure how to define this, though)

puckey commented 7 years ago

I resolved this by renaming the file containing my hooks to 'aa-hooks.php', which probably causes it to be executed before autogit. It would be good if there was another way though..