after upgrading to v3.3.7 i receive a “The pageroot in your config does not match the current location” warning in every admin page.
Everything seems to work as usual.
$pageroot is defined as “/” as it was before (and it should be correct).
Is there any way to fix this issue?
If phplist is installed in the web root directory then $pageroot should be simply an empty string, not ‘/’. When phplist constructs URLs there will probably be double ‘/’ characters.
now is $pageroot ="" and the warning disappeared.
It worked as “/” for several years so I was quite confident it was correct
@utz.paolo When phplist creates links for click tracking
$clicktrack_root = sprintf('%s://%s/lt.php', $GLOBALS['public_scheme'], $website.$GLOBALS['pageroot']);
if $pageroot has your original value then that URL will have an extra ‘/’ before ‘lt.php’, something like
https://mysite.com//lt.php
ok, thanks a lot. I’m not using click tracking so I guess that’s why I never noticed the error.
I ran into this same problem when upgrading from 3.3.1 to 3.3.7. That’s fine that a change was made in the code, but mention should be made in the upgrade documentation that the behavior has changed and that anyone who had “/” as their pageroot will need to remove the slash due to the coding change. Like the OP, my pageroot has been “/” for years, so yes, this is a behavior change.
@Suela Suela, please can you update the release information for 3.3.7 https://www.phplist.org/newslist/3-3-7-release-notes/ to include this change? Add this to the Fixes section:
Ensure that a warning is issued when the config $pageroot
value does not match the actual URL. This includes when phpList is installed in the web root directory and $pageroot
is set to '/'
. In this case $pageroot
should be set to an empty string, ''
.
Thanks for pointing it out @duncanc. Release notes are now updated.
Thanks, this helped me—but I do consider this a bug that should be fixed in the code (not the documentation), as ‘/’ is actually the correct path for installations in the DocRoot.
@born2webdesign this problem should be fixed in the next release of phplist by allowing either '/'
or ''
as $pageroot when phplist is installed in the web root directory