Hi,
I received an error after enabling this module (see the attachment)
I use Display Suite 1.3, Views 3.0 rc1, Entity API 1.0-beta10
what could be the problem? (this error appears on the home page)

Thanks

CommentFileSizeAuthor
error.png31.99 KBpavlovt

Comments

klausi’s picture

Looks like a problem in display suite. What path did you use? Is it supposed to be a RESTWS path?

pavlovt’s picture

Yes, Display suite (only extras module) uses the same path as RESTWS. I am writing about this here because maybe you have to speak with DS team to find a solution.
Here is the problematic code:

in ds/modules/ds_extras/ds_extras.registry.inc

if (variable_get('ds_extras_switch_view_mode', FALSE)) {
    $items['node/%node']['page callback'] = 'ds_extras_node_page_view';
    $items['node/%node']['file'] = 'ds_extras.pages.inc';
    $items['node/%node']['file path'] = drupal_get_path('module', 'ds_extras');
  }

in ds/modules/ds_extras/ds_extraspages.inc

function ds_extras_node_page_view($node) {

  // If there is a menu link to this node, the link becomes the last part
  // of the active trail, and the link name becomes the page title.
  // Thus, we must explicitly set the page title to be the node title.
  drupal_set_title($node->title);
  $uri = entity_uri('node', $node);
  // Set the node path as the canonical URL to prevent duplicate content.
  drupal_add_html_head_link(array('rel' => 'canonical', 'href' => url($uri['path'], $uri['options'])), TRUE);
  // Set the non-aliased path as a default shortlink.
  drupal_add_html_head_link(array('rel' => 'shortlink', 'href' => url($uri['path'], array_merge($uri['options'], array('alias' => TRUE)))), TRUE);

  // Update the history table, stating that this user viewed this node.
  node_tag_new($node);

  // For markup consistency with other pages, use node_view_multiple() rather than node_view().
  $view_mode = (!empty($node->ds_switch)) ? $node->ds_switch : 'full';
  drupal_static('ds_extras_view_mode', $view_mode);
  return node_view_multiple(array($node->nid => $node), $view_mode);
}

it gives an error ( on drupal_set_title($node->title);) because it expects $node to be an object but after RESTWS instalation it is just a string "node"
After I disabled "Switch view mode" option in DS Extras no more errors ware generated
I hope this helps.

klausi’s picture

Title: error after enabling this module » Incompatibility with display suite
klausi’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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