01276: Titled link parsed to TitledLink when linked page doesn't exist yet

Summary: Titled link parsed to TitledLink when linked page doesn't exist yet
Created: 2012-01-02 03:20
Status: Closed - replied
Category: Bug
From: Gregor?
Assigned:
Priority: 4
Version: 2.2.36
OS: Linux, PHP 5.x.x

Description: When I link to a page called "PageName" like this
[[Page name | + ]]
and the page PageName doesn't exist yet, the result is
PageName?

I would expect the result to be Page name though,

since the result of linking to the same page like this
[[Page name]]
is
Page name?

The convention is that if the page doesn't contain a (:title:) directive, the title will be the page "name". And a link [[Page name]] will lead to a page which "name" is "PageName". --Petko January 02, 2012, at 05:27 AM

If I wanted to do the change localy for my installation, which function would I have to change to make the [[Page name | + ]] behave the same as [=[[Page name]] in case that the page is missing? --Gregor January 10, 2012, at 06:40 AM

There is a $TitleSpaced page variable which shows the page title when one is set from the directive (:title ...:) and the "spaced page name" when a page doesn't exist or when its title directive is not set. You can enable it for the link|+ markup by adding such a line to config.php:

  $FmtPv['$Title'] = 'FmtPageTitle(@$page["title"], $name, 1)';

Petko January 10, 2012, at 08:10 AM

See also $EnableLinkPlusTitlespaced.