in a German thread Duffy6 and Ludwig reported that the relocation (page_params: "Redirect page?") doesn't work for the start page when the installation is requested directly (i.e. without the "page URL"). Indeed, that is a bug because the relocation checks for $s (which is not properly set then in this case) instead of $pd_s.
Note that even though $pd_s is only predicted[1] it's okay to trigger the relocation preparation, because that does not do the relocation directly, but instead temporarily overwrites the respective page content. If it later (after the plugin loading) turns out that the start page hasn't been requested, the actual relocation will not be triggered.
I suggest the following patch:
Code: Select all
Index: plugins/page_params/index.php
===================================================================
--- plugins/page_params/index.php (revision 3)
+++ plugins/page_params/index.php (working copy)
@@ -38,7 +38,7 @@
*
* @return void
*
- * @global int The index of the current page.
+ * @global int The predicted index of the current page.
* @global string The script name.
* @global array The content of the pages.
*
@@ -46,7 +46,7 @@
*/
function Pageparams_handleRelocation($index, $data)
{
- global $s, $sn, $c;
+ global $pd_s, $sn, $c;
$location = $data['header_location'];
if ((int) $data['use_header_location'] > 0 && trim($location) !== '' ) {
@@ -54,7 +54,7 @@
if (!$components || !isset($components['scheme'])) {
$location = CMSIMPLE_URL . $location;
}
- if ($index == $s) {
+ if ($index == $pd_s) {
$c[$index] = '#CMSimple header("Location:'. $location .'"); exit; #';
}
}
PS: [1] "preliminary" might be the better term.