Using Preferences Page Changed HTML/text format Setting Without Being Asked To

I have used phpList for years. Yesterday I did a fresh install of phpList 3.2.7. I sent myself a test email (as if it was a real campaign). From the email message in my inbox, I clicked on the link in the footer “To change your details and to choose which lists to be subscribed to, visit your personal preferences page.” That page showed my three newsletters and that I was subscribed to all three. The “I prefer to receive emails in Text format” was unchecked, as was intended.

I unchecked one of the newsletters to test unsubscribing and clicked "Update." Then I got this message from the system since I’m admin:

-myemail.address- has changed their information

htmlemail = 0
changed from 1

List Membership:
-name of one of my lists-

Note: I did not ask to change that setting. I had unchecked one of my subscriptions only.

Then I got this message as the subscriber:

This message is to inform you of a change of your details on our
newsletter database

You are currently member of the following newsletters:

 -name of one of my lists-
 -name of one of my lists-

[The list I unsubscribed from was not included in this list, as was intended, since I unsubscribed from it, so at least that worked.]

The information on our system for you is as follows:

Email address : -myemail.address-
Send HTML email : No

If this is not correct, please update your information at the following
location: -repeated preferences link-

Well, that was NOT correct since I did not select to change to text-only emails, so I followed the preferences link again and found this time the “I prefer to receive emails in Text format” was checked, so I unchecked it and submitted the form. The change did not take! As admin I got:

-myemail.address- has changed their information

No user system details changed

List Membership:
-name of one of my lists-

As subscriber I got:

This message is to inform you of a change of your details on our
newsletter database

You are currently member of the following newsletters:

-name of one of my lists-
-name of one of my lists-

The information on our system for you is as follows:

Email address : -myemail.address-
Send HTML email : No

If this is not correct, please update your information at the following
location:…

I tried again and still the system would not change the HTML/text setting. I had to do it manually from the Manage Subscribers admin page.

Seems like a bug. How can I make sure this doesn’t happen to any of my real subscribers?

1 Like

@webpotato Looks to be a bug as I can repeat the problem.

Do you remember from which version of phplist you upgraded, just to try to narrow down when something was changed?

Hello, Thanks for looking into this. It was a fresh install.

Update 01/31/2017: Here’s another observation, if it helps. I opened the subscribe page and looked at the source. So, the web page shows the checkbox not checked. The source shows the value of the input value="1"

Isn’t “1” considered on or checked? Not sure why the checkbox looks unchecked but maybe when the form is submitted the value “1” is sent? Or am I just displaying how bad I am at this.

I’m going to change some settings and see if it behaves any differently.

@webpotato I think that the subscribe page handles the checkbox correctly, it was only the preferences page that was wrong. The bit of html

<input type="checkbox" name="textemail" value="1" id="textemail" /></span>
means send the field textemail with a value of 1 when the checkbox is checked, i.e. for the person selecting text format emails. If the checkbox is unchecked then nothing is sent.

@duncanc Hi, me again but on another topic.
I have actually the same misbehaviour in my fresh install of 3.3.3. Can you please tell me where to copy the correct code you mentioned in your reply? Thanks again.

Edit: Found it in “subscribelib2.php” with the following code in line 888:
<input type=“checkbox” name=“textemail” value=“1” %s id=“textemail” />
Is this already the correction? However, I have the fault described above in detail.

@Dain The problem doesn’t appear to have been fixed yet. The code that you highlighted isn’t the problem though.

1 Like

@duncanc Ok, thanks. I switched to radio buttons that works well.