Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
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)
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:
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.
Comments
Comment #1
klausiLooks like a problem in display suite. What path did you use? Is it supposed to be a RESTWS path?
Comment #2
pavlovt commentedYes, 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
in ds/modules/ds_extras/ds_extraspages.inc
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.
Comment #3
klausiPlease take a look at the patch in #1343816: Unconditional altering and overriding of existing menu links breaks comment permalinks and possibly others and test if it fixes the issue for you.
Comment #4
klausiCommitted the patch in #1343816: Unconditional altering and overriding of existing menu links breaks comment permalinks and possibly others, please re-open if this is still an issue.