Installed acidfree latest verson on drupal 5.2 and noticed that album thumbnails do not display in the default view. If alternate views are enabled, the thumbnails do display, but only when clicking on the alternate view.
In my particular case, I had an album with to photos and a node ID of 25.
Setting the default view to "list":
* Viewing node/25 shows no thumbnails.
* Viewing node/25/list shows no thumbnails.
* Viewing node/25/grid shows thumbnails.
Setting the default view to "grid":
* Viewing node/25 shows no thumbnails.
* Viewing node/25/grid shows no thumbnails.
* Viewing node/25/list shows thumbnails.
Visiting the alternate view calls acidfree_album_view() which returns a string containing the formatted node including thumbnails.
Visiting the default view (by either URL) callls acidfree_view() which in turn calls acidfree_album_view(), then assigns its output to $node->content['body']['#value'] and returns $node.
Apparently, the calling function is ignoring the $node->content array and displaying the $node->body field.
So for me, at least, the following patch solves the problem.
--- orig/acidfree/acidfree.module 2007-08-14 14:02:38.000000000 -0400
+++ patched/acidfree/acidfree.module 2007-09-15 11:32:12.000000000 -0400
@@ -152,11 +152,7 @@
function acidfree_view($node, $teaser = FALSE, $page = FALSE) {
if ($page) {
$view = "album_{$node->view}_view";
- $node->content['body'] = array(
- '#value' => acidfree_album_view($view, $node->tid),
- //'#value' => '<div class="clear-block">' . $output . '</div>',
- '#weight' => 0,
- );
+ $node->body = acidfree_album_view($view, $node->tid);
return $node;
} else {
static $head_set;
@@ -176,10 +172,7 @@
$node->readmore = (strlen($node->teaser) < strlen($node->body));
$output = theme("acidfree_print_thumb_acidfree", $node);
$output .= check_markup($node->teaser, $node->format, FALSE);
- $node->content['body'] = array(
- '#value' => '<div class="clear-block">' . $output . '</div>',
- '#weight' => 0,
- );
+ $node->body = '<div class="clear-block">' . $output . '</div>';
return $node;
}
}
| Comment | File | Size | Author |
|---|---|---|---|
| acidfree.module_4.patch | 1.14 KB | pillarsdotnet |
Comments
Comment #1
vhmauery commentedIs this still an issue? I am getting to some pretty stale bugs now...
Comment #2
mwheinz commentedClosing. 3 years of no activity.