Jump to content

Does Processwire have a Page tracking capability natively?


cosmicsafari
 Share

Recommended Posts

Hi all,

For some context, I have some pages which get updated using the PW API at regular intervals via some scheduled tasks.

I recently installed the Activity Monitor module which worked great for manual updates to those pages, however it would never track changes made via the API.

Anyway because of this I started looking around for something that would track API changes, but thus far haven't came across anything.

However I did notice this page: https://processwire.com/api/ref/page/track-changes/

Apologies if this is a daft question, but the content on that page makes it seem like tracking changes is already native to PW and just needs enabled?

Is this correct? As in could I update my scripts that use the API to enable the changes to be tracked at the point of page saving?

Also if anyone does know of any modules that would track API changes to save me having to code my own solution could you please throw them my way as it would be much appreciated.

Link to comment
Share on other sites

3 hours ago, cosmicsafari said:

However I did notice this page: https://processwire.com/api/ref/page/track-changes/

Apologies if this is a daft question, but the content on that page makes it seem like tracking changes is already native to PW and just needs enabled?

Is this correct? As in could I update my scripts that use the API to enable the changes to be tracked at the point of page saving?

This API ref page is pretty low level — so yes, the core does (by default and automatically) track changes made to pages, but it's mainly for checking if a specific Page object was changed during this particular request. The core itself doesn't maintain a log of changed pages, that's usually where modules step in.

3 hours ago, cosmicsafari said:

I recently installed the Activity Monitor module which worked great for manual updates to those pages, however it would never track changes made via the API.

I'm not entirely sure what this module is; you're not referring to Activity Log, are you?

Anyway, a module that tracks changes should be able to keep track of changes made via API as well, with just one exception: if the API request is made with the noHooks option enabled, no module will be able to track that. In other words API requests alone are nothing special, so they should be tracked normally, unless the one triggering said API request is specifically preventing any hooks from running, in which case there's no (clean) way to intercept or track it ?

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...