Adjust article content without modifying page_touched

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Adjust article content without modifying page_touched

Zach H.
So we are currently using the MediaWiki software to run a Knowledge base
system and have a policy that says we will review ALL articles that have not
been touched in 365 days to ensure they are still relevant. Coming up with
the SQL code to find these was very easy, one feature I was asked
to implement was 'is it possible to add a "outdated" tag to a article' so I
added the {{outdated}} tag to the wiki, now the hard part is, how do
I programmatically update the most current revision without adjusting the
page_touched date? is it even possible? I know I can do this via SQL but
that is VERY kludgy and I can see all sorts of issues this could cause so I
wanted to ask the pro's.

Thanks for any assistance in advance.
Zach H.
_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Adjust article content without modifying page_touched

Brion Vibber
On Thu, Oct 20, 2011 at 3:36 PM, Zach H. <[hidden email]> wrote:

> So we are currently using the MediaWiki software to run a Knowledge base
> system and have a policy that says we will review ALL articles that have
> not
> been touched in 365 days to ensure they are still relevant. Coming up with
> the SQL code to find these was very easy, one feature I was asked
> to implement was 'is it possible to add a "outdated" tag to a article' so I
> added the {{outdated}} tag to the wiki, now the hard part is, how do
> I programmatically update the most current revision without adjusting the
> page_touched date? is it even possible? I know I can do this via SQL but
> that is VERY kludgy and I can see all sorts of issues this could cause so I
> wanted to ask the pro's.
>

Well, that would kinda defeat the purpose of page_touched, which is to
provide a cache invalidation timestamp when something that would change the
rendering of the page changes, such as content, creation or deletion of
linked pages & images, etc.

Note that page_touched can be updated for many reasons other than the page
being edited; all the things above and more, including someone running
?action=purge on the page.

page_touched is not a suitable proxy for something like "has not been edited
since time X".


If what you want is to show a special header on the page when viewing it and
it hasn't been edited in X days, then you probably want something like this:

* hook into one of the various output-related methods to add things to
output before the top of the page
* calculate age-since-editing against the current version's rev_timestamp
(not page_touched!)
* output or don't output something, based on that


If you really want to edit the pages to add a template to them, then you
should probably follow the sensible logic that this counts as an edit --
that gets the page out of your hair until the next time you look for
unedited pages? And you'd want to make sure you don't add it over and over
again, etc.

-- brion
_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Adjust article content without modifying page_touched

Zach H.
I have no desire to have a header, this is more for reporting purposes as
one might understand that having old data in a knowledge base article could
be bad :) but i do see the logic, i will adjust my SQL to only review the
current version's rev_timestamp. I also follow your logic on having the bot
edit the page and place the template on it {{outdate}} but my only fear is
it will make and follow up reporting indicate that the page has been edited
within the given 365 day time frame. I will have to present this to the team
and see if this is an acceptable compromise.

Thanks for all the input Brion you have been very helpful and also thanks
for being a MediaWiki super hero!

Zach H.

On Thu, Oct 20, 2011 at 6:20 PM, Brion Vibber <[hidden email]> wrote:

> On Thu, Oct 20, 2011 at 3:36 PM, Zach H. <[hidden email]> wrote:
>
> > So we are currently using the MediaWiki software to run a Knowledge base
> > system and have a policy that says we will review ALL articles that have
> > not
> > been touched in 365 days to ensure they are still relevant. Coming up
> with
> > the SQL code to find these was very easy, one feature I was asked
> > to implement was 'is it possible to add a "outdated" tag to a article' so
> I
> > added the {{outdated}} tag to the wiki, now the hard part is, how do
> > I programmatically update the most current revision without adjusting the
> > page_touched date? is it even possible? I know I can do this via SQL but
> > that is VERY kludgy and I can see all sorts of issues this could cause so
> I
> > wanted to ask the pro's.
> >
>
> Well, that would kinda defeat the purpose of page_touched, which is to
> provide a cache invalidation timestamp when something that would change the
> rendering of the page changes, such as content, creation or deletion of
> linked pages & images, etc.
>
> Note that page_touched can be updated for many reasons other than the page
> being edited; all the things above and more, including someone running
> ?action=purge on the page.
>
> page_touched is not a suitable proxy for something like "has not been
> edited
> since time X".
>
>
> If what you want is to show a special header on the page when viewing it
> and
> it hasn't been edited in X days, then you probably want something like
> this:
>
> * hook into one of the various output-related methods to add things to
> output before the top of the page
> * calculate age-since-editing against the current version's rev_timestamp
> (not page_touched!)
> * output or don't output something, based on that
>
>
> If you really want to edit the pages to add a template to them, then you
> should probably follow the sensible logic that this counts as an edit --
> that gets the page out of your hair until the next time you look for
> unedited pages? And you'd want to make sure you don't add it over and over
> again, etc.
>
> -- brion
> _______________________________________________
> MediaWiki-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Adjust article content without modifying page_touched

nakohdo
Reply | Threaded
Open this post in threaded view
|

Re: Adjust article content without modifying page_touched

John Du Hart
In reply to this post by Zach H.
Is there a reason why using the API isn't possible?

On Oct 20, 2011 6:37 PM, "Zach H." <[hidden email]> wrote:

> So we are currently using the MediaWiki software to run a Knowledge base
> system and have a policy that says we will review ALL articles that have
> not
> been touched in 365 days to ensure they are still relevant. Coming up with
> the SQL code to find these was very easy, one feature I was asked
> to implement was 'is it possible to add a "outdated" tag to a article' so I
> added the {{outdated}} tag to the wiki, now the hard part is, how do
> I programmatically update the most current revision without adjusting the
> page_touched date? is it even possible? I know I can do this via SQL but
> that is VERY kludgy and I can see all sorts of issues this could cause so I
> wanted to ask the pro's.
>
> Thanks for any assistance in advance.
> Zach H.
> _______________________________________________
> MediaWiki-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Adjust article content without modifying page_touched

Platonides
In reply to this post by Zach H.
Zach H. wrote:

> I have no desire to have a header, this is more for reporting purposes as
> one might understand that having old data in a knowledge base article could
> be bad :) but i do see the logic, i will adjust my SQL to only review the
> current version's rev_timestamp. I also follow your logic on having the bot
> edit the page and place the template on it {{outdate}} but my only fear is
> it will make and follow up reporting indicate that the page has been edited
> within the given 365 day time frame. I will have to present this to the team
> and see if this is an acceptable compromise.
>
> Thanks for all the input Brion you have been very helpful and also thanks
> for being a MediaWiki super hero!
>
> Zach H.

Well, you would consider that a page is (potentially) outdated if it
hasn't been edited in 365 days OR it has the outdated template.


_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l