Hello all,
I'm running Media Wiki 1.4.12 and working on a project where I need to automate edits to certain pages. I'm using SQL statements to do these edits (see below for details). When I perform these edits in the database they are not displayed when I view the article using a web browser, in spite of the fact that they are in the cur database. If I go to the "Edit" page I see my edits there and if I edit the Edit, they will appear in the article view. I'm also able to see my edits in the recentchanges list. The only place where they don't appear to appear is in the Article view itself.
I've searched mediawiki and google and haven't found anyone attempting similar. We are not using memcaching at this site and I've even added $wgCachePages = false; to the local settings file with no change.
I need to be able to do this process automatically without requiring the end user to click on Edit to see the edited page. Any and all help is appreciated!
DETAILS:
Here's the set of sql statements I'm running:
#copy old article data into the "old" table:
insert into test_old (old_namespace, old_title, old_text, old_user, old_user_text, old_timestamp, inverse_timestamp) select cur_namespace, cur_title, cur_text, cur_user, cur_user_text, cur_timestamp, inverse_timestamp from test_cur where cur_title = 'TestPage';
#get the old id to be inserted into the recentchanges table. select max(old_id) from test_old as rc_last_old_id where old_title = 'TestPage'; (result is 942)
#get the current id to be inserted into the recentchanges table select cur_id from test_cur where cur_title = 'TestPage'; (result is 980)
#perform the update on the cur table update test_cur set cur_text = '3 Modified page THIS WILL WORK REALLY.', cur_user = '3', cur_user_text = 'Autopop', cur_timestamp = DATE_FORMAT(CURRENT_TIMESTAMP, '%Y%m%d%H%i%s'), cur_is_new = '0', cur_touched = DATE_FORMAT(CURRENT_TIMESTAMP, '%Y%m%d%H%i%s'), inverse_timestamp = (99999999999999 - CURRENT_TIMESTAMP) where cur_title = 'TestPage';
#update recentchanges insert into test_recentchanges (rc_timestamp, rc_cur_time, rc_user, rc_user_text, rc_title, rc_cur_id, rc_last_oldid) values ( DATE_FORMAT(CURRENT_TIMESTAMP, '%Y%m%d%H%i%s'), DATE_FORMAT(CURRENT_TIMESTAMP, '%Y%m%d%H%i%s'), '3', 'Autopop', 'TestPage', '980', '942' );
#update searchindex update test_searchindex set si_text = '3 Modified page THIS WILL WORK REALLY.[[Category:Published]]' where si_page = 980;