Attribute Defaults not Entered DB

Once you've installed phpList Version 2... ask questions here!
Forum rules
Please help the volunteers to help you by supplying the version of phpList you are using, browser & version and if possible, a link to your phpList installation. This is for Version 2 of phpList (the orange one).

Attribute Defaults not Entered DB

Postby robpet » 7:03pm, Sat 04 Aug, 2007

Sorry, I originally posted this in Answers, Tips and Tricks... I guess that's what you get for asking questions late at night...

Anynow, I have set up a new instance of PHPList (I have 'sort of' used one before), but this one is kind of important.

I have installed it, and imported almost 9000 members. the problem is, as I test the signup and check the attributes, the content is not added properly. I have even set it up to use some default values, but they don't show up at all.

For example, I have a Radio button list, and instead of "Yes" showing in the database, I get the number 1. In a select list to get some user habits, there is no value coming up at all...even though the select list starts with a particular value. Shouldn't that come up as the chosen selection if it's not changed? Instead, in phplist_user_user_attributes, it comes up blank...

Has anyone seen this before? Am I doing something wrong?

Please help.


Thanks


rob
robpet
PL Nut
 
Posts: 23
Joined: 3:48am, Wed 25 Oct, 2006

Postby H2B2 » 3:15pm, Sun 05 Aug, 2007

Possibly related to this bug report: http://mantis.phplist.com/view.php?id=4215

Still, it should have been fixed in ver. 2.10.4. So if you're using 2.10.4 and if this bug still applies, you could add a feedback note to the above bug report.
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Postby robpet » 5:53pm, Sun 05 Aug, 2007

Thanks for the tip, I will work on it, and see how I do.

Just as an FYI, I am using 2.10.4, and when I tried to sign up in the other forum to post a feedback note, the page went blank, and I never received the email to confirm myself...

Also, I noticed that that page has a way to purge memberships if they are not confirmed within seven days... I assume it uses PHPList, and there is a way to do that? I'll check the forums further, unless you have a quick two second tip...


Thanks


rob
robpet
PL Nut
 
Posts: 23
Joined: 3:48am, Wed 25 Oct, 2006

Postby robpet » 12:17am, Mon 06 Aug, 2007

So I checked what that suggestion recommended, and the coding is slightly different.

Instead of seeing:

if (isset($_POST[$fieldname]))
and
else if (isset($data[$attr["id"]]))

all I had were:

if ($_POST[$fieldname])
and
else if ($data[$attr["id"]])

I changed them to:

if ($_POST[$fieldname] != 0)
and
else if ($data[$attr["id"]] != "")
respectively, but no luck. I still have numbers instead of text in radio buttons and select lists being added to the database.

I am using 2.10.4, so I don't think the fix is actually working correctly. Doesn't anyone else have this problem?

Does anyone have any suggestions in order to make this work? I need to send a message, and I have to use one of these fields as a criteria for who should receive it...


Thoughts?

Thanks



rob
robpet
PL Nut
 
Posts: 23
Joined: 3:48am, Wed 25 Oct, 2006

Postby robpet » 4:43am, Mon 06 Aug, 2007

Well, I think I got it, by bastardizing the code.

In subscribelib2.php, on line 829 I changed
Code: Select all
$value["name"],$fieldname,$value["id"],$checked);


to
Code: Select all
$value["name"],$fieldname,$value["name"],$checked);


and also on line 846 I changed

Code: Select all
$output[$attr["id"]] .= sprintf('<option>%s',$value["id"],$selected,stripslashes($value["name"]));


to

Code: Select all
$output[$attr["id"]] .= sprintf('<option>%s',$value["name"],$selected,stripslashes($value["name"]));


Now in the source code of the signup page, you see the actual values, and it will enter that into the database. Unfortunately, when you go to update your preferences, it doesn't pull out the values correctly...so I have to hope those updating will actually really update...

I tried to add a feedback note again in the referenced bug fix area, but the problems I mentioned earlier persist.

I would still like to see this problem fixed, because this is not working just right. It will pass for now, at least.

Thanks


rob
robpet
PL Nut
 
Posts: 23
Joined: 3:48am, Wed 25 Oct, 2006

Postby H2B2 » 2:26am, Mon 13 Aug, 2007

There is a report update in http://mantis.phplist.com/view.php?id=4215 you may want to see.
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006


Return to Question & Problems - after installing

Who is online

Users browsing this forum: No registered users and 2 guests