Links error when anonymous users view a page with a tip

moshe weitzman - May 6, 2006 - 04:08
Project:Help Tip
Version:HEAD
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

the culprit was a non array being passed through theme('links') but I did not trace it all the way. definately a helptip issue for anon users. i can enable this on groupsbeta site for whomever wants to see.

#1

moshe weitzman - May 7, 2006 - 17:29
Status:active» needs review

patch attached. note that you might be able to avoid this function altogether is you call node_view() with a param that suppresses links like Preview does. Also, there is a $node->readmore property so you don't have to do this comparison (which is expensive for big nodes):

if ($node->body != $node->teaser) {
$links[] = l(t('read more'), "node/$node->nid", array('title' => t('Read the rest of this help tip.'), 'class' => 'read-more'));
}

AttachmentSize
patch_41 746 bytes

#2

moshe weitzman - June 12, 2006 - 03:29

this is still an error in 4.7 i think. head has changed theme_links a bit

 
 

Drupal is a registered trademark of Dries Buytaert.