Ludwig pointed out an issue: the "Home" link of the locator (requires $cf['locator']['show_homepage'] == 'true', what's the default) points to the first page, even if it is unpublished. I would say that's a bug. If the first page is hidden, it is also shown as "Home", but this might be regarded as a feature -- what do you think?
I have investigated a bit: this part of the locator() function hard-codes the page index as zero, what stems directly from the classic CMSimple where this was okay, because unpublished pages were removed from the page arrays ($c, $h, $u etc.) As this is not the case for CMSimple_XH, the zero has to be replaced by the page index of the first published page[1]. I tried to use $_XH_firstPublishedPage (which has been introduced with XH 1.6.3), but the variable doesn't recognize the page_params settings (to avoid the core depending on a particular plugin).
I'm not sure how to solve this issue. I see the following options:
- make $_XH_firstPublishedPage aware of the respective page_params setting, and use it in locator()
- leave $_XH_firstPublishedPage alone, but check for the respective page_params setting in locator()
- declare it as WONTFIX, or, more appealingly, a feature (at least for XH 1.6.x)
[1] Interestingly, there had been versions (e.g. r32) which didn't use a hard-coded zero. Not sure why.
Christoph