简体   繁体   English

Drupal块未按重量排序

[英]drupal blocks not ordering according to weight

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 我们在视图生成的块和块中显示了其他内容,由于某种原因,drupal现在完全忽略了我们赋予基本“主页内容”块的任何权重/顺序

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. 我们通过禁用模板(基于自适应主题)排除了诸如浮动/位置绝对值之类的css问题(我们在自适应主题上构建)。我们在localhost上拥有旧版的网站,可以按正确的顺序正确显示块,而html会物理显示主页内容首先被渲染,但在开发版本上,其物理渲染最后。

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 Drupal安装中的一些其他细节

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 Web服务器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启用OK PHP内存限制128M OK数据库系统版本5.0.95-community OK PHP 5.2.17

Any clues appreciated 任何线索表示赞赏

force weights can be done by writing a custom module function 权重可以通过编写自定义模块函数来完成

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM