From: cnit <cn...@un...> - 2007-11-07 14:24:26
|
Hi! After adding additional priviledges to database (CREATE TEMPORARILY TABLES and DROP), my upgrade seems to work. I wonder, whether these additional priviledges are mentioned in INSTALL file, because older SMW's were happy with just ALTER. But there's some disappointment, my query templates don't work anymore. I've used to display custom HTML layout with such query: <div class="tbl-yarsu"> <!-- {{newshead}} --> <ask sort="Date" order="descending" limit="20" format="template" template="newsrow" default="There is no news" searchlabel="Browse all news ..."> [[Date:=*]] [[Category:News]] </ask></div> and a such simple Template:newsrow <div class="tr-yarsu"> <div class="td-yarsu yarsu-date">{{{2}}}</div> <div class="td-yarsu yarsu-article">{{{1}}}</div> <div class="space-line-yarsu"></div> </div> The query works, yet the value of {{{2}}} is omitted. it's empty, none.. :-( {{{1}}} expands just fine.. Dmitriy |
From: Markus <ma...@ai...> - 2007-11-07 18:44:05
|
Yes, this appears to be a bug. For a quick workaround, consider using the=20 formats "list", "ul" or "ol", all of which also support the=20 template-parameter for formatting (and this one certainly works with SMW1.0= ).=20 Note that with list, you can also choose the separator between items=20 (parameter sep), so as to simulate "template" quite well. Markus On Mittwoch, 7. November 2007, cnit wrote: > Hi! > After adding additional priviledges to database (CREATE TEMPORARILY > TABLES and DROP), my upgrade seems to work. I wonder, whether these > additional priviledges are mentioned in INSTALL file, because older > SMW's were happy with just ALTER. > > But there's some disappointment, my query templates don't work > anymore. I've used to display custom HTML layout with such query: > > <div class=3D"tbl-yarsu"> > <!-- {{newshead}} --> > <ask sort=3D"Date" order=3D"descending" limit=3D"20" format=3D"template" > template=3D"newsrow" default=3D"There is no news" searchlabel=3D"Browse a= ll news > ..."> [[Date:=3D*]] > [[Category:News]] > </ask></div> > > and a such simple Template:newsrow > > <div class=3D"tr-yarsu"> > <div class=3D"td-yarsu yarsu-date">{{{2}}}</div> > <div class=3D"td-yarsu yarsu-article">{{{1}}}</div> > <div class=3D"space-line-yarsu"></div> > </div> > > > The query works, yet the value of {{{2}}} is omitted. it's empty, > none.. :-( > > {{{1}}} expands just fine.. > > Dmitriy > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Semediawiki-devel mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semediawiki-devel =2D-=20 Markus Kr=F6tzsch Institut AIFB, Univers=E4t Karlsruhe (TH), 76128 Karlsruhe phone +49 (0)721 608 7362 fax +49 (0)721 608 5998 ma...@ai... www http://korrekt.org |
From: Sergey C. <sem...@an...> - 2007-11-07 19:15:28
|
Great news that other formats support templates as well. I wonder if you have templated formatting for tables in plans - I had a use case where selected property was a URL and all looked very good except for this URL stretching the table badly while it was fine to have the same link text for all of the rows. On Nov 7, 2007 1:43 PM, Markus Kr=F6tzsch <ma...@ai...> wrote= : > Yes, this appears to be a bug. For a quick workaround, consider using the > formats "list", "ul" or "ol", all of which also support the > template-parameter for formatting (and this one certainly works with > SMW1.0). > Note that with list, you can also choose the separator between items > (parameter sep), so as to simulate "template" quite well. > > Markus > > On Mittwoch, 7. November 2007, cnit wrote: > > Hi! > > After adding additional priviledges to database (CREATE TEMPORARILY > > TABLES and DROP), my upgrade seems to work. I wonder, whether these > > additional priviledges are mentioned in INSTALL file, because older > > SMW's were happy with just ALTER. > > > > But there's some disappointment, my query templates don't work > > anymore. I've used to display custom HTML layout with such query: > > > > <div class=3D"tbl-yarsu"> > > <!-- {{newshead}} --> > > <ask sort=3D"Date" order=3D"descending" limit=3D"20" format=3D"template= " > > template=3D"newsrow" default=3D"There is no news" searchlabel=3D"Browse= all > news > > ..."> [[Date:=3D*]] > > [[Category:News]] > > </ask></div> > > > > and a such simple Template:newsrow > > > > <div class=3D"tr-yarsu"> > > <div class=3D"td-yarsu yarsu-date">{{{2}}}</div> > > <div class=3D"td-yarsu yarsu-article">{{{1}}}</div> > > <div class=3D"space-line-yarsu"></div> > > </div> > > > > > > The query works, yet the value of {{{2}}} is omitted. it's empty, > > none.. :-( > > > > {{{1}}} expands just fine.. > > > > Dmitriy > > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Splunk Inc. > > Still grepping through log files to find problems? Stop. > > Now Search log events and configuration files using AJAX and a browser. > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > _______________________________________________ > > Semediawiki-devel mailing list > > Sem...@li... > > https://lists.sourceforge.net/lists/listinfo/semediawiki-devel > > > > -- > Markus Kr=F6tzsch > Institut AIFB, Univers=E4t Karlsruhe (TH), 76128 Karlsruhe > phone +49 (0)721 608 7362 fax +49 (0)721 608 5998 > ma...@ai... www http://korrekt.org > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Semediawiki-devel mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semediawiki-devel > > --=20 Sergey Chernyshev http://www.sergeychernyshev.com/ |
From: cnit <cn...@un...> - 2007-11-08 13:31:19
|
> Yes, this appears to be a bug. For a quick workaround, consider using the > formats "list", "ul" or "ol", all of which also support the > template-parameter for formatting (and this one certainly works with SMW1.0). > Note that with list, you can also choose the separator between items > (parameter sep), so as to simulate "template" quite well. Thanks for a hint, but it seems that the problem is deeper. Even after the successfully importing XML dump, where <page>Attribute:..</page> were replaced with <page>Property:..</page> and also these pages were placed on the top of the dump, to make sure properties are defined before importing the pages where actual values of properties are used.. But.. my smw_attributes table is empty :-( I think it's not correct, because I have at least two properties and many user pages that use them.. My first guess was: "that might be because the datetime class was completely rewritten, and the new version doeesn't accept Russian format of dates". But, I've made a simple test and it seems that $this->m_time = strtotime(trim($value)); converts Russian formatted date strtotime("13.04.2007") to correct value. There is a page, which uses Date property with such value, yet, the manual Special:Ask search of [[Äàòà:=13.04.2007]] where Aaoa is a Date in Russian, like: [[Date:=13.04.2007]] returns nothing. Yet, the page with such property value exists in the wiki.. The property also has it's own definition page (of course), which states (in Russian) that it's a special one and it's type belongs to standard type "Date" - there are mouseover popup hints. I guess that means that property has been defined correctly? I guess that SMW tables aren't initialized during the XML import for some reason? Dmitriy |
From: Sergey C. <sem...@an...> - 2007-11-08 16:02:09
|
Not sure if it's related to this issue, but I also lost some data in smw_attributes table (not all of it though). The worst part is that it didn't reappear after I ran complete SMW_refreshData on the dataset. I wonder what needs to be done to repopulate SMW tables from scratch? Sergey On Nov 8, 2007 8:26 AM, cnit <cn...@un...> wrote: > > Yes, this appears to be a bug. For a quick workaround, consider using > the > > formats "list", "ul" or "ol", all of which also support the > > template-parameter for formatting (and this one certainly works with > SMW1.0). > > Note that with list, you can also choose the separator between items > > (parameter sep), so as to simulate "template" quite well. > > Thanks for a hint, but it seems that the problem is deeper. Even > after the successfully importing XML dump, where > <page>Attribute:..</page> > were replaced with > <page>Property:..</page> > > and also these pages were placed on the top of the dump, to make sure > properties are defined before importing the pages where actual > values of properties are used.. > > But.. my smw_attributes table is empty :-( I think it's not > correct, because I have at least two properties and many user pages > that use them.. > > My first guess was: "that might be because the datetime class was > completely rewritten, and the new version doeesn't accept Russian > format of dates". But, I've made a simple test and it seems that > > $this->m_time =3D strtotime(trim($value)); > > converts Russian formatted date > strtotime("13.04.2007") > to correct value. > > There is a page, which uses Date property with such value, yet, the > manual Special:Ask search of > [[=C4=E0=F2=E0:=3D13.04.2007]] > where Aaoa is a Date in Russian, like: > [[Date:=3D13.04.2007]] > > returns nothing. Yet, the page with such property value exists in > the wiki.. > > The property also has it's own definition page (of course), which > states (in Russian) that it's a special one and it's type belongs > to standard type "Date" - there are mouseover popup hints. I guess that > means that property has been defined correctly? > > I guess that SMW tables aren't initialized during the XML import for some > reason? > Dmitriy > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Semediawiki-devel mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semediawiki-devel > --=20 Sergey Chernyshev http://www.sergeychernyshev.com/ |
From: Markus <ma...@ai...> - 2007-11-09 12:12:16
|
On Donnerstag, 8. November 2007, Sergey Chernyshev wrote: > Not sure if it's related to this issue, but I also lost some data in > smw_attributes table (not all of it though). The worst part is that it > didn't reappear after I ran complete SMW_refreshData on the dataset. > I wonder what needs to be done to repopulate SMW tables from scratch? Running SMW_refreshData twice (once with option -p and once without; option= -v=20 may also be interesting but not essential) will restore all available data = in=20 basically all cases. If the table remains incomplete, this means that the=20 content of the pages does no longer require certain entries there. This may= =20 have various reasons: * The table contained old orphaned entries before, maybe due to some bug in= =20 earlier versions. * The table contained outdated data (e.g. after some template change) that= =20 just had not been refreshed yet. * Some annotation is no longer accepted, maybe due to (unintentional)=20 syntactic changes, or due to known limitations such as the disabled=20 Type:Boolean. Only case 3 should bother you, and in this case more information is needed:= =20 what exactly is it that is missing?=20 But in any case SMW_refreshData (at least in theory) suffices to recreate a= ll=20 SMW data from scratch or from import. Anything not built there will not be= =20 built when editing pages normally either. Markus > > Sergey > > On Nov 8, 2007 8:26 AM, cnit <cn...@un...> wrote: > > > Yes, this appears to be a bug. For a quick workaround, consider using > > > > the > > > > > formats "list", "ul" or "ol", all of which also support the > > > template-parameter for formatting (and this one certainly works with > > > > SMW1.0). > > > > > Note that with list, you can also choose the separator between items > > > (parameter sep), so as to simulate "template" quite well. > > > > Thanks for a hint, but it seems that the problem is deeper. Even > > after the successfully importing XML dump, where > > <page>Attribute:..</page> > > were replaced with > > <page>Property:..</page> > > > > and also these pages were placed on the top of the dump, to make sure > > properties are defined before importing the pages where actual > > values of properties are used.. > > > > But.. my smw_attributes table is empty :-( I think it's not > > correct, because I have at least two properties and many user pages > > that use them.. > > > > My first guess was: "that might be because the datetime class was > > completely rewritten, and the new version doeesn't accept Russian > > format of dates". But, I've made a simple test and it seems that > > > > $this->m_time =3D strtotime(trim($value)); > > > > converts Russian formatted date > > strtotime("13.04.2007") > > to correct value. > > > > There is a page, which uses Date property with such value, yet, the > > manual Special:Ask search of > > [[=C4=E0=F2=E0:=3D13.04.2007]] > > where Aaoa is a Date in Russian, like: > > [[Date:=3D13.04.2007]] > > > > returns nothing. Yet, the page with such property value exists in > > the wiki.. > > > > The property also has it's own definition page (of course), which > > states (in Russian) that it's a special one and it's type belongs > > to standard type "Date" - there are mouseover popup hints. I guess that > > means that property has been defined correctly? > > > > I guess that SMW tables aren't initialized during the XML import for so= me > > reason? > > Dmitriy > > > > > > -----------------------------------------------------------------------= =2D- > > This SF.net email is sponsored by: Splunk Inc. > > Still grepping through log files to find problems? Stop. > > Now Search log events and configuration files using AJAX and a browser. > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > _______________________________________________ > > Semediawiki-devel mailing list > > Sem...@li... > > https://lists.sourceforge.net/lists/listinfo/semediawiki-devel =2D-=20 Markus Kr=F6tzsch Institut AIFB, Univers=E4t Karlsruhe (TH), 76128 Karlsruhe phone +49 (0)721 608 7362 fax +49 (0)721 608 5998 ma...@ai... www http://korrekt.org |
From: Markus <ma...@ai...> - 2007-11-09 12:18:11
|
On Mittwoch, 7. November 2007, Sergey Chernyshev wrote: > Great news that other formats support templates as well. I wonder if you > have templated formatting for tables in plans - I had a use case where > selected property was a URL and all looked very good except for this URL > stretching the table badly while it was fine to have the same link text f= or > all of the rows. Yes, I could use this as well. But this feature comes only after the=20 implementation of {{#ask...}} (since this change will change the interactio= n=20 of inline queries with MediaWiki's table creation). Markus > > On Nov 7, 2007 1:43 PM, Markus Kr=F6tzsch <ma...@ai...> wro= te: > > Yes, this appears to be a bug. For a quick workaround, consider using t= he > > formats "list", "ul" or "ol", all of which also support the > > template-parameter for formatting (and this one certainly works with > > SMW1.0). > > Note that with list, you can also choose the separator between items > > (parameter sep), so as to simulate "template" quite well. > > > > Markus > > > > On Mittwoch, 7. November 2007, cnit wrote: > > > Hi! > > > After adding additional priviledges to database (CREATE TEMPORARILY > > > TABLES and DROP), my upgrade seems to work. I wonder, whether these > > > additional priviledges are mentioned in INSTALL file, because older > > > SMW's were happy with just ALTER. > > > > > > But there's some disappointment, my query templates don't work > > > anymore. I've used to display custom HTML layout with such query: > > > > > > <div class=3D"tbl-yarsu"> > > > <!-- {{newshead}} --> > > > <ask sort=3D"Date" order=3D"descending" limit=3D"20" format=3D"templa= te" > > > template=3D"newsrow" default=3D"There is no news" searchlabel=3D"Brow= se all > > > > news > > > > > ..."> [[Date:=3D*]] > > > [[Category:News]] > > > </ask></div> > > > > > > and a such simple Template:newsrow > > > > > > <div class=3D"tr-yarsu"> > > > <div class=3D"td-yarsu yarsu-date">{{{2}}}</div> > > > <div class=3D"td-yarsu yarsu-article">{{{1}}}</div> > > > <div class=3D"space-line-yarsu"></div> > > > </div> > > > > > > > > > The query works, yet the value of {{{2}}} is omitted. it's empty, > > > none.. :-( > > > > > > {{{1}}} expands just fine.. > > > > > > Dmitriy > > > > -----------------------------------------------------------------------= =2D- > > > > > This SF.net email is sponsored by: Splunk Inc. > > > Still grepping through log files to find problems? Stop. > > > Now Search log events and configuration files using AJAX and a browse= r. > > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > > _______________________________________________ > > > Semediawiki-devel mailing list > > > Sem...@li... > > > https://lists.sourceforge.net/lists/listinfo/semediawiki-devel > > > > -- > > Markus Kr=F6tzsch > > Institut AIFB, Univers=E4t Karlsruhe (TH), 76128 Karlsruhe > > phone +49 (0)721 608 7362 fax +49 (0)721 608 5998 > > ma...@ai... www http://korrekt.org > > > > -----------------------------------------------------------------------= =2D- > > This SF.net email is sponsored by: Splunk Inc. > > Still grepping through log files to find problems? Stop. > > Now Search log events and configuration files using AJAX and a browser. > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > _______________________________________________ > > Semediawiki-devel mailing list > > Sem...@li... > > https://lists.sourceforge.net/lists/listinfo/semediawiki-devel =2D-=20 Markus Kr=F6tzsch Institut AIFB, Univers=E4t Karlsruhe (TH), 76128 Karlsruhe phone +49 (0)721 608 7362 fax +49 (0)721 608 5998 ma...@ai... www http://korrekt.org |
From: cnit <cn...@un...> - 2007-11-12 12:24:21
|
> Yes, I could use this as well. But this feature comes only after the > implementation of {{#ask...}} (since this change will change the interaction > of inline queries with MediaWiki's table creation). Can the implementation of {{#ask}} make possible such trick that I've unsuccessfully tried to perform with SMW 0.7: Instead of displaying a page link in ask query template (via {{{1}}}) I've tried to display the content of resulted pages with {{ {{{1}}} }} Yet, expansion didn't work. If that won't be possible even with {{#ask...}}, maybe is it possible to make another format of ask queries, something like this: <ask format="expandtemplate" to display the content of resulted wiki pages instead of their titles with links? You know, imagine that performing such ask query, where the result is wiki page "Dresden" and wiki page "Berlin" would display the text of these pages instead of list of links. Dmitriy |
From: Markus <ma...@ai...> - 2007-11-30 14:54:20
|
On Montag, 12. November 2007, cnit wrote: > > Yes, I could use this as well. But this feature comes only after the > > implementation of {{#ask...}} (since this change will change the > > interaction of inline queries with MediaWiki's table creation). > > Can the implementation of {{#ask}} make possible such trick that I've > unsuccessfully tried to perform with SMW 0.7: > > Instead of displaying a page link in ask query template (via {{{1}}}) > I've tried to display the content of resulted pages with > {{ {{{1}}} }} > Yet, expansion didn't work. I expect that this works now with #ask, *BUT* there already is a format for= =20 what you want to do. It is called "embedded" and it can be customised with= =20 the following parameters: * embedformat =3D {h1, h2, h3, ol, ul} (how to format the result list) * embedonly =3D true (whether to leave away the headlines) This must, however, be combined with <noinclude> so as not to import semant= ic=20 data or category data to the page that asks the query (especially when usin= g=20 #ask). Embed also works for annotation-objects, e.g. to print the=20 query "[[some page]] [[links to::*]]" -- then all the values of "links to"= =20 will be embedded. Other than the "first column", print requests=20 for "embedded" are usually ignored. Also, there are known ways of cyclic=20 embedding that may lead to infinite inclusion loops (though in practice the= se=20 tend to be as finite as available memory). > > If that won't be possible even with {{#ask...}}, maybe is it possible > to make another format of ask queries, something like this: > > <ask format=3D"expandtemplate" > > to display the content of resulted wiki pages instead of their titles > with links? > > You know, imagine that performing such ask query, where the result is > wiki page "Dresden" and wiki page "Berlin" would display the text of > these pages instead of list of links. Yes, I already use this for my (semi-)blog that is based on SMW :-) (not th= at=20 I am very active as a blogger, but anyway here is the example page, mostly= =20 generated by a query: http://korrekt.org/index.php/Blog). Markus =2D-=20 Markus Kr=F6tzsch Institut AIFB, Univers=E4t Karlsruhe (TH), 76128 Karlsruhe phone +49 (0)721 608 7362 fax +49 (0)721 608 5998 ma...@ai... www http://korrekt.org |
From: cnit <cn...@un...> - 2007-12-03 15:21:00
|
> I expect that this works now with #ask, *BUT* there already is a format for > what you want to do. It is called "embedded" and it can be customised with > the following parameters: > * embedformat = {h1, h2, h3, ol, ul} (how to format the result list) > * embedonly = true (whether to leave away the headlines) It's great, but I use a div tag with special css style to separate the rows.., so {{ {{{1}}} }} is probably better to me, or maybe embedformat can be expanded to custom set of tags? The only concern is, how much the template expansion is inefficient comparing to format="embedded"... > This must, however, be combined with <noinclude> so as not to import semantic > data or category data to the page that asks the query (especially when using > #ask). Such as with templates. I know that, but thank's for reminding.. > Embed also works for annotation-objects, e.g. to print the > query "[[some page]] [[links to::*]]" -- then all the values of "links to" > will be embedded. Other than the "first column", print requests > for "embedded" are usually ignored. Also, there are known ways of cyclic > embedding that may lead to infinite inclusion loops (though in practice these > tend to be as finite as available memory). I see.. > Yes, I already use this for my (semi-)blog that is based on SMW :-) (not that > I am very active as a blogger, but anyway here is the example page, mostly > generated by a query: http://korrekt.org/index.php/Blog). Great! May I suggest another kind of ask format? Sometimes it's desirable to get only a simple count of rows instead of the query result rows. So, if there's a 5 rows in the query result, ask format="count" would return a number 5. It may be useful to statistics, in further computations in templates and so on... I really think that SMW requires a better documentation on new formats of queries, #ask and subqueries. Because the only documentation I've used is outdated: http://meta.wikimedia.org/wiki/Help:Substitution e.g. no new features, no subqueries here and so on.. In the future, after releasing final version, I would suggest reporting a story about SMW to slashdot, to get some more publicity.. Dmitriy |
From: Thomas B. <Tho...@gm...> - 2007-12-03 15:48:22
|
* cnit <cn...@un...> [2007-12-03 16:24]: > May I suggest another kind of ask format? Sometimes it's desirable to > get only a simple count of rows instead of the query result rows. So, > if there's a 5 rows in the query result, ask format=3D"count" would > return a number 5. It may be useful to statistics, in further > computations in templates and so on... format=3D"count" already exists, since at least SMW 0.7. > I really think that SMW requires a better documentation on new > formats of queries, #ask and subqueries. Because the only > documentation I've used is outdated: > http://meta.wikimedia.org/wiki/Help:Substitution > e.g. no new features, no subqueries here and so on.. ??? This page mentions SMW, but it's hardly related to it. Have you looked at ontoworld.org or http://semantic-mediawiki.org/? I agree that the wiki pages there need improvement, and hopefully that will happen once 1.0 is released (personally, I'm currently refraining =66rom doing any work on the site, because many things have changed between 0.7 and 1.0 and it's not so easy to separate it; I hope 1.0 will be released soon, so the old information about 0.7 can be replaced) But such documentation doesn't write itself. Maybe you can rework the wiki pages on semantic-mediawiki.org with the things you have already learned about SMW 1.0. That would surely be appreciated. Regards, Thomas |
From: Markus <ma...@ai...> - 2007-11-09 12:24:30
|
Did you ever run SMW_refreshData after the import? Plain import does probab= ly=20 bypass SMW's (save) hooks, so that this last part would be needed (twice, a= s=20 described in INSTALL).=20 SMW's tables are completely determined by the page contents of your wiki, a= nd=20 so they do not need to be imported or backuped. If they cannot be rebuilt v= ia=20 SMW_refreshData, then normal editing in the wiki would also not fill them=20 properly (which is possible, but not related to the import itself). Markus On Donnerstag, 8. November 2007, cnit wrote: > > Yes, this appears to be a bug. For a quick workaround, consider using t= he > > formats "list", "ul" or "ol", all of which also support the > > template-parameter for formatting (and this one certainly works with > > SMW1.0). Note that with list, you can also choose the separator between > > items (parameter sep), so as to simulate "template" quite well. > > Thanks for a hint, but it seems that the problem is deeper. Even > after the successfully importing XML dump, where > <page>Attribute:..</page> > were replaced with > <page>Property:..</page> > > and also these pages were placed on the top of the dump, to make sure > properties are defined before importing the pages where actual > values of properties are used.. > > But.. my smw_attributes table is empty :-( I think it's not > correct, because I have at least two properties and many user pages > that use them.. > > My first guess was: "that might be because the datetime class was > completely rewritten, and the new version doeesn't accept Russian > format of dates". But, I've made a simple test and it seems that > > $this->m_time =3D strtotime(trim($value)); > > converts Russian formatted date > strtotime("13.04.2007") > to correct value. > > There is a page, which uses Date property with such value, yet, the > manual Special:Ask search of > [[=C4=E0=F2=E0:=3D13.04.2007]] > where Aaoa is a Date in Russian, like: > [[Date:=3D13.04.2007]] > > returns nothing. Yet, the page with such property value exists in > the wiki.. > > The property also has it's own definition page (of course), which > states (in Russian) that it's a special one and it's type belongs > to standard type "Date" - there are mouseover popup hints. I guess that > means that property has been defined correctly? > > I guess that SMW tables aren't initialized during the XML import for some > reason? > Dmitriy =2D-=20 Markus Kr=F6tzsch Institut AIFB, Univers=E4t Karlsruhe (TH), 76128 Karlsruhe phone +49 (0)721 608 7362 fax +49 (0)721 608 5998 ma...@ai... www http://korrekt.org |
From: cnit <cn...@un...> - 2007-11-12 12:14:40
|
> Did you ever run SMW_refreshData after the import? Of course not. That's because I am using XML import instead of standard way described in INSTALL, and also I believe that moving from SMW 0.6 to SMW 0.7 had filled smw_attributes properly during the XML import (though it was many months ago, so I can't remember for sure). > Plain import does probably bypass SMW's (save) hooks, so that this > last part would be needed (twice, as described in INSTALL). It's really strange - because XML export/import scrpts do include LocalSettings.php, where the extensions are included. And these extensions obviousely setup their hooks there. But it seems that you're right - re-installing everything again, importing XML dump and performing SMW_refreshData twice did fill the smw_attributes table.. It's extremly disappointing and frustrating and also a sign of bad design that MW does not call extension hooks during the XML import :-( > SMW's tables are completely determined by the page contents of your wiki, and > so they do not need to be imported or backuped. If they cannot be rebuilt via > SMW_refreshData, then normal editing in the wiki would also not fill them > properly (which is possible, but not related to the import itself). No, I am not going to re-save hundreds of pages, of course. And of course I do realize that SMW needs to extract and store it's data via the hook during the page save. It's an MW's XML import that really frustrates me... Dmitriy |
From: Sergey C. <sem...@an...> - 2007-11-09 17:47:37
|
Yes, I ran SMW_refreshData twice - first with -p and second without. The problem I ran into is that Property page complained like this: PHP Fatal error: Call to a member funct ion getText() on a non-object in /<path to mw>/extensions/SemanticMediaWiki /includes/articlepages/SMW_PropertyPage.php on line 68, referer: http://<mw base url>/index.php?title=3DSpecial%3AAllpages&from=3D&namespace=3D102 so I enabled SQL debug and looked at the queries and realized that only few of the pages that were returned by SMW::getAllPropertySubjects had entries in mw_page (hmm, it seems that I got you confused saying that I lacked entries in mw_smw_attributes - looks like I got them referencing wrong ids or non-existing pages). I'm thinking of dropping all SMW tables and re-running the SMW_Setup.php an= d then SMW_refreshData twice. Do you think is a right approach to rebuild stuff from scratch? BTW, is it OK to split SMW_refreshData task to several tasks and run them simultaneously for better use of multiple CPUs I have? Sergey On Nov 9, 2007 7:11 AM, Markus Kr=F6tzsch <ma...@ai...> wrote= : > On Donnerstag, 8. November 2007, Sergey Chernyshev wrote: > > Not sure if it's related to this issue, but I also lost some data in > > smw_attributes table (not all of it though). The worst part is that it > > didn't reappear after I ran complete SMW_refreshData on the dataset. > > I wonder what needs to be done to repopulate SMW tables from scratch? > > Running SMW_refreshData twice (once with option -p and once without; > option -v > may also be interesting but not essential) will restore all available dat= a > in > basically all cases. If the table remains incomplete, this means that the > content of the pages does no longer require certain entries there. This > may > have various reasons: > > * The table contained old orphaned entries before, maybe due to some bug > in > earlier versions. > * The table contained outdated data (e.g. after some template change) tha= t > just had not been refreshed yet. > * Some annotation is no longer accepted, maybe due to (unintentional) > syntactic changes, or due to known limitations such as the disabled > Type:Boolean. > > Only case 3 should bother you, and in this case more information is > needed: > what exactly is it that is missing? > > But in any case SMW_refreshData (at least in theory) suffices to recreate > all > SMW data from scratch or from import. Anything not built there will not b= e > built when editing pages normally either. > > Markus > > > > > Sergey > > > > On Nov 8, 2007 8:26 AM, cnit <cn...@un...> wrote: > > > > Yes, this appears to be a bug. For a quick workaround, consider > using > > > > > > the > > > > > > > formats "list", "ul" or "ol", all of which also support the > > > > template-parameter for formatting (and this one certainly works wit= h > > > > > > SMW1.0). > > > > > > > Note that with list, you can also choose the separator between item= s > > > > (parameter sep), so as to simulate "template" quite well. > > > > > > Thanks for a hint, but it seems that the problem is deeper. Even > > > after the successfully importing XML dump, where > > > <page>Attribute:..</page> > > > were replaced with > > > <page>Property:..</page> > > > > > > and also these pages were placed on the top of the dump, to make sure > > > properties are defined before importing the pages where actual > > > values of properties are used.. > > > > > > But.. my smw_attributes table is empty :-( I think it's not > > > correct, because I have at least two properties and many user pages > > > that use them.. > > > > > > My first guess was: "that might be because the datetime class was > > > completely rewritten, and the new version doeesn't accept Russian > > > format of dates". But, I've made a simple test and it seems that > > > > > > $this->m_time =3D strtotime(trim($value)); > > > > > > converts Russian formatted date > > > strtotime("13.04.2007") > > > to correct value. > > > > > > There is a page, which uses Date property with such value, yet, the > > > manual Special:Ask search of > > > [[=C4=E0=F2=E0:=3D13.04.2007]] > > > where Aaoa is a Date in Russian, like: > > > [[Date:=3D13.04.2007]] > > > > > > returns nothing. Yet, the page with such property value exists in > > > the wiki.. > > > > > > The property also has it's own definition page (of course), which > > > states (in Russian) that it's a special one and it's type belongs > > > to standard type "Date" - there are mouseover popup hints. I guess > that > > > means that property has been defined correctly? > > > > > > I guess that SMW tables aren't initialized during the XML import for > some > > > reason? > > > Dmitriy > > > > > > > > > > ------------------------------------------------------------------------- > > > This SF.net email is sponsored by: Splunk Inc. > > > Still grepping through log files to find problems? Stop. > > > Now Search log events and configuration files using AJAX and a > browser. > > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > > _______________________________________________ > > > Semediawiki-devel mailing list > > > Sem...@li... > > > https://lists.sourceforge.net/lists/listinfo/semediawiki-devel > > > > -- > Markus Kr=F6tzsch > Institut AIFB, Univers=E4t Karlsruhe (TH), 76128 Karlsruhe > phone +49 (0)721 608 7362 fax +49 (0)721 608 5998 > ma...@ai... www http://korrekt.org > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Semediawiki-devel mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semediawiki-devel > |
From: Markus <ma...@ai...> - 2007-11-23 08:49:41
|
Good to hear that at least the XML-import+SMW-refresh finally worked. The=20 design of MediaWiki is very fragile in many places, and I fear that there a= re=20 much more non-common cases where extensions do not work as expected (e.g. d= ue=20 to the combination of global and non-global objects everywhere in the code). Some minor remarks follow. On Freitag, 9. November 2007, Sergey Chernyshev wrote: > Yes, I ran SMW_refreshData twice - first with -p and second without. > The problem I ran into is that Property page complained like this: > > PHP Fatal error: Call to a member funct > ion getText() on a non-object in /<path to mw>/extensions/SemanticMediaWi= ki > /includes/articlepages/SMW_PropertyPage.php on line 68, referer: http://<= mw > base url>/index.php?title=3DSpecial%3AAllpages&from=3D&namespace=3D102 > > so I enabled SQL debug and looked at the queries and realized that only f= ew > of the pages that were returned by SMW::getAllPropertySubjects had entri= es > in mw_page (hmm, it seems that I got you confused saying that I lacked > entries in mw_smw_attributes - looks like I got them referencing wrong ids > or non-existing pages). Ah, now I see the problem: refreshing all data will only ever delete the da= ta=20 related to existing subjects. If for some reason there are entries of=20 annotations for articles that do not exist, then these are not fixed by any= =20 amount of refreshing. This is what happened in the above case (the title=20 object did not exist). I have now extended the storage implementation to catch this case, but we=20 should also have some script that resets the SMW-tables completely. =20 > > I'm thinking of dropping all SMW tables and re-running the SMW_Setup.php > and then SMW_refreshData twice. Do you think is a right approach to rebui= ld > stuff from scratch?=20 Yes, that should work. > BTW, is it OK to split SMW_refreshData task to several=20 > tasks and run them simultaneously for better use of multiple CPUs I have? You can run several instances with different page IDs to start refreshing, = but=20 you cannot currently tell them to stop at some fixed ID other than by editi= ng=20 the script. Doing this may improve performance if CPU is a bottleneck for y= ou=20 (in some cases, DB bandwidth or working memory may be the bottleneck), and = if=20 your OS really distributes sub-processes between the CPUs (my observation i= s=20 that a single wiki, even if processing many requests in parallel, often use= s=20 only one of our server CPUs; this may be related to the single mysql-server= =20 that creates DB-processes; anyway it is handy since a high-load wiki doesn'= t=20 ever lock the whole server but only one CPU). Markus > > Sergey > > On Nov 9, 2007 7:11 AM, Markus Kr=F6tzsch <ma...@ai...> wro= te: > > On Donnerstag, 8. November 2007, Sergey Chernyshev wrote: > > > Not sure if it's related to this issue, but I also lost some data in > > > smw_attributes table (not all of it though). The worst part is that it > > > didn't reappear after I ran complete SMW_refreshData on the dataset. > > > I wonder what needs to be done to repopulate SMW tables from scratch? > > > > Running SMW_refreshData twice (once with option -p and once without; > > option -v > > may also be interesting but not essential) will restore all available > > data in > > basically all cases. If the table remains incomplete, this means that t= he > > content of the pages does no longer require certain entries there. This > > may > > have various reasons: > > > > * The table contained old orphaned entries before, maybe due to some bug > > in > > earlier versions. > > * The table contained outdated data (e.g. after some template change) > > that just had not been refreshed yet. > > * Some annotation is no longer accepted, maybe due to (unintentional) > > syntactic changes, or due to known limitations such as the disabled > > Type:Boolean. > > > > Only case 3 should bother you, and in this case more information is > > needed: > > what exactly is it that is missing? > > > > But in any case SMW_refreshData (at least in theory) suffices to recrea= te > > all > > SMW data from scratch or from import. Anything not built there will not > > be built when editing pages normally either. > > > > Markus > > > > > Sergey > > > > > > On Nov 8, 2007 8:26 AM, cnit <cn...@un...> wrote: > > > > > Yes, this appears to be a bug. For a quick workaround, consider > > > > using > > > > > > the > > > > > > > > > formats "list", "ul" or "ol", all of which also support the > > > > > template-parameter for formatting (and this one certainly works > > > > > with > > > > > > > > SMW1.0). > > > > > > > > > Note that with list, you can also choose the separator between > > > > > items (parameter sep), so as to simulate "template" quite well. > > > > > > > > Thanks for a hint, but it seems that the problem is deeper. Even > > > > after the successfully importing XML dump, where > > > > <page>Attribute:..</page> > > > > were replaced with > > > > <page>Property:..</page> > > > > > > > > and also these pages were placed on the top of the dump, to make su= re > > > > properties are defined before importing the pages where actual > > > > values of properties are used.. > > > > > > > > But.. my smw_attributes table is empty :-( I think it's not > > > > correct, because I have at least two properties and many user pages > > > > that use them.. > > > > > > > > My first guess was: "that might be because the datetime class was > > > > completely rewritten, and the new version doeesn't accept Russian > > > > format of dates". But, I've made a simple test and it seems that > > > > > > > > $this->m_time =3D strtotime(trim($value)); > > > > > > > > converts Russian formatted date > > > > strtotime("13.04.2007") > > > > to correct value. > > > > > > > > There is a page, which uses Date property with such value, yet, the > > > > manual Special:Ask search of > > > > [[=C4=E0=F2=E0:=3D13.04.2007]] > > > > where Aaoa is a Date in Russian, like: > > > > [[Date:=3D13.04.2007]] > > > > > > > > returns nothing. Yet, the page with such property value exists in > > > > the wiki.. > > > > > > > > The property also has it's own definition page (of course), which > > > > states (in Russian) that it's a special one and it's type belongs > > > > to standard type "Date" - there are mouseover popup hints. I guess > > > > that > > > > > > means that property has been defined correctly? > > > > > > > > I guess that SMW tables aren't initialized during the XML import for > > > > some > > > > > > reason? > > > > Dmitriy > > > > -----------------------------------------------------------------------= =2D- > > > > > > This SF.net email is sponsored by: Splunk Inc. > > > > Still grepping through log files to find problems? Stop. > > > > Now Search log events and configuration files using AJAX and a > > > > browser. > > > > > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > > > _______________________________________________ > > > > Semediawiki-devel mailing list > > > > Sem...@li... > > > > https://lists.sourceforge.net/lists/listinfo/semediawiki-devel > > > > -- > > Markus Kr=F6tzsch > > Institut AIFB, Univers=E4t Karlsruhe (TH), 76128 Karlsruhe > > phone +49 (0)721 608 7362 fax +49 (0)721 608 5998 > > ma...@ai... www http://korrekt.org > > > > -----------------------------------------------------------------------= =2D- > > This SF.net email is sponsored by: Splunk Inc. > > Still grepping through log files to find problems? Stop. > > Now Search log events and configuration files using AJAX and a browser. > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > _______________________________________________ > > Semediawiki-devel mailing list > > Sem...@li... > > https://lists.sourceforge.net/lists/listinfo/semediawiki-devel =2D-=20 Markus Kr=F6tzsch Institut AIFB, Univers=E4t Karlsruhe (TH), 76128 Karlsruhe phone +49 (0)721 608 7362 fax +49 (0)721 608 5998 ma...@ai... www http://korrekt.org |
From: S P. <in...@sk...> - 2007-12-05 00:57:41
|
Thomas Bleher wrote: >> I really think that SMW requires a better documentation on new >> formats of queries, #ask and subqueries. Because the only >> documentation I've used is outdated: >> http://meta.wikimedia.org/wiki/Help:Substitution >> e.g. no new features, no subqueries here and so on.. > > ??? This page mentions SMW, but it's hardly related to it. > Have you looked at ontoworld.org or http://semantic-mediawiki.org/? Specifically, http://semantic-mediawiki.org/index.php/Help:Semantic_search for the query syntax, and http://semantic-mediawiki.org/index.php/Help:Inline_queries for the parameters to <ask>. > I agree that the wiki pages there need improvement, Never not the case ;-) > and hopefully that > will happen once 1.0 is released I've documented many features in SMW 1.0 pre-alpha on ontoworld.org, using Template:SMW_prototype_feature to separate them from 0.7. But not #ask, it's newer still. I did not know until now that the download link on SourceForge provides semediawiki-1.0-RC2 -- --> *Congratulations all* !! Therefore a new user will get 1.0, therefore there's no need to maintain 0.7-specific information. That should simplify the help a lot, though #ask documentation should still use {{SMW prototype feature}} until the SourceForge download has an implementation. > But > such documentation doesn't write itself. Maybe you can rework the wiki > pages on semantic-mediawiki.org with the things you have already learned > about SMW 1.0. semantic-mediawiki.org has restricted access. It has a copy of the ontoworld.org help files, I think from around November 28 2007. Anyone can edit ontoworld.org/wiki/Help: pages and someone may pick up their edits for the more official documentation; but that someone won't be me until mid-December. Regards, -- =S Page |
From: Markus <ma...@ai...> - 2007-12-11 17:47:27
|
On Mittwoch, 5. Dezember 2007, S Page wrote: > Thomas Bleher wrote: =2E.. > > semantic-mediawiki.org has restricted access. =20 This was done as part of our start-up phase, so as to not make it into anot= her=20 (confusing) testing site before even having a basic structure. We still=20 wonder whether or not we should open it for editing (pro: people could=20 contribute, its wiki-style; contra: it could again develop into a=20 ontoworldish collection of semi-official docus, demo pages, and tests of=20 (partly nonexistent) features that we would have to watch all day). I=20 normally don't expect the documentation and homepage of an open source tool= =20 to be written by all users, but then there is the wiki-way ... hard questio= n.=20 =2D- Markus > It has a copy of the=20 > ontoworld.org help files, I think from around November 28 2007. Anyone > can edit ontoworld.org/wiki/Help: pages and someone may pick up their > edits for the more official documentation; but that someone won't be me > until mid-December. > > Regards, > -- > =3DS Page =2D-=20 Markus Kr=F6tzsch Institut AIFB, Univers=E4t Karlsruhe (TH), 76128 Karlsruhe phone +49 (0)721 608 7362 fax +49 (0)721 608 5998 ma...@ai... www http://korrekt.org |