View Issue Details

IDProjectCategoryView StatusLast Update
0015285phpList 3 applicationSubscribe Processpublic13-11-14 12:41
Reporterh2b2 Assigned To 
Status resolvedResolutionfixed 
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.


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



12-05-09 03:39

manager   ~0050642

Correction: my test system is running 2.10.10, not 2.10.9


17-05-09 23:59

reporter   ~0050651


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".


19-05-09 03:05

reporter   ~0050656

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.


20-05-09 14:06

reporter   ~0050660

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"];



29-05-09 22:49

reporter   ~0050667

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")',


30-05-09 09:44

reporter   ~0050668



08-06-09 08:51

reporter   ~0050677

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',


10-06-09 23:06

reporter   ~0050682


Your last revision solved my problem with 2.10.10.



24-07-09 18:34

reporter   ~0050697

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.


24-07-09 19:48

reporter   ~0050698

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.


27-08-09 18:55

reporter   ~0050715

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.


27-08-09 19:40

reporter   ~0050716

Typo on line number above...should be 875, not 8785


28-08-09 06:44

manager   ~0050721

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:


27-11-09 18:04

administrator   ~0050788

revision 1701