From: Alexey D. <al...@al...> - 2013-08-07 10:09:39
|
Hi, I've found why property value '1' is replaced by a link to 'unrelated' :) page. In the past there was the page '1'. It was moved without redirect. Now [[1]] is shown as red link but [[propname::1] or {{#ask ... |?propname}} shows new title instead of red link. It can be reproduced on the latest MW (1.21.1) and SMW (1.9 alpha, git master) Hope it'll help to fix this bug, Alexey On 02.08.2013 17:01, James HK wrote: > Hi, > > First thing to do would be to confirm if the behaviour you reported > here (SMW 1.8) is still present with the current SMW master (1.9 > alpha). > >>>> Where to look in the source code? > Storing of properties from a text in SMW 1.9 will follow: > > * Hook onInternalParseBeforeLinks hooks -> \SMW\ParserTextProcessor -> > \SMW\ParserData attached SemanticData object to the parserOutput > > * Hook onParserAfterTidy -> \SMW\ParserData updateStore > > Cheers > > On 8/2/13, Alexey Demakov <al...@al...> wrote: >> Hello, >> >> I've faced very strange thing and can't track it down, need help. >> >> I have a page where [main] template instantiated. >> This template takes template lists as parameters. >> That parameter templates define subobjects. >> The main template also has #ask to show table of defined subobjects. It >> is after instantiation of parameter templates. >> Subobjects has some property of default type (No 'Has type' property >> defined at the property page). >> Property values are displayed as links because default type of property >> is Page. >> >> Property values are numbers. >> And I found that when property is equal to 1, instead of it I see in >> table a link to some completely unrelated page (always the same, not >> different). >> It seems very strange for me. >> >> What I've tried: >> 1. Change property value - it displays correctly. Only 1 causes link to >> unrelated page. >> 2. Change property type to String - it displays correctly. Only property >> of default type has the problem. Changed it back and the problem returned. >> 3. Add property with different name and value 1. It links to unrelated >> page :) >> 4. Run touch.py from pymediawiki to force semantic info update. >> Completed without errors, no changes. >> >> May be my database is corrupt but I want to find out exact reason. >> I'm inspecting SMW source code but need help. >> When properties are shown at Special:Browse, datavalue >> SMW_DV_WikiPage.php already has unrelated page title in >> $this->getText(), $this->getPrefixedText(). >> >> So I want to see how page with main template instantiation is stored. >> Somewhere near it should be check of property type, but I can't find it. >> >> Please, help me. >> 1. Is it normal behaviour or not? >> 2. What is possible reason - corrupted database or SMW bug? >> 3. How to find this bug? Where to look in the source code? >> >> Regards, >> Alexey >> |