How can one permanently remove parts of history edits on MediaWiki? - mediawiki

I got a file uploaded to the wiki that is usually edited by a certain team. As an IT support person I got in to try a few things out with the file, when the team had trouble. As result, I have made an edit, and the team later rolled the edit back.
Problem: on File:filename.pdf under File History it now says things like
current [date] [size] [team] reverted
revert [date] [size] [me] test edit
revert [date] [size] [team] comment
Question
The team wants to erase my edit and their revert from history altogether as if it had never happened.
How can I do that?
I have access to raw database if needed, but hoping there is a simple way.

If you can live with erasing the whole revision history of the page, you can use the maintenance script DeleteOldRevisions.php:
php maintenance/deleteOldRevisions.php --delete PAGEID
Another option is to enable the RevisionDelete function. This will enable you, as a sysop, to hide specific (non-current) revisions from ordinary users:
Edit: Tgr points out below that it is still possible to see that revisions hidden this way has been hidden.

There should be a delete link next to the old versions of the image in the history section of the file page (if you are logged in as an administrator), just use that.

Related

Zabbix - track config files

I would like to track changes to one config file. The reason for this is that multiple users access it to solve different issues, but every now and then those fixes break something else. diff function in Zabbix shows that a file was changed, but I would like Zabbix to also track what changed. Is there a combination of triggers that would let me do that? Any help is greatly appreciated.
Do you store file checksum or contents in the item? In any case, there is no built-in way to do that, but you can implement it with a script.
If checksum, you will need a way to store the previous version, new version and run the diff command. The easiest would be a userparameter that would do a diff between a temporary copy of the file and the current copy, then copy the current file over the temporary copy. In this case, you would store diff results directly in an item and your trigger would check that the last value is not an empty string. See https://www.zabbix.com/documentation/3.0/manual/config/items/userparameters for more information on userparameters.
If you are storing file contents already, presumably you want to reuse them. This would be a bit more complicated, as you would have to kick off the script whenever a new value arrives - maybe a special trigger could kick off an action that would compare the last two values (probably using the API), then push the result in another item that has another trigger. Unless you have a good reason to do it this way, I'd opt for the first approach.
Make a copy off your file
file.txt.copy or something like that. Make this file only writable by zabbix.
Create an item and trigger on zabbix to check when the file was changed (using diff or checksum)
Create a action on zabbix to execute a script that will
1 - diff between file.txt and file.txt.copy and send this diference to your email
2 - Copy file.txt to file.txt.copy so you can do the diff next time the file change.
To reate a action with script.
Create a action on zabbix. Go to "operations" tab. Select "Remote Command" from option.
Choose custom script.
Put the script with the whole path and arg's.
Sample
/opt/script/my_script.sh
The user zabbix must have permission to ruin the script.
Zabbix docs

Main Page error of MediaWiki

I have got this error of the maain page. How to fix it?
http://www.hippomocks.com/Talk:Main_Page
The revision #0 of the page named "Main Page" does not exist.
This is usually caused by following an outdated history link to a page that has been deleted. Details can be found in the deletion log.
According to Mediawiki:
Database inconsistencies occur when, for example, primary keys stored in other fields no longer point to a row that exists. This can happen after a database import ends prematurely, for example. In that case, page.page_latest might point to a revision that hasn't been imported, and users trying to read the page might get an error message stating "The revision #0 of the page named '[page name]" does not exist. This is usually caused by following an outdated history link to a page that has been deleted. Details can be found in the deletion log."
The maintenance script findAnomalies.php can be used to find missing revisions. From CLI on your server, cd to the maintenance directory in your Mediawiki directory and run the script. e.g.:
cd /var/www/html/wiki/maintenance
php findAnomolies.php
And try some extra stuff
The error message you get sounds like in the page table, the entry of the according page points to a non-existing revision. This might be fixable by running the maintenance script attachLatest.php. This should make the page point to the newest revision again. This would be what I would try first.
If that does not work and you in fact want to delete the page, I would try running the maintenance script nukePage.php. This script allows you to permanently(!) delete a page from the database. Afterwards you can use the script purgeOldText.php to delete unused rows from the text table.
However, note that your database currently is in an inconsistent state; although the scripts I mentioned were partly written for situations of brokenness, there is no guarantee that they can solve this.

How do I delete history on MediaWiki

My user is part of the sysop group, but I do not see a way to edit the history. I have even added the variable $wgRCMaxAge = 2592000 to the LocalSettings.php file.
See RevisionDelete. $wgRCMaxAge controls how long back can you go in Special:RecentChanges, it's not related to anything like that.

Mediawiki interwiki link not updating?

After using a particular interwiki link for a while on my wiki (Mediawiki 1.15.1), the other wiki changed its domain name, and I'd like to update my interwiki links. I changed the URL in the mw_interwiki table, but the links aren't updating.
I have tried adding "?action=purge" on the page with the links. I do not appear to have $wgInterwikiCache set in my LocalSettings file, and the mw_transcache table has no rows in it.
Is there something else I need to do to trigger an interwiki URL update?
EDIT Time solved this problem; after a few hours the links updated, so it's probably a caching issue. Not sure what process would be best to force a cache break if ?action=purge doesn't do it, though.
Using version 1.4.1 of Extension:Interwiki (on MediaWiki 1.20.2), I had the same problem. Even after deleting the interwiki entry, page previews continued to use the previously-stored value.
Upgrading to Interwiki 2.2 20120425 caused my next interwiki edit attempt to fail, but I was able to delete the entry and recreate it; after that, the links finally updated.
Use Extension:Interwiki to do the change. It will update the links instantly.

Accidentally deleted a product in the admin panel,how can I get it back?

Last night I modified the description of a product in the admin panel, and I carelessly deleted one product. I want to get it back. I tried using the product backup CSV file to get it back at the admin panel but I found that it didn't work. I'm very confused when I import products in the admin panel, what format data does it need? Do you have some good ideas to help me to get the accidentally deleted product back?
I am using the Magento VERSION 1.5.1.0
automatically admin panel, browser to system -> import/export -> import (see image)
Well first of all please specify what does it mean
but eventully I find that it doesn't work
Well what I would suggest you to do now: if product is simple, simply recreate on on the basis of backup CSV.
If you don't want then please specify, how do you do your backup and why this file don't work?
Perhaps you simply should clean cache and reindex.