Last modified: 2012-11-01 18:08:55 UTC
My SemanticMediaWiki is behaving in a strange way. If I edit an page, SemanticMediaWiki gets the properties of that page normally. But if I run maintenance or any other automatictly update from SemanticMediaWiki, pages are saved with properties of other pages. For example: http://www.wikirio.com.br/Sandbox:Ipanema You'll notice that there's a restaurante called "Plataforma". On my ASK query I have for the Property "Bairros" the value "Ipanema". If you go to the page "Plataforma" you'll also noticed that "Bairro" property is actually "Leblon", not "Ipanema". But, if you edit the page and save without changing any information, this page will no longer be available at "Sandbox:Ipanema". The "Plataforma" that you see in the "Sandbox:Ipanema" is using information from a page called "Porcão". http://www.wikirio.com.br/Porc%C3%A3o_(Ipanema) I already tried to fix all the pages, editing and saving, but wrong pages always come back when I run the Maintenance(http://www.wikirio.com.br/Especial:SMWAdmin) Sometimes I see images, CSS, etc on this page (Sandbox), with Properties from other pages. Pages that we don't have properties. This happens a lot. Thanks!
Interesting. There is a general discrepancy between the data stored in the DB and the data displayed on the wiki pages (as you rightly notice, many pages are affected). I am not sure how this can be caused. A direct way to view the data stored in the DB for one page is Special:Browse. For example, you can easily see the problem by comparing the factbox of http://www.wikirio.com.br/Plataforma with http://www.wikirio.com.br/Especial:Navegar/Plataforma This special page also allows you to search for other entries with similar properties. In the above case, we find the same data again on http://www.wikirio.com.br/Especial:Navegar/Bardot but (curiously) not on http://www.wikirio.com.br/Especial:Navegar/Porc%C3%A3o-20%28Ipanema%29 This is all very strange. I will need more information for debugging this. Could you give me access to a dump of the database table "smw_ids"? You can generate this data by running mysqldump <yourdbname> smw_ids -u <yourusername> -p If you used a table prefix when installing MediaWiki, you will have to add it in front of smw_ids. The table contains a list of all pages names that SMW knows about. It does not contain confidential or user information.
Created attachment 8354 [details] Dump of pt_smw_ids
Hi Markus! Yes, you understood the issue well! :) I just edited Plataforma and saved again with no changes, and it started working with the right properties. But I'm sure it wont work again when I run maintenance. I have sent you the dump. Let me know if you need access to my database. I don't mind (just send me your email privatly). Another thing is that I once created a namespace and gave up on it. I don't know if this could have changed anything. I not sure when this problem started. :( Regards
Ok, the dump does not seem to have any problems. The namespace issue might potentially cause problems, but I have no idea right now how this could lead to the issues you observe. There is a chance that spurious errors occur if something was messed up in the update jobs that the update at http://www.wikirio.com.br/Especial:SMWAdmin triggers. These jobs are also used elsewhere, so if they are broken then problems will always re-occur even if the update is not run. Could you do the following check please? * Find a page with wrong data; verify that the data is wrong by looking at it in http://www.wikirio.com.br/Especial:Navegar * Login to your server and go to the directory ./extensions/SemanticMediaWiki/maintenance beneath your installation path. * Run php SMW_refreshData.php --page "Nameofyourpage" (to make sure that this works as expected, it is good to pick a page without difficult characters or special symbols). * Look at Especial:Navegar again to see if the data of the page has changed (at least the modification date should change, the question is if the errors go away, too). If the errors do not go away, try the same experiment with a page that has correct data in the wiki and see if it gets wrong data. Another question: when a page has wrong data, does this data always come from the same other page?
P.S. I think the change of namespace mainly means that pages in the "Sandbox" namespace (when it existed) will now appear in the Main namespace when retrieved from the database. This effect can be seen at http://www.wikirio.com.br/Especial:Navegar/Modelo which claims to have a redirect from itself, when in reality it has a redirect to "Sandbox: Modelo". Storing the page again should fix this problem. Again, I cannot see how this causes the other problems you describe.
Markus, Does not update anything. Nothing has changed. I just noticed that the working ones has really old properties that are not used anymore. Im going to reset all Semantics so we can be sure that we're debbuging the right Issue. I have done this before and didnt fix, but I had to restore the database. About he data, yes, always comes from other pages. The are images and css showing at semantics with properties of restaurants, for example. I'll follow the instructions on the page http://semantic-mediawiki.org/wiki/Help:Repairing_SMW's_data 1. php SMW_setup.php --delete 2. php SMW_refreshData.php -ftpv -s 0 -e 500 3. php SMW_refreshData.php -ftpv -s 501 -e 1000 4. php SMW_refreshData.php -ftpv -s 1001 -e 1500 5. php SMW_refreshData.php -ftpv -s 1501 -e 2000 ... 10. php SMW_refreshData.php -v Can you tell me if this is the right way to go?
(In reply to comment #6) > Markus, > > Does not update anything. Nothing has changed. That is very strange. Does the script say "Refreshing specified pages!" and "1 pages refreshed." or what exactly is the output? If the output is correct, then maybe some HTTP or browser caching prevents you from seeing the change? I have to correct myself: the modification date would not be changed. But it would still be surprising if both the wrong and the correct pages are refreshed to exactly the same data with this script. ... > I'll follow the instructions on the page > http://semantic-mediawiki.org/wiki/Help:Repairing_SMW's_data > > 1. php SMW_setup.php --delete > 2. php SMW_refreshData.php -ftpv -s 0 -e 500 > 3. php SMW_refreshData.php -ftpv -s 501 -e 1000 > 4. php SMW_refreshData.php -ftpv -s 1001 -e 1500 > 5. php SMW_refreshData.php -ftpv -s 1501 -e 2000 > ... > 10. php SMW_refreshData.php -v > > Can you tell me if this is the right way to go? That's not quite right: the parameter "-f" of SMW_refreshData.php will delete the database (you should also see a warning). So you should not use it many times in a row. If you manually call "SMW_setup.php --delete" then you do not need to use -f at all (in this case, you must call SMW_setup.php without parameters first to re-create the SMW tables). I am curious if this complete reset fixes your problem. If this does not help, then the next step will be to uncomment all extensions in LocalSettings.php and load Semantic MediaWiki only. Then repeat the complete refresh (with delete) and see if this helps. If not, then we have at least clarified that this is an SMW problem and not caused by another extension.
Markus, Great! I was following the instructions of the website http://semantic-mediawiki.org/wiki/Help:Repairing_SMW's_data So I guess I should execute something like 1. php SMW_setup.php --delete 2. php SMW_setup.php 3. php SMW_refreshData.php -tpv -s 0 -e 500 4. php SMW_refreshData.php -tpv -s 501 -e 1000 5. php SMW_refreshData.php -tpv -s 1001 -e 1500 6. php SMW_refreshData.php -tpv -s 1501 -e 2000 ... 10. php SMW_refreshData.php -v I'll have to do this later, to make a backup of the database first. Thanks for your help, Edgard.
Markus, I have fixed the issue. I made a backup from the database and ran: php SMW_setup.php --delete php SMW_setup.php php SMW_refreshData.php -v -s 1 -e 500 php SMW_refreshData.php -v -s 501 -e 1000 php SMW_refreshData.php -v -s 1001 -e 1500 php SMW_refreshData.php -v -s 1501 -e 1700 php SMW_refreshData.php -v -s 1701 -e 2000 php SMW_refreshData.php -v -s 2001 -e 2500 php SMW_refreshData.php -v -s 2501 -e 2800 php SMW_refreshData.php -v -s 2801 -e 3100 php SMW_refreshData.php -v -s 3101 -e 3400 Next I noticed that the Semantics was ignoring [[Category:Restaurantes]] when I decided to remove a form that I had on all pages using Template. When I did all of that, 7 hours of testing, all worked fine again. Thank you for all your help. I dont know what caused the problem, but I think it's fine now. I'll return with news asap. Thank you again, Regards, Edgard.
It appears this bug is invalid, and should be marked as resolved?
Indeed, this problem seems to have vanished now.