Posted by tituomin on April 27, 2009 at 12:14pm
Jump to:
| Project: | Millennium OPAC Integration |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
I get
"Fatal error: Unsupported operand types in /var/www/includes/common.inc on line 1542"
when trying to view a bibliographic node after having turned on "Count content views" from admin/reports/settings.
Details:
The first view of a node works okay, but subsequent reloads fail after the first hit has been recorded for the node.
If I turn off the statistics, then the nodes that have been clicked on with statistics on still don't work.
Comments
#1
#2
Deleting the statistics from the database make the nodes reappear.
#3
Somehow, the statistics module gets the statistics twice, when calling statistics_get from statistics_link. For example:
Array ( [totalcount] => 4 [daycount] => 4 [timestamp] => 1240899453 ) Array ( [totalcount] => 4 [daycount] => 4 [timestamp] => 1240899453 )
#4
No, sorry, statistics_link gets called twice...
#5
...because I had the separate millennium links block on, and the links are apparently generated twice. Turning off the links block solved the problem.
#6
Thanks for tracking this down. Renaming the issue...
#7
#8
I removed the block entirely in a recent commit; this seemed more like a job for other modules.
#9
Woops. Actually, didn't remove it then. But I just removed it =)
Index: E:\UV-L00329342\Laboral\Sites\htdocs-khub\sites\default\modules\contributions\modules\millennium\millennium.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/millennium/millennium.module,v
retrieving revision 1.13.2.33.2.2.2.28
diff -u -r1.13.2.33.2.2.2.28 millennium.module
--- millennium.module 15 Oct 2009 19:43:20 -0000 1.13.2.33.2.2.2.28
+++ millennium.module 15 Oct 2009 20:12:48 -0000
@@ -1631,7 +1631,6 @@
switch ($op) {
case 'list':
return array(
- 'actions' => array('info' => t('Millennium: links')),
'marc' => array('info' => t('Millennium: MARC')),
//'citation' => array('info' => t('Millennium: APA citation')),
);
@@ -1658,26 +1657,6 @@
);
break;
- case "actions":
- $links = module_invoke_all('link', 'node', $node, false);
- // Re-sort links
- usort($links, "millennium_links_sort");
-
- // Capitalize links
- foreach ($links as $i => $v) {
- $links[$i]['title'] = drupal_ucfirst($v['title']);
- }
- foreach ($links as $link) {
- $items[] = l($link['title'], $link['href'], $link['attributes']);
- }
- $list = theme('item_list', $items);
-
- return array(
- 'subject' => t('Millennium: Actions'),
- 'content' => '<div class="millennium actions">'. $list .'</div>',
- );
-
- break;
/*
case "citation":
// TODO remove Biblio module dependency
#10