Uploaded attachments not showing with paged nodes
peterpoe - October 4, 2007 - 17:21
| Project: | Paging |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | patch (code needs work) |
Description
The problem is that paging is overwriting the $node->body variable on lines 136-137 (_paging_nodeapi function):
$node->body = check_markup($node->pages[$page], $node->format, false);
$node->body .= theme('pager', NULL, 1, $element);I changed the lines to:
$node->content['body']['#value'] = check_markup($node->pages[$page], $node->format, false);
$node->content['body']['#value'] .= theme('pager', NULL, 1, $element);and the attachments show. Don't know if this can cause other problems though...

#1
I've been running this change in production for a while now. It shouldn't cause any problems. I took your changes above and made a patch for it.
#2
I made a slight tweak to the patch. Instead of concatenating the pager into the body, I put it in its own array element. This way, it will be easier to override.
#3
Please read http://drupal.org/patch/create
#4
The suggested changes break: http://drupal.org/node/133961