Page MenuHomePhabricator

Pages without wiki content in query results ("ghostpages")
Closed, DeclinedPublic


Author: dasch

When querying for a namespace also pages are displayed that whre deleted or even never existed and only whre linked once, the whole query behaves very strange. I hope the example here is enough to reproduce the problem

Version: unspecified
Severity: normal



Event Timeline

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

This is normal behaviour, but I agree that it can be confusing. SMW creates internal objects as soon as they are used in any annotation, and these objects are never deleted. I am aware that this can be confusing, but it is necessary to correctly handle queries that ask for the existence of annotations. E.g. the query [[property::+]] returns all pages that have some value for "property" even if this value is a page that does not exist yet.

This makes some sense: an annotation [[property::pagename]] assigns the value "pagename" even if there is no page of that title yet. This is the reason why the semantic object "pagename" must exist even if there is no wiki page. If you only want to retrieve existing pages, you can query for [[Modification date::+]].

To improve SMW's behaviour here, the internal query construction would need to be changed so that top-level namespace queries are extended with additional side-conditions that restrict results to existing pages.

  • Bug 29892 has been marked as a duplicate of this bug. ***
  • Bug 42896 has been marked as a duplicate of this bug. ***

Some further clarification. This problem really has two distinct aspects. The first is described above: a page that is used as a value must "exist" as an SMW object, even if it has no wiki page. The second aspect is that SMW does not have any effective cleanup functionality to remove objects that were needed once but are no longer needed now. This means that page objects will still "exist" after removing all properties that point to them, and deleting their wikipage.

In a sense, these could need two distinct solutions, but they are still closely related. Basically, page objects of the first type can only be filtered out if there is some additional check in the query that makes sure the page exists. Page objects of the second type could also be removed from the database entirely, since they are not needed by SMW any more. However, I suppose that most users are more interested in a solution for the first case (which would also solve the second case; but not the other way around).

  • Bug 46729 has been marked as a duplicate of this bug. ***
Aklapper added a subscriber: Aklapper.

The Semantic MediaWiki developers requested in to move their task tracking to and to close remaining tasks in Wikimedia Phabricator. If you still face the problem reported in this task in a supported version of SMW, please feel free to transfer your report to . We are sorry for the inconvenience.