Page MenuHomePhabricator

SF's 'Page has default form' and 'Creates pages with form' special properties don't work
Closed, ResolvedPublic

Description

Semantic forms defines four special properties, and it looks like the two of them that aren't specially handled by SMW, i.e. 'Page has default form' and 'Creates pages with form', aren't working - calling $store->getPropertyValues() on them doesn't return anything.

Of these two properties, 'Page has default form' is very easy to test - you can just put the following on any page:

[[Page has default form::form-name]]

...and if "form-name" is an actual form, an "edit with form" tab should appear on that page.


Version: unspecified
Severity: normal

Details

Reference
bz22717

Event Timeline

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

How should SMW know which properties SF needs? Extensions have to introduce the properties they want to have pre-defined by themselves, or otherwise SMW would need to include all properties that are used in extensions. So it is not a bug if SMW does not know all SF properties.

The two properties that SMW knows of have been introduced since they were requested so frequently that we decided to make them "special" at some point. This can possibly be done with other properties as well, though the overall amount of such properties is limited. Also, making an existing property special in this sense will require all pages with that property to be re-stored to be able to access the data. Not sure if this is even wanted.

But if you think that some properties of SF are so frequently used that they need special handling, feel free to file a feature request for them (including the datatype and internal ID used for the properties).

I'm re-opening this bug; I think you misunderstood the issue. SF defines all four properties, just as it always has: the issue is that the two that are mentioned here worked with SMW 1.4.3, but they don't work with SMW 1.5; and I assume that's somehow due to the fact that SMW has special handling for the other two. I'm not request special handling for the other two, just that they work.

Fixed. The problem occurred because the properties use a special datatype (stored separately in SMW for faster access) while the properties as such have not been special. This requires SMW to do another DB lookup to find the property name, where this lookup is not done by default since properties with special datatypes typically are known to SMW already. It may actually be faster to avoid this extra lookup and go for the normal table instead, using the type '_wpf' instead of '__spf' for Form pages. Changing this of course will prevent SMW from finding existing values which have been stored to the special table earlier.