Announcement

  •  » Extensions
  •  » [Prune History] Official topic

#1 2012-05-08 16:52:20

Eric
Former Piwigo Team
VALENCE (FR)
2005-03-25
1768

[Prune History] Official topic

Hello to everyone,

Here is a new extension, [extension by Eric] Prune History, for pruning the visit history of our favorite gallery. I left the following observation:
* The history table can take large proportions and it is not always very well supported by some hosts
* Keep old historical data does not necessarily interest
* But it may be interesting to keep them outside the gallery

There is already an "old" extension - [extension by VDigital] History cleanup - but no longer maintained since version Piwigo 2.2.0. I am inspired by it to propose a system of manual and automatic pruning for historical data.

Prune History allows:
- To prune manually history table according a date range
- To save the table before a purge and restore it if you made ​​a mistake
- To download the saved table as a SQL file
- To automatically purge the table according to a criterion of data retention

Automatic purging fires whenever a connection to the gallery (registered user, webmaster or admins) to keep only the data under criterion (x days or x months or x years) configured.

The pruning (automatic and manual) do not impact the summary table of the history - #_history_summary) to maintain an overview of the visits. In addition, the #_history_summary table presents only very limited space on the database.

Even if I set up a backup, those who pay close attention to visit history data will use sparingly this plugin and with full knowledge of the consequences ;-)

Last edited by Eric (2012-05-08 16:59:06)

Offline

 

#2 2013-01-18 19:16:49

Ralf
Member
Dorsten-Lembeck
2012-05-08
230

Re: [Prune History] Official topic

Hi,

I have the following problem:

The automatic pruning mechanism does not work.
I have tried it with different values like 1, 2 or 3 days - but nothing happens.

Does the pruning mechanism require a user (not a admin) login to work ?

Cheers
Ralf


There are only two kinds of music:
Rock and Roll

https://www.ralf-kerkhoff.de

Offline

 

#3 2013-01-18 21:28:20

Eric
Former Piwigo Team
VALENCE (FR)
2005-03-25
1768

Re: [Prune History] Official topic

Hi Ralf,

Automatic pruning is triggered by any login action (admins and basic users). Where are you looking to view if history entries are pruned or not ?

On the main history statitics page, nothing will appears because the plugin does not prune these main counts. But if you go on the "search" tab and make a request over the last week, you'll see the history details have been pruned by the plugin according your settings.

If not, there could be someting wrong but I can't reproduce on my side.

Offline

 

#4 2013-01-19 08:10:34

Ralf
Member
Dorsten-Lembeck
2012-05-08
230

Re: [Prune History] Official topic

Hi,

I look indeed under:
statistics->search and there I will see entries over the last week although I have set automatic pruning to 1 day.

What I have found out, is that when I do a manual pruning I have to hit the button 'today' from the end date section.
Selecting the actual date from the drop down box will not do a pruning.

Is there a specific date format required for the pruning to work ?

All other functions in Piwigo where a date is required (calendar in the frontend, search statistic in the backend) are working as expected.
So I do not have a idea what the problem is.

Would be great if you can give me a clue.

Cheers
Ralf


There are only two kinds of music:
Rock and Roll

https://www.ralf-kerkhoff.de

Offline

 

#5 2013-01-19 12:31:02

Eric
Former Piwigo Team
VALENCE (FR)
2005-03-25
1768

Re: [Prune History] Official topic

Hi,

I have to see the problem by my own. If you are ok, you can send me in private mail the URL of your gallery and an admin account. I'll login and try to see what's wrong as soon as possible. Maybe not today 'cause I'm a bit busy ;-)

Offline

 

#6 2013-01-22 19:06:15

Ralf
Member
Dorsten-Lembeck
2012-05-08
230

Re: [Prune History] Official topic

Hi Eric,

the problem was the value I put in the "keep history for xx days".
With a value of 1 no pruning happened - a value of 01 works fine.

Thanks for this plugin - it is a real time saver in maintaining the gallery.

Could you please be so kind and tell me what a value of 00 (zero days) will do - i do not really need a search history.
A history of number of visitors is all I need - but in the admin area there is no option to disable only the search history.

Cheers
Ralf


There are only two kinds of music:
Rock and Roll

https://www.ralf-kerkhoff.de

Offline

 

#7 2013-01-22 23:30:39

Eric
Former Piwigo Team
VALENCE (FR)
2005-03-25
1768

Re: [Prune History] Official topic

Ralf wrote:

the problem was the value I put in the "keep history for xx days".
With a value of 1 no pruning happened - a value of 01 works fine.

That's very strange because I'm using this plugin to prune automatically over 3 months. With "3" on one digit and it works. I've to test the specific case with "1".

Ralf wrote:

Could you please be so kind and tell me what a value of 00 (zero days) will do - i do not really need a search history.

