We have additional content being displayed in blocks and blocks generated by views, for some reason drupal now is completely disregarding any weight / order we give to the base "main page content" block

For example we always wan the main page content block to sit at the top of the main content region, so we have moved it up to the top/ assigned the lowest weight, yet it completely disregards this and always renders the block after all the other blocks.

We ruled out any css issues such as floats/ position absolutes by disabling our template (built on adaptive theme) We have an older version of the site on localhost which display blocks fine and in the correct order, the html shows the main page content physically being rendered first but on he dev version its physically rendered last.

I've also gone through and disabled all the modules i could, except the few modules you are unable to disable as they contain data, but this shouldn't be an issue as the site has been an ongoing build for a while now and has been functioning fine.

I've done the basics such as clearing caches ect but to no avail. I'ts just strange how we are experiencing this issues in relation to the main page content block and other custom blocks. Custom content blocks in relation to other custom content blocks completely respect the weight given to them.

A few extra details from our drupal install

Web server Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 PHP/5.2.17 OK
cURL Enabled
OK
PHP memory limit 128M
OK
Database system version 5.0.95-community
OK
PHP 5.2.17

Any clues appreciated

Comments

jkirkby’s picture

Someone suggested this custom module could over right the weight

 function MYMODULE_block_info_alter(&$blocks, $theme, $code_blocks) {
  $blocks['system']['main']['weight'] = -9999;
}

But no joy

bcobin’s picture

Did you ever find a solution here? I have a similar issue where changing block weights won't save and I have to go to the db to make changes.

Also using a subtheme of adaptive theme; I'm wondering if dragging blocks didn't put the system in some sort of weird state.

lolandese’s picture

I had a similar problem that turned out to be the JavaScript added by a contrib module. Solved it with the #7 patch of #2262349: Add a link to Flickr to the overlay browser that applies on the contrib module.

I would still like to know how this can happen. The JS file seems harmless and is added with a regular drupal_add_js.

Thanks.

lolandese’s picture

Version: 7.12 » 7.x-dev

The problem as described in #3 also occurs with the latest dev.

dcam’s picture

I'm unable to reproduce this issue. If you could supply steps to reproduce it, that would help us identify the problem. Can the issue be reproduced only using Drupal core modules?

lolandese’s picture

Steps to reproduce:

  • Enable the Flickr module (latest stable or dev).
  • Enable Colorbox module.
  • Make sure Overlay core module is enabled.
  • In flickr.module on line 35 remove && !path_is_admin($_GET['q']). See http://drupal.stackexchange.com/a/35388.
  • Clear cache at admin/config/development/performance.
  • Go to admin/structure/block and drag & drop the Navigation block between the sidebars and Save.

You should see it staying in the region where it was, thus unable to reorder the blocks.

Thanks.