I have some vertical tabs I am trying to reorder and the dpm()'d weights are not matching the visual output. Can someone explain this or point me to the right documentation on how weights and vertical tabs work?

dpm weights

  • Where (theme/module) and which hook are you exactly calling? – Aram Boyajyan Jan 14 '13 at 16:49
  • I have a custom module called pub_tv and I am doing a hook_form_FORM_ID_alter(). I will also note that required information and additional information are provided by the field_group module. Meta tags is a contrib module. – Elijah Lynn Jan 14 '13 at 17:45

If you are calling the hook function through your module it can happen that other modules are calling the same hook function after your hook. This would make the changes you made overwritten by the other module.

So if you want to make sure your hook is called last, either call the function in the themes template.php file or change the weight of your module to something higher so that it gets executed last. The second option would require you to edit the system table in the database.

| improve this answer | |
  • If I use the #afterbuild property to call the dpm()'s then it still shows the weights out of order. This means the form is completely built at the time the dpm()'s in the screenshot are outputting their weights. – Elijah Lynn Jan 23 '13 at 20:24
  • can you check the weight of the modules in the systems table. if possible alter it to a higher value in the db itself. – Mohammed Shameem Jan 23 '13 at 20:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.