"Millennium links" block breaks under some cases

tituomin - April 27, 2009 - 12:14
Project:Millennium Integration
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

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.

#1

tituomin - April 27, 2009 - 12:16
Title:Turning on node statistics breaks the » Turning on node statistics breaks the node view

#2

tituomin - April 27, 2009 - 12:26

Deleting the statistics from the database make the nodes reappear.

#3

tituomin - April 28, 2009 - 06:20

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

tituomin - April 28, 2009 - 06:26

No, sorry, statistics_link gets called twice...

#5

tituomin - April 28, 2009 - 06:31

...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

janusman - April 28, 2009 - 15:34
Title:Turning on node statistics breaks the node view» "Millennium links" block breaks under some cases

Thanks for tracking this down. Renaming the issue...

#7

janusman - April 28, 2009 - 15:34
Priority:normal» critical

#8

janusman - October 15, 2009 - 20:11
Status:active» fixed

I removed the block entirely in a recent commit; this seemed more like a job for other modules.

#9

janusman - October 15, 2009 - 20:13

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

tituomin - October 19, 2009 - 08:28
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.