Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
install system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Jul 2008 at 03:16 UTC
Updated:
1 Aug 2008 at 07:55 UTC
Jump to comment: Most recent file
Comments
Comment #1
webchickThis sorts them by profile machine name, which is not ideal, but better than no sort whatsoever. I can't figure out how to sort them by human-readable name without looping through twice which might not be ideal.
Comment #2
dropcube commentedWould be good to have the possibility to set 'weights' to profiles, and sort them by weight. For example, profiles may declare their weight in the hook_details:
Comment #3
cburschkaThat smells of feature creep to me. Is there a genuine use case for setting weights in a place that a) faces only the admin, b) is visible only once during installation, c) probably involves a very short list of profiles? Alphabetic sounds good enough to me...
webchick: Would another loop cost much performance? I could see something like this, in theory:
Comment #4
webchickProbably not. I was trying to keep this as simple as possible because I *really* want it back-ported to 6.x. The source code for our book is getting displayed as like:
Chapter 04: Blah
Chapter 09: Yadda
Chapter 05: Whee
Which is a big frickin' mess. ;)
But yes, it'd be more natural for it to sort by the human-readable name, and performance isn't really critical at all on this page. I'll give this another shot today.
Comment #5
cburschkaBook? I thought this issue was specifically related to install profiles?
Comment #6
webchickIt is.
The book we're writing (Drupal Jumpstart) comes with source code, which is a single Drupal 6 installation, a crap-ton of modules, and an install profile for each chapter to boot-strap some stuff. The listing of install profiles on page 1 of the install is listed in some sort of random order (I think it's by file creation date, which
touchdoesn't seem to affect).So I'd rather these show up as:
Chapter 01:
Chapter 02:
Chapter 03:
Chapter 04:
...
Rather than in the current silly random order. ;)
Comment #7
webchickOk, let's try this on for size.
Comment #8
dropcube commentedThe patch did not apply for me :(
Comment #9
webchickDang you, ever-shifting string concatenation coding standard! :)
Comment #10
webchickComment #11
cburschkaAha! Okay. The relation between books and profiles had confused me. ;)
---
Besides the custom profile I already have, I have created multiple copies of the default.profile: atrus, gandalf and zebra. atrus.profile has a name of "Profile Atrus" to distinguish human name from system name, the others are named by their file names.
Pre-patch:
Looks kind of random.
Post-patch:
And on 7.x:
Post-patch:
Looks good (though perhaps Dries wants a second review).
Comment #12
dropcube commentedTested the 7.x patch and works as expected. So, confirm RTBC.
Comment #13
webchickThanks, dropcube and Arancaytar!
I just want to clarify that this is not an API change, although the function definition did change; I simply renamed $profiles to $profile_files to be more descriptive of what that variable actually holds.
Comment #14
dries commentedI've tested and reviewed these patches and they look good. I've committed it to DRUPAL-6 and CVS HEAD. Thanks all.
Comment #15
webchickOh, thank you!! :D
Comment #16
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.