00019: $PageTitle doesn't always work right

Summary: $PageTitle doesn't always work right
Created: 2004-09-02 07:52
Status: Closed, fixed for 2.0.devel13
Category: Bug
From: Pm
Assigned:
Priority: 53
Version: 2.0.devel3
OS:

Description: The $PageTitle variable is not always set correctly. The fix for this is likely impacted by Pm's decision of how to handle per-page variable substitutions.


This bug may have been circumvented by the new handling of invalid page names in PITS:00013. Thus I need examples/reports of places where $PageTitle isn't working properly before I can fix it. --Pm


An Example

I set my $WikiTitle variable in local/config.php like this:

$WikiTitle = "Ricardo Cezar";

The title of my webpage look like this:

Ricardo Cezar - $HTMLTitle


Same Problem here with version 2.0:devil16.

I set my $WikiTitle wariable in local/config.php too. ($WikiTitle = "ApfelWiki.de"; I modified the myskin.tmpl in the html tag <title> replacing the existing $HTMLTitle with $PageTitle.

The title of the page looks like this:

ApfelWiki.de - $PageTitle


Possible Solution?

 <title>$WikiTitle | $Groupspaced | $Titlespaced</title>

or

 <title>$WikiTitle | $Group | $Title</title>

''If I'm right, and $PageTitle is no longer supported, then someone should make a note of this in the sections: Template Making, and Differences between version 1 & 2.

--StevenLeite

AFAICT, $PageTitle never existed in PmWiki 1--it was introduced in the early versions of 2.0.devel and then abandoned. So it probably shouldn't appear as a "difference" from version 1.

The correct mechanism for controlling the page title is now by placing a title tag into the page template itself.

--Pm

Array
(
    [post_max_size] => 64M
    [$_POST keys] => 
    [$_REQUEST keys] => n
    [$_SERVER] => Array
        (
            [CONTEXT_DOCUMENT_ROOT] => /home/pmwiki/public_html
            [CONTEXT_PREFIX] => 
            [DOCUMENT_ROOT] => /home/pmwiki/public_html
            [GATEWAY_INTERFACE] => CGI/1.1
            [HTTPS] => on
            [HTTP_ACCEPT] => */*
            [HTTP_ACCEPT_ENCODING] => gzip, br, zstd, deflate
            [HTTP_HOST] => www.pmwiki.org
            [HTTP_USER_AGENT] => Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
            [HTTP_X_HTTPS] => 1
            [PATH] => /bin:/usr/bin
            [PHP_INI_SCAN_DIR] => /opt/cpanel/ea-php70/root/etc:/opt/cpanel/ea-php70/root/etc/php.d:.
            [QUERY_STRING] => n=PITS%2f00019
            [REDIRECT_HTTPS] => on
            [REDIRECT_QUERY_STRING] => n=PITS%2f00019
            [REDIRECT_SCRIPT_URI] => https://www.pmwiki.org/wiki/PITS/00019
            [REDIRECT_SCRIPT_URL] => /wiki/PITS/00019
            [REDIRECT_SSL_TLS_SNI] => www.pmwiki.org
            [REDIRECT_STATUS] => 200
            [REDIRECT_UNIQUE_ID] => afLrjklBeGlfMhk_4EBkogAAANc
            [REDIRECT_URL] => /wiki/PITS/00019
            [REMOTE_ADDR] => 216.73.216.25
            [REMOTE_PORT] => 32844
            [REQUEST_METHOD] => GET
            [REQUEST_SCHEME] => https
            [REQUEST_URI] => /wiki/PITS/00019
            [SCRIPT_FILENAME] => /home/pmwiki/public_html/index.php
            [SCRIPT_NAME] => /index.php
            [SCRIPT_URI] => https://www.pmwiki.org/wiki/PITS/00019
            [SCRIPT_URL] => /wiki/PITS/00019
            [SERVER_ADDR] => 23.254.203.248
            [SERVER_ADMIN] => webmaster@pmwiki.org
            [SERVER_NAME] => www.pmwiki.org
            [SERVER_PORT] => 443
            [SERVER_PROTOCOL] => HTTP/1.1
            [SERVER_SIGNATURE] => 
            [SERVER_SOFTWARE] => Apache
            [SSL_TLS_SNI] => www.pmwiki.org
            [TZ] => America/Los_Angeles
            [UNIQUE_ID] => afLrjklBeGlfMhk_4EBkogAAANc
            [PHP_SELF] => /index.php
            [REQUEST_TIME_FLOAT] => 1777527694.5807
            [REQUEST_TIME] => 1777527694
            [argv] => Array
                (
                    [0] => n=PITS%2f00019
                )

            [argc] => 1
        )

)