It appears that no matter what you set your display weight to, the weight always comes through as 0.

Thanks.

Comments

bdragon’s picture

Version: 5.x-3.0-rc1 » 5.x-3.x-dev
Status: Active » Fixed

Oy, I just noticed this while going through that section of code.
Thanks, fixed!

http://drupal.org/cvs?commit=147911
http://drupal.org/cvs?commit=147912

eliosh’s picture

Version: 5.x-3.x-dev » 6.x-3.0-rc2
Status: Fixed » Needs review

For Drupal 6 version, I have the same problem.
I resolved it changing this code (in function location_nodeapi)

from :


    case 'view':
      if (variable_get('location_display_location', 1)) {
        $display = variable_get('location_display_'. $node->type, array('teaser' => TRUE, 'full' => TRUE, 'weight' => 0, 'hide' => array()));

        if (($a3 && $display['teaser']) || (!$a3 && $display['full'])) {
          $hide = array_keys(array_filter($display['hide']));
          // Show all locations
          if ($output = theme('locations', $node->locations, $hide)) {
            $node->content['locations'] = array(
              '#type' => 'markup',
              '#value' => $output,
              '#weight' => variable_get('location_display_weight_'. $node->type, 0),
            );
          }
        }
      }
      break;


TO :


    case 'view':
      if (variable_get('location_display_location', 1)) {
        $display = variable_get('location_display_'. $node->type, array('teaser' => TRUE, 'full' => TRUE, 'weight' => 0, 'hide' => array()));

        if (($a3 && $display['teaser']) || (!$a3 && $display['full'])) {
          $hide = array_keys(array_filter($display['hide']));
          // Show all locations
          if ($output = theme('locations', $node->locations, $hide)) {
            $node->content['locations'] = array(
              '#type' => 'markup',
              '#value' => $output,
              '#weight' => $display['weight']
            );
          }
        }
      }
      break;


I hope this is the right patch :-)

bdragon’s picture

Version: 6.x-3.0-rc2 » 6.x-3.x-dev
Status: Needs review » Fixed

Yes, I KNOW it's broken in rc2, you don't have to remind me.

See http://drupal.org/cvs?commit=147911.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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