View Issue Details

IDProjectCategoryView StatusLast Update
0017040phplist applicationUser Managementpublic27-08-15 14:28
Reporterduncanc 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.0.5 
Target Versionnext patchFixed in Version3.2.0 
Summary0017040: Unable to re-order user attribute list values when there are more than 100
DescriptionThe edit attribute page to re-order the values of a "select" user attribute has a restriction of 100 values. Beyond that the page does not allow the attribute values order to be changed.

This is a problem when using the provided country attribute list as that has 240 entries. So it is not possible to place the most common countries at the beginning of the list.

see file admin/editattributes.php line 182

while ($row = Sql_Fetch_array($rs)) {
  printf( '<div class="row-value"><span class="delete">javascript:deleteRec(\'%s\');</span>',PageURL2("editattributes","","id=$id&delete=".$row["id"]));
  if ($num < 100)
    printf(' <input type="text" name="listorder[%d]" value="%s" size="5" class="listorder" />',$row["id"],$row["listorder"]);
  printf(' %s %s </div>', $row["name"],($row["name"] == $data["default_value"]) ? '('.$GLOBALS['I18N']->get('default').')':"");
}
if ($num && $num < 100)
  printf('
<input class="submit" type="submit" name="action" value="%s" />',$GLOBALS["I18N"]->get("Change order"));

I suggest that the limit be removed or at least made a lot bigger and a warning displayed that the order function is disabled.

This was reported in the user forum http://forums.phplist.com/viewtopic.php?f=35&t=40493

TagsNo tags attached.

Activities

michiel

28-01-14 13:14

manager   ~0052676


I didn't imagine anyone wanting to manually order more than 100 entries. Even though it blocks editing, it orders them alphabetically when that's the case.

if it doesn't than that would be non-intended functionality (bug)

we could make the 100 a "config" so that it can be tweaked.

duncanc

30-01-14 12:56

developer   ~0052714

I agree that it is unlikely someone would want to reorder all entries of the country list, but they may well want to place some frequently used countries at the beginning.
The current approach doesn't allow that in two ways:
- disables editing the order field for large lists
- when the list is loaded the order is set to 0 for all entries. Even if the order field was editable this stops you moving entries to the beginning by using a smaller order value (actually using an order value of -1 works but I am not sure that people would guess that).

Unless there is a technical reason, I still think removing the limit of 100 is most straightforward.
Also, when the lists are loaded, can the order value be set to something apart from 0.

michiel

06-07-15 18:23

manager   ~0056317

https://github.com/phpList/phplist3/commit/07a5a2459d7e9201bad85d9bea6e692ba8050897

gingerling

13-08-15 14:32

manager   ~0056610

Hi, I am trying to write up this change, however, I am having an issue

When I go to http://sneakpeek.phplist.com/lists/admin/?page=editattributes&id=1&tk=8c6dd2c6be - which should allow me to edit the order of "country" attributes, I cannot find any way to do so.

michiel

13-08-15 17:50

manager   ~0056614

that's because the default value is the same as before: https://resources.phplist.com/system/config/attributevalue_reorder_limit

support

27-08-15 13:03

administrator   ~0056665

More issues with this, the default value of all items (countries) is 0, so if I want to set UK and USA at the top of the list, I have to literally re-number every country to 1 and sent them as 0, or similar.

michiel

27-08-15 13:09

manager   ~0056666

no, you can use negative numbers

support

27-08-15 14:28

administrator   ~0056667

really? Cool!