Locale Settings appear under both 'Edit profile' and 'Edit account' tabs when they should really only fall under the 'Edit account' tab.

It's an issue of module weight; the locale module is executing after our form_alter hooks so it's altering the form again after edit_profile processes it.

Fix is simple enough; provide an edit_profile.install file.

<?php

/**
  * Implement hook_enable()
  */
function edit_profile_enable() {
  // Update our module weight so we're sure we run after the locale module.
  db_update('system')
    ->fields(array(
      'weight' => 1,
    ))
    ->condition('type', 'module')
    ->condition('name', 'edit_profile')
    ->execute();
}

I apologize in advance for the lack of an actual patch file; it would simply take me an unnecessary amount of time to get my environment set up to generate one for such a simple fix.

After this addition it's just disable module -> re-enable module and *poof* the bug is gone.

Comments

David_Rothstein’s picture

Status: Active » Postponed

This is actually due to a Drupal core bug, #765860: drupal_alter() fails to order modules correctly in some cases. As mentioned in the "Requirements" section on the project page, you need to apply the patch in that issue in order for this module to work correctly. If you apply that patch, this problem should go away.

I just went ahead and updated the project page now though to actually describe the consequences of not having that patch applied - I forgot to put that on there before, so thanks for reporting this :)

I'm hopeful that patch will make it into Drupal 7 core soon (though it's been marked RTBC for a while and still hasn't gone in yet). If it takes too long, though, we can consider working around the problem in this module, e.g. via the method you suggested. So for now, I'm going to mark this postponed.

David_Rothstein’s picture

Status: Postponed » Fixed

Drupal 7.10 was released with a fix for #765860: drupal_alter() fails to order modules correctly in some cases, so I've updated the project page to say that Drupal 7.10 or higher is required.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.