Download & Extend

Block node not displayed - language test

Project:Node As Block
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Block node is not displayed. I do not have i18n installed.
With the following code change (line 310), it works.

Original code. $node->language is a string, but $language is an object.

      // Don't show nodes in other languages than current. Integration with i18n node languages.
      global $language;
      if (empty($node->language) || $node->language == $language) {
        return array(

Modified code :

      // Don't show nodes in other languages than current. Integration with i18n node languages.
      global $language;
      if (empty($node->language) || $node->language == $language->language) {
        return array(

Comments

#1

Same problem found today. No i18n module but same patch

#2

Same problem, same resolution. :)

#3

Same here.

#4

I too can confirm that this will fix the problem. Just spent a few hours trying to find out the solution before finding this. Thanks!

#5

Status:active» needs review

Patch

AttachmentSize
nodeasblock.module.patch 661 bytes

#6

Status:needs review» fixed

Committed. Thanks.

#7

Status:fixed» closed (fixed)

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

nobody click here