Page MenuHomePhabricator

Subpages do not get indexed
Closed, InvalidPublic

Description

Author: jorisaerts

Description:
When I'm adding subpages or pages in different then the default namespace, they won't be displayed when querying.

For example when having these pages with [[Category:Part]]
Part1
ListofParts/Part2
Stuff:Part3
Stuff:ListofParts/Part4

"[[Stuff:+]]" Will display Part3 and Part4 (and all other pages in that namespace)

"[[Category:Part]]" Just displays Part1 (Instead of Part1/Part2/Part3/Part4)

"[[Stuff:+]] [[Category:Part]]" Doesnt display anything (Instead of Part3+Part4)

The semantic forms extension allows adding data as subpage and in a fixed namespace so I guess there are supposed to be supported?


Version: unspecified
Severity: normal

Details

Reference
bz15424

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:23 PM
bzimport set Reference to bz15424.

When reporting bugs, please add the usual details: SMW version, MW version, URL, reproducible? Otherwise it is not possible to fix your problem.

jorisaerts wrote:

MediaWiki 1.13.0 (r39942)
PHP 5.2.2-0.dotdeb.1 (apache2handler)
MySQL 5.0.32-Debian_7etch5-log

Semantic MediaWiki (Version 1.2.1)
Semantic Forms (Version 1.2.9)

It's on a private wiki so I can't add a url.
It occures with every page and property I try.

jorisaerts wrote:

It appears it only happens on custom namespaces. When using the same form for User:Foo it works, while Stuff:Bar doesn't.

There have been cases where semantic information in SMW 1.2.1 was stored wrongly, and this can well be the reason for your problem. Update to SMW 1.2.2 (simply drop in the new files). To fix you database, try running the following maintenance scripts (see SMW/maintenance/README for details):

SMW_refreshData.php -vftp
SMW_refreshData.php -v

If your wiki is larger than 2000 pages, use parameters -s and -e to apply the script to smaller chunks of pages at a time (PHP may leak memory on long runs). Your wiki's data will be rebuild afte rcompleting these scripts. Touch LocaLSettings.php to clear all caches afterwards.

It just strikes me that there might be another reason: SMW has a list of namespaces for which semantic data is accepted *at all*. If you added a custom namespace, then maybe you did not enable semantics for this namespace. Add something like

$smwgNamespacesWithSemanticLinks[YOUR_NS_NUMBER] = true;

to your LocalSettings. Updating to SMW 1.2.2 then is probably not needed (I think the main causes of problems have ben fixed in SMW 1.2.1 already, 1.2.2 was rather minor). But you still may have to run

SMW_refreshData.php -v

once to read in your Stuff: pages (note that the two runs with parameters as above are not needed then).

This appears to be a very likely cause for the problem and I close this bug for now. Reopen it if needed.

jorisaerts wrote:

Thank you very much. that solved the problem. Sorry for bothering you.