Subscriber update preferences screen is blank

I have a fresh install of phplist and it all is working fine except when a subscriber clicks on the email link to Update Preferences it goes to a blank white screen.

Here is the page source code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate" />
<meta name="License" content="GNU Affero General Public License, http://www.gnu.org/licenses/agpl.html" />
<meta name="Author" content="Michiel Dethmers - http://www.phplist.com" />
<meta name="Copyright" content="Michiel Dethmers, phpList Ltd - http://phplist.com" />
<meta name="Powered-By" content="phpList version 3.4.4" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="SHORTCUT ICON" href="./images/phplist.ico" />

Update: If there is no UID then the screen comes up asking for an email address.
www.mydomain.com/lists/?p=preferences

as opposed to www.mydomaian.com/lists/?p=preferences&uid=50bab840a8072b4bcbbacd499a44673c

Hello @rgjerde and welcome to the forum!

Have you edited the public page templates at all to change them from default? Are you running the latest version of phpList from the Automatic Updater / Sourceforge?

There were some jQuery related issues some months ago which caused public pages to be blank but they were resolved a few releases back. If you inspect the page source code and find that the HTML body tag has a CSS class which makes it invisible, then it’s jQuery related.

Hello,

same issue, but with subscribe page. Source code end with this line:

<link rel="SHORTCUT ICON" href="./images/phplist.ico" />

no body tag
I haven’t edited public page template
I’m running last version 3.4.6, just installed, from Sourceforge
PHP 5.3.3

:white_check_mark: This also solved my issue:

Thank you @duncanc

I finally spent the afternoon working on this and figured out the problem. index.php was never able to include subscribelib2.php because of an error on line 910 in subscribelib2.php:

} elseif (!isset($_POST["subscribe"]) && isset($_GET['htmlemail']) && in_array($_GET['htmlemail'], [1,0])) {

The [1,0] was the problem. I’m not a php programmer and my list isn’t actually running that function, but I’m guessing this code is a workaround:

} elseif (!isset($_POST["subscribe"]) && isset($_GET['htmlemail']) && (in_array($_GET['htmlemail'], 0) or in_array($_GET['htmlemail'], 1))) {

@rgjerde Your change isn’t actually correct but might not matter. A mistake was introduced earlier this year in this change that assumes the php version is at least 5.4 (which supports the [0, 1] short array syntax).

But you should really be running an up to date version of php, yours is years out of date, is no longer supported and probably has security issues.

Thanks, I updated php for all my domains except one running an old version of phpBB2. Is there a better way to fix that line of code where I can’t upgrade php?

Just change [1, 0] to array(1, 0)

1 Like