Download & Extend

Context edit form does not assign block weights properly.

Project:Context
Version:7.x-3.0-beta1
Component:Code
Category:bug report
Priority:major
Assigned:Unassigned
Status:active

Issue Summary

This seems like a widespread issue, but I have not found it in the issue queue.

Basically, on context edit form, when user adds a block to a region, that block's weight (-10) does not correspond to its displayed position (last item on the list). When saved, block weight is preserved, although user thinks that its weight corresponds to its displayed position. The block gets a proper weight if user moves blocks around within the same region.

Solution would be to update block's weight value upon adding it to a region.
Can someone point me to a JS function that manipulates blocks on edit form?

Comments

#1

subscribe

#2

subscribe

#3

I don't seem to be able to get the block weight to save no matter how much dragging around of blocks I do.

EDIT: Even displaying the weight menu and manually altering the values fails to save the weights. When I reloading the edit form, the weights have reset to -20 again.

EDIT 2:

Here's the relevant section of the export:

<?php
$context
->reactions = array(
 
'block' => array(
   
'blocks' => array(
     
'views-video-front' => array(
       
'module' => 'views',
       
'delta' => 'video-front',
       
'region' => 'sidebar_second',
       
'weight' => '-20',
      ),
     
'fb_social-Facebook Like Box' => array(
       
'module' => 'fb_social',
       
'delta' => 'Facebook Like Box',
       
'region' => 'sidebar_second',
       
'weight' => NULL,
      ),
    ),
  ),
);
?>

I tried manually modifying the export and re-importing, to no effect.

#4

Im getting the same behavior.
The order of the blocks does not correspond to the weights AND weights return to their previous value on refresh after save.

#5

slackrunner, are you having the problem with fb social like as well?

#6

I'm having the same problem. It's very annoying, because once I add one or more blocks to a context and save it, I have to reopen it to adjust the blocks to the correct weight. Because of other blocks that I'm using, I have to use weights well below -10, so the limited choice of weights that is available on adding a block is a constant annoyance.

#7

I'm having the same issue and I just found this solution that might be related: http://drupal.org/node/1439134#comment-5648172