Hello.

I'm using Drupal 6.14 with latest updates and it's running fine, but I have a profile category order problem.
I do know this has been discussed before, but I've found no solution for my problem yet.

I have the following profiles:
# Configuration:
- 1 selection category field;
# Personal Information:
- 7 url category fields
- 1 textfield category field;
- 1 textarea category field;
# Interests:
- 1 textarea category field;
- 33 textfield category fields;

I'm having problems to order the 33 text fields from the Interest profile.
When using the administrator graphical interface, moving the categories up and down, some elements are moved but other stay in the same position after I hit the "Save configuration" button.
This behavior is constant for the same elements, i.e. the elements that do not move are a specific subset of the Interests fields. I have tried delete and recreate the fields and even change the weight, but nothing happened.

As a last resort, I've checked the database table where the categories are maintained hopping to manually set the order, but unfortunately there is no such attribute and tuning the parameters, like weight, also did not solved my problem.

I've invested many hours trying to solve this, so all help is appreciated...
Thank you.

Edit:
here's a small video of the problem http://dl.dropbox.com/u/3627746/order_problem.avi where I'm trying to move the "PSP - Filmes" category to just below the "Playstation/PSP - Jogos" category, but when I save the changes they are ignored.

Comments

fmp.martins’s picture

No one can help me?...

freatida’s picture

I'm not sure I understand your problem.

Is it the categories themselves that you can't reorder? In which case, this module could help: http://drupal.org/project/profile_category_weight

Or is it that the reordering of the fields within a category isn't working?

fmp.martins’s picture

I am unable to order the fields within a category.
I'll try the module as soon as possible.

Thank you.

bdimaggio’s picture

Yep got the same problem here -- I've only got one category, so I don't care about category weight; however, profile.module only provides a range of -10 to 10 for field weights, and I've got something like 25 fields per user. I'll post back if I figure it out.

bdimaggio’s picture

Okay, got it fixed. You just need to create a small module that contains only this code:

function [name of your module here]_form_profile_admin_overview_alter(&$form, $form_state) {
  foreach($form as $key => $field) {
    if(is_array($field['weight'])) {
      $form[$key]['weight']['#delta'] = 50;
    }
  }
}

This will give you 100 orderable spots rather than the default 20. See the forms API page on #delta for more info.

fmp.martins’s picture

Great. :)

I'll try it as soon as possible.

Thank you very much for your time and help.

fmp.martins’s picture

I was unnable to use this solution...
I did create the module but I did not understood the #delta thing, and so it did not work...

fmp.martins’s picture

I've tested this componente and it did not solved my problem per se.

fmp.martins’s picture

Here's a small video http://dl.dropbox.com/u/3627746/order_problem.avi that shows the problem.

I'm trying to move the "PSP - Filmes" category to just below the "Playstation/PSP - Jogos" category.
When I push the "Save configuration" button, the changes are ignored.
As a result, the "PSP - Filmes" category I've tried to move is kept on its original position in the bottom of the list.

Can anyone help me please?

aac’s picture

Subscribing!!

---~~~***~~~---
aac

bdimaggio’s picture

Okay, no problem. I made this into a little mini-module and put it on dropbox, here:
http://dl.dropbox.com/u/1649045/pwf.tar.gz
Hope this helps!
Ben

fmp.martins’s picture

Thank you very much Ben. :)
I'll try it as soon as possible.

fmp.martins’s picture

Thank you very much Ben, it work just fine.
Drupal core should be like that by default...

Thank you very much for your help. :)

Fernando Martins