In vud_node.module variables are passed to theme() function (for vud_... themes) as a list of arguments rather than as array.

Also in vud_node.module and vud_term.module in hook_node_view() markup should be added to $node->content['#markup'] to be displayed properly rather than to $node->content['#value'].

As a result voting markup is not displayed at node content.

Comments

alex.bukach’s picture

The same issue is also for some other theme() calls.

alex.bukach’s picture

Status: Active » Needs review
David Hernández’s picture

Issue summary: View changes
+++ b/vud_node/vud_node.module
@@ -174,7 +174,14 @@ function vud_node_node_view($node, $view_mode, $langcode) {
+                'entity_id' => $node->nid, ¶
+                'type' => 'node', ¶
+                'tag' => $tag, ¶
+                'widget_theme' => $widget, ¶
+                'readonly' => !$vote_on_teaser || !$can_edit, ¶

@@ -182,7 +189,14 @@ function vud_node_node_view($node, $view_mode, $langcode) {
+                'entity_id' => $node->nid, ¶
+                'type' => 'node', ¶
+                'tag' => $tag, ¶
+                'widget_theme' => $widget, ¶
+                'readonly' => !$can_edit, ¶

@@ -195,7 +209,14 @@ function vud_node_node_view($node, $view_mode, $langcode) {
+                'entity_id' => $node->nid, ¶
+                'type' => 'node', ¶
+                'tag' => $tag, ¶
+                'widget_theme' => $widget, ¶
+                'readonly' => $readonly, ¶

@@ -241,8 +262,11 @@ function vud_node_tracker() {
+        'header' => $header, ¶

@@ -270,7 +294,12 @@ function vud_node_link($type, $object, $teaser = FALSE) {
+                'entity_id' => $node->nid, ¶
+                'type' => $type, ¶
+                'tag' => $tag, ¶

@@ -278,7 +307,12 @@ function vud_node_link($type, $object, $teaser = FALSE) {
+                'entity_id' => $node->nid, ¶
+                'type' => $type, ¶
+                'tag' => $tag, ¶

@@ -286,7 +320,12 @@ function vud_node_link($type, $object, $teaser = FALSE) {
+                'entity_id' => $node->nid, ¶
+                'type' => $type, ¶
+                'tag' => $tag, ¶

+++ b/vud_term/vud_term.module
@@ -122,7 +122,12 @@ function _vud_term_generate_table(&$node) {
+                'entity_id' => $entity_id, ¶
+                'type' => 'term', ¶
+                'tag' => $tag, ¶

@@ -137,13 +142,25 @@ function _vud_term_generate_table(&$node) {
+                'entity_id' => $entity_id, ¶
+                'type' => 'term', ¶
+                'tag' => $tag, ¶
...
+        'header' => $header, ¶
+        'rows' => $rows, ¶
...
+            'class' => 'vud-term-table', ¶

There are white spaces at the end of the lines. That goes against the Drupal Code Standards.

Apart from that, the patch works like a charm!

David Hernández’s picture

Status: Needs review » Reviewed & tested by the community

As the whitespaces is a minor issue that doesn't affect the effectivity of the patch, I'm marking this issue as RTBC, hoping that gets committed soon.

marvil07’s picture

Priority: Critical » Normal
Status: Reviewed & tested by the community » Postponed

vud_node will not be on stable release.
See #1295574: Remove vud_{node,comment,term} modules in favour of vud_field and project page for more details.

David Hernández’s picture

Can at least be commited into the current dev version, as now the system is broken?

  • marvil07 committed e4849ab on 7.x-1.x authored by Alex Bukach
    Issue #2090875 by Alex Bukach: Incorrect theme() and $node->content...
marvil07’s picture

Status: Postponed » Fixed

Thanks for the patch and the review. Added after removing spaces.

Status: Fixed » Closed (fixed)

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