Forum:Subpage links in Form:Person

Robin has reported that the "create/update sensor page" link is sometimes missing from the Form:Person. This leads to a review of the logic, and some test.

The logic in the form works is implemented in showfacts formbuttons via these cases:
 * 1) if the page doesn't exist (test with an SMW query for Property:Modification date), show the links for "simple" and "advanced" forms (since it is futile to create the subpages before the main page).
 * 2) otherwise (the page exists) so show the links for "simple" and "advanced" forms, and then:
 * 3) *check (SMW query) that Property:Sex is set. If so:
 * 4) *# show "Edit children facts" (N.B. this should be removed, since partial forms no longer work)
 * 5) *#if the /sensor page exists (SMW query), show a link to Special:FormEdit, otherwise show "#formlink" to create the subpage
 * 6) * if the /tree page does not exist (SMW query), show "#formlink" to create the subpage [so no link if it exists]
 * 7) * if the /descendants page does not exist (SMW query), show "#formlink" to create the subpage [so no link if it exists]

Note that the "rename/redirect" SMW bug will cause the "SMW query" to fail in various cases.

So the "create/update sensor page" link will not appear if the SMW query says that the target page does not exist, or if the target page exists and the Property:Sex is not returned by the query.

Here are some sample cases:

Thurstan (talk) 04:27, January 3, 2018 (UTC)