That's a good question... I'll do some tests as soon as possible. I think using "00" will do nothing because the Sql request can't handle this value : Search and delete all history entries older than 0 days?

Interresting! ;-)

Offline

 

#8 2013-01-23 18:53:00

Eric
Former Piwigo Team
VALENCE (FR)
2005-03-25
1768

Re: [Prune History] Official topic

Eric wrote:

Ralf wrote:

the problem was the value I put in the "keep history for xx days".
With a value of 1 no pruning happened - a value of 01 works fine.

That's very strange because I'm using this plugin to prune automatically over 3 months. With "3" on one digit and it works. I've to test the specific case with "1".

I can't reproduce your issue. I've used "keep history for 1 days" and "keep history for 01 days" and both work fine. Same result with months or years.

To improve my tests, I logged the variable generated after the choice of values : We are on 23th of January, 2013.
- If I select to keep 1 day history, the regular date generated and used in Sql request is "2013-01-22". That's OK.
- If I select to keep 01 day history, the regular date generated and used in Sql request is ever "2013-01-22"
- If I select to keep 1 month history, the regular date generated and used in Sql request is "2012-12-23". That's OK too.
- If I select to keep 01 month history, the regular date generated and used in Sql request is ever "2012-12-23".

Finally, I checked the Sql requests results (in case of a MySql failure) and all works fine with the above date values. Really, I don't know why you have to use "01" instead of "1" value... :-/

Something related with the php version used on your host ? My test engine uses php 5.3.13. What's yours ?

Ralf wrote:

Could you please be so kind and tell me what a value of 00 (zero days) will do - i do not really need a search history.

The "0" value is excluded from auto-prune function. If you choose it, nothing will be done.

Offline

 

#9 2013-01-23 19:00:28

Ralf
Member
Dorsten-Lembeck
2012-05-08
230

Re: [Prune History] Official topic

Hi,

here are my server settings:
PHP: 5.3.19-1~dotdeb.0 (Info anzeigen) [2013-01-23 18:58:08]
mysql: 5.5.28-1~dotdeb.0 [2013-01-23 18:58:08]

To make sure that it is really the value 01 which works on my server I have set the the value back to 1.
I will keep you updated if 1 works now with my system.

Cheers
Ralf


There are only two kinds of music:
Rock and Roll

https://www.ralf-kerkhoff.de

Offline

 

#10 2013-01-23 19:01:10

Eric
Former Piwigo Team
VALENCE (FR)
2005-03-25
1768

Re: [Prune History] Official topic

Eric wrote:

Ralf wrote:

Could you please be so kind and tell me what a value of 00 (zero days) will do - i do not really need a search history.

The "0" value is excluded from auto-prune function. If you choose it, nothing will be done.

On this way, using "0" value could generate a MySql error. This bug will be fix in next plugin version ;-)

Offline

 

#11 2013-01-23 19:04:39

Eric
Former Piwigo Team
VALENCE (FR)
2005-03-25
1768

Re: [Prune History] Official topic

Ralf wrote:

here are my server settings:
PHP: 5.3.19-1~dotdeb.0 (Info anzeigen) [2013-01-23 18:58:08]
mysql: 5.5.28-1~dotdeb.0 [2013-01-23 18:58:08]

Quit similar as mine...

Ralf wrote:

To make sure that it is really the value 01 which works on my server I have set the the value back to 1.
I will keep you updated if 1 works now with my system.

Thx for your feedback, Ralf! :-)

Offline

 

#12 2013-01-24 18:55:39

Ralf
Member
Dorsten-Lembeck
2012-05-08
230

Re: [Prune History] Official topic

Hi Eric,

I guess some of the plugins I have tested are not 100% compatible.
At the moment I have no idea which one...

The value of 1 works find now.

Cheers
Ralf


There are only two kinds of music:
Rock and Roll

https://www.ralf-kerkhoff.de

Offline

 

#13 2013-01-24 21:05:07

Eric
Former Piwigo Team
VALENCE (FR)
2005-03-25
1768

Re: [Prune History] Official topic

Hi Ralf,

Glad to see Prune History works fine for you now. :-)

I'll publish a corrective version about the use of "0" value as soon as possible.

Offline

 

#14 2015-09-30 18:25:14

ranmajen
Member
2010-10-26
20

Re: [Prune History] Official topic

Not working anymore to piwigo 2.7.4

Offline

 

#15 2015-10-02 18:02:29

Eric
Former Piwigo Team
VALENCE (FR)
2005-03-25
1768

Re: [Prune History] Official topic

Hi ranmajen,

You're right : There is a bug with JQuery function Datepicker that causes a plugin malfunction. It's solved in version 2.7.2 of Prune History.

Thanks for your submission.

Offline

 
  •  » Extensions
  •  » [Prune History] Official topic

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact