Extension talk:DeleteHistory

Doesn't work on 1.16
FIXED in 0.2 version

Where do we find the DeleteHistory.php file?

The special page doesn't exist :

Vous avez demandé une page spéciale qui n’existe pas.

Doesn't work on 1.16.


 * I'm having a similar problem (also 1.16). It doesn't seem to do anything; when I tell it to "simply check" and click the "Validate" button, the "Results:" box is empty. From looking at the php files, it appears that it's trying to call "php $pwd/maintenance/deleteOldRevisions.php". When I go into the "maintenance" directory and run that command manually, it complains about the LocalSettings.php file not being found.  If I copy that file into the maintenance directory, then that works, but the extension still doesn't do anything.  Does anyone know what needs to be changed (do I need to put LocalSettings.php somewhere else) to get this to work as intended? Bfunchess 17:18, 26 May 2011 (UTC)


 * You must rename the files after download
 * DeleteHistory_DeleteHistory.alias.php => DeleteHistory.alias.php
 * DeleteHistory_DeleteHistory.i18n.php => DeleteHistory.i18n.php
 * DeleteHistory_....
 * Lady Whistler 11:46, 14 June 2011 (UTC)

Link on the snapshot is broken. Unikum 06:44, 14 October 2011 (UTC)

No changes with Sysop and Administrator user
Mediawiki 1.14 : The Result section return nothing when I use the extension. Even if I use a sysop and administrator user.

Thanks for help.

Nepomuk (talk) 20:38, 25 March 2012 (UTC)


 * I have this same issue. It can optimize tables just fine, but actually deleting old revisions does not work and returns an empty result.
 * The line that should return a result is $out_logs = shell_exec(escapeshellcmd($command)); and this returns empty.
 * I have checked things and it is finding and trying to run the deleteOldRevisions.php command but nothing happens, and I have no idea why.

--Frug (talk) 21:30, 21 October 2013 (UTC)

You need to install php-cli to make it work


 * Same issue here. I have the extension installed and shows up in the Special pages, but when clicking the 'validate' it returns nothing. I checked with my host and php-cli is indeed installed (it's on a CentOS server) but not sure if the path/location of it is correct or not. If someone could let me know what needs to be where the in the file structure and/or what needs to be set up how and where to get this running it would be great. Running MediaWiki 1.20.2, PHP 5.3.28 (cgi-fcgi) Lestatdelc (talk) 19:07, 10 May 2014 (UTC)

Germany
Added in 0.6 version

For Germany language add:

to DeleteHistory.alias.php

to DeleteHistory.i18n.php

Then search in "DeleteHistory_body.php" for \"Validate\" and change it to \"Prüfen\"

Enjoy

Portuguese language
 Added in 0.8 version

For Portuguese language add:

Patch #1 DeleteHistory.i18n.php 56a57,75 > > /* *** Brazilian Portuguese *** */ > $messages['pt-br'] = array( >        'deletehistory' => 'Apagar Histórico', >         'deletehistory-desc' => "Adiciona uma página especial para apagar históricos mais antigos (revisões) de artigos", >         'what_to_do' => "Favor escolher qual ação você irá preferir", >         'check_only' => "Apenas verifica se há o que ser apagado no histórico", >         'del_hist' => "Apaga histórico", >         'del_hist_opt' => "Apaga histórico e otimiza a base de dados (demora um pouco se a base de dados for muito grande)", >     'validate' => 'Validar', >     'result' => 'Resultado', >     'db_size_old' => 'Tamanho da base de dados antes da otimização', >     'db_size_new' => 'Tamanho da base de dados depois da otimização', >     'db_space_won' => 'Tamanho da base de dados recuperado', >     'size' => 'Tamanho', >     'logs' => 'Logs', >     'opt_stat' => 'Status da otimização', > ); >

and another patch

Patch #2 DeleteHistory_body.php 74c74 < 			 --- > 			 194c194 <                        " . wfMsg('db_size_old') . " --- >                        " . wfMsg('db_space_won') . "

Bug detection
The extension say :

MediaWiki 1.20 requires at least PHP version 5.3.2, you are using PHP 4.4.9

I'm using : SetEnv REGISTER_GLOBALS 0 SetEnv ZEND_OPTIMIZER 1 SetEnv MAGIC_QUOTES 1 SetEnv PHP_VER 5_4 and Mediawiki 1.20.....

how to fix in MW 1.23 ?
I have installed V 0.8 for MW 1.23.3 but got this messages after using the DeleteHistory Special Page: Any idea to fix that? --Dg.de (talk) 09:55, 24 September 2014 (UTC)
 * Warning: escapeshellcmd has been disabled for security reasons in /www/htdocs/w00635e5/mediawiki/extensions/DeleteHistory/DeleteHistory_body.php on line 89
 * Warning: shell_exec has been disabled for security reasons in /www/htdocs/w00635e5/mediawiki/extensions/DeleteHistory/DeleteHistory_body.php on line 89

Doesn't work on 1.27.0
Hello all.

I have updated my wiki to fresh 1.27.0 and the extension doesn't work! The message appears when I click to DeleteHistory at Special Page:

Fatal error: Call to undefined function wfMsg in /var/www/admin/www/wikijournal.ru/extensions/DeleteHistory/DeleteHistory_body.php on line 64

Any ideas how to fix it?

JLTRY 17:30, 03 August 2016 (UTC)

You can replace wfMsg with wfMessage

You can also replace with

Still doesn't work
I tried to do so, but there are some other errors

For me the same and I also replace wfMsg with wfMessage as stated below with the example for 1.28, but it's giving me: [error] [7b57fb732798d949efd36bda] /tst/index.php/Special:DeleteHistory ErrorException from line 204 of /path_to/mediawiki/tst/extensions/added/DeleteHistory/DeleteHistory_body.php: PHP Notice: Undefined variable: out_opt

Talk_Pages MediaWiki 1.27.1
The extension doesn't detect the history of the Talk/Discussion pages. Could it be fixed?

MediaWiki 1.27.1 and DeleteHistory .08
Hi,

I use
 * MediaWiki 1.27.1
 * PHP 5.6.18
 * MySql 5.7.11
 * Icu 56.1
 * Extension:DeleteHistory .08
 * Langage : Français

It's a new wiki site.

I've installed Extension:DeleteHistory and i have this error Http://www.developpez.net/forums/attachments/p221768d1475500516/php/scripts/wiki/mediawiki-deletehistory/739634capture.jpg

I've changed

$dbw =& wfGetDB( DB_MASTER ); with $dbw = wfGetDB( DB_MASTER );

When I go on Pages_Spéciales and select DeleteHystory and "test" or "Suppression de l'historique", i have an error and this message :

Error : Missing one or more required components of PHP. You are missing a required extension to PHP that MediaWiki needs. Please Install :
 * mbstring

This wiki is local but I want to host it on Free.fr. What should I do to use this extension with my setup?

Merci par avance ... 8)

Something like a patch for MediaWiki 1.28.0
I have modified code of the extension, according to this manual: Help with replacing deprecated wfMsg* functions. Also I have added some code which allows the extension to be used with wiki family.

I'm not programmer and also I don't know PHP, so these changes could be done in more professional way, but at this state DeleteHistory extension works for me.

Modified file is : ";

// Get size after $db_size_new = get_db_size; }

// Fix display pre problem if ((isset($_POST['choice'])) and ($_POST['choice'] != "")) {           $wgOut->addHTML(" "); $wgOut->addWikiText('=' . wfMessage('result') . '=');

// Show DB size if ask to optimize if ($show_db_size == 1) {               function kb_or_mb($db_size_old,$db_size_new) {                   $spacewon=($db_size_old - $db_size_new); if ($spacewon < 1) {                       $spacewon = ($spacewon * 1024). " KB"; }                   else {                       $spacewon = $spacewon. " MB"; }                   return $spacewon; }               // Show result $wgOut->addHTML("

");           }

if ($out_opt) {               $wgOut->addWikiText('=' . wfMessage('opt_stat') . '='); $wgOut->addHTML($out_opt . ' '); }           if ($out_logs) {               if ($_POST['choice'] == "2") {                   $wgOut->addWikiText('=' . wfMessage('logs') . '='); }               $wgOut->addHTML(" ".$out_logs." "); }       }        return true; } }

Not work in MediaWiki v1.28.0
I wanted to try the extension, but it does not work.

I tried the patch made by Spas.Z.Spasov

Now it works, but it can not delete the single edit. But this is not what I was looking for.

Not work in MediaWiki v1.28.0 with the patch
I can not see the history, since the form, the validation of the choice of the form does not show anything.

The extension displays the selection form, but no response after the form is validated.

I look for that : If you don't see anything new, it's because you don't have the admin privileges.

My mediawiki user is an administrator, I gave him the rights.

How i can have the admin privileges ? ( Note that I use a shared server, not a dedicated server or VPS. )

The follow-up of my research in French : https://www.visionduweb.eu/wiki/index.php?title=Gerer_et_installer_des_extensions_avec_MediaWiki#DeleteHistory

Не работает в 1.28.1
(в том числе с патчем )

No solution for shared hosting
Still no solution for shared hosting, with php 7.0

1.28.2 1.29
Hello dear friends. DeleteHistory unfortunately does not work in 1.28.2 and 1.29. Please request the developer to repair the extension so that it works. Extension is very necessary and useful. Thank you.

Need
+1

+1

+1