NOTE:: Before reporting an issue, make sure you are running the latest version, currently 3.3.1

View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015285phplist applicationSubscribe Processpublic12-05-09 02:2713-11-14 12:41
PlatformOSOS Version
Product Version2.10.10 
Target Version2.10.11Fixed in Version2.10.11 
Summary0015285: v2.10.10: Attributes' order of listing on subscribe page cannot be saved
DescriptionWhen changing the order of listing on the 'edit a subscribe page' (lists/admin/?page=spageedit&id=1) by entering numbers starting from 0 in the attribute's "Order of Listing:" fields, and clicking on either the 'Save changes' or 'Save and activate' buttons, the entered values blank out and nothing is changed on the subscribe page.
Additional InformationIssue reported by spidersilk: [^]

Confirmed on my system:
 phplist 2.10.9
 PHP 5.2.3
 MySQL 4.1.12
TagsNo tags attached.
Attached Files

- Relationships
related to 0015612resolvedmichiel Attributes' order of listing on subscribe page cannot be saved (not fixed in 2.10.13) 
related to 0017532resolvedmichiel problems with default value: select not being default on subscribe page 
child of 0015369resolvedmichiel 2.10.10 initial patches 

-  Notes
h2b2 (manager)
12-05-09 03:39

Correction: my test system is running 2.10.10, not 2.10.9
meeble (reporter)
17-05-09 23:59


When editing a subscription page, neither "order of listing" nor "Is this attribute required?" settings are being saved when hitting "Save" or "Save and Activate".
ripls (reporter)
19-05-09 03:05

Upgraded today to 2.10.10 and having the same problem with attributes. Can't delete them, change order (see below)or make required fields. Saving the settings does not take effect.

Can re-order attributes in attributes area, but not on subscribe page setup.
davman (reporter)
20-05-09 14:06

The problem is not only this.
The system doesn't recognise the required attributes and doesn't store in db the corrected values

To solve all this 2 bugs there's a little work to to waiting for the correct fixed version:

Create attributes with gui as usual
Edit with phpmyadmin or similar the table "phplist_user_attribute"
and put "1" in field "required" for fields you want ti be required
and setup the correct listorder values for all record in "listorder" field

open file subscribelib2.php and

replace this line
  foreach ($attributes as $attribute => $listorder) {
with this line
  foreach (array_reverse($attributes, true) as $attribute => $listorder) {

Comment these two lines:
  $attr["required"] = $attributedata[$attr["id"]]["required"];
  $attr["default_value"] = $attributedata[$attr["id"]]["default_value"];

tipichris (reporter)
29-05-09 22:49

I think this is an import globals issue. This patch solves it:

--- lists/admin/spageedit.php.orig Fri May 29 21:42:49 2009
+++ lists/admin/spageedit.php Fri May 29 21:44:18 2009
@@ -54,9 +54,9 @@
   if (isset($_POST['attr_use']) && is_array($_POST['attr_use'])) {
     while (list($att,$val) = each ($_POST['attr_use'])) {
- $default = $attr_default[$att];
- $order = $attr_listorder[$att];
- $required = $attr_required[$att];
+ $default = $_POST['attr_default'][$att];
+ $order = $_POST['attr_listorder'][$att];
+ $required = $_POST['attr_required'][$att];

       Sql_Query(sprintf('insert into %s (id,name,data) values(%d,"attribute%03d","%s")',
davman (reporter)
30-05-09 09:44

tipichris (reporter)
08-06-09 08:51

There are issues with RSS preferences not saving too. A more complete patch:

--- lists/admin/spageedit.php.orig Fri May 29 21:42:49 2009
+++ lists/admin/spageedit.php Sun May 31 20:32:45 2009
@@ -54,9 +54,9 @@
   if (isset($_POST['attr_use']) && is_array($_POST['attr_use'])) {
     while (list($att,$val) = each ($_POST['attr_use'])) {
- $default = $attr_default[$att];
- $order = $attr_listorder[$att];
- $required = $attr_required[$att];
+ $default = $_POST['attr_default'][$att];
+ $order = $_POST['attr_listorder'][$att];
+ $required = $_POST['attr_required'][$att];

       Sql_Query(sprintf('insert into %s (id,name,data) values(%d,"attribute%03d","%s")',
@@ -73,11 +73,11 @@
   if (ENABLE_RSS) {
     Sql_Query(sprintf('replace into %s (id,name,data) values(%d,"rssintro","%s")',
- $tables["subscribepage_data"],$id,$rssintro));
+ $tables["subscribepage_data"],$id,$_POST['rssintro']));
     Sql_Query(sprintf('replace into %s (id,name,data) values(%d,"rss","%s")',
- $tables["subscribepage_data"],$id,join(',',$rss)));
+ $tables["subscribepage_data"],$id,join(',',$_POST['rss'])));
     Sql_Query(sprintf('replace into %s (id,name,data) values(%d,"rssdefault","%s")',
- $tables["subscribepage_data"],$id,$rssdefault));
+ $tables["subscribepage_data"],$id,$_POST['rssdefault']));
   if (!empty($_POST['activate'])) {
     Sql_Query(sprintf('update %s set active = 1 where id = %d',
mrmusicman86 (reporter)
10-06-09 23:06


Your last revision solved my problem with 2.10.10.

medianetwork (reporter)
24-07-09 18:34

Could someone please tell me exactly where to put both of these patches? Is this on one of the php pages or do you have to add it to the sql tables and if so where?

Also, after doing this patch do you find any other problems with 2.10.10?

Thank you for your help.
medianetwork (reporter)
24-07-09 19:48

I tried correcting the spageedit.php with the above and I lost the subscribe page from with in the admin and it did not change or correct anything.
kedmiston (reporter)
27-08-09 18:55

Has this been resolved yet? I tried to apply the patch above for the lists/admin/spageedit.php script but it still does not sort in order nor does it identify required status correctly. It is saving to the database ok, just not displaying ok. As a side note; I found that the sort order was corrected if I commented out line 8785 ("asort($attributes);") from lists/admin/connect.php. The required issue was still a factor, however.
kedmiston (reporter)
27-08-09 19:40

Typo on line number above...should be 875, not 8785
h2b2 (manager)
28-08-09 06:44

Patch suggested by tipichris works fine on my system, and also fixes the required attribute issue.

The patched spageedit.php file is available as an attachment in this forum post: [^]
michiel (manager)
27-11-09 18:04

revision 1701

Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker