This is a simple fix and doesn't really require a full patch since it is only changing one word on line 129 of the radioactivity_node.module page.
The line currently reads:
case 'load':
but it should be changed to
case 'view':
When left as 'load' the script tries to call the function radioactivity_get_radioactivity_array even when the load is only coming from an internal module making use of the node_load() function. The result is a fatal error in some situations.
I made the change on my site and from what I can tell radioactivity still works fine with the alteration.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | radioactivity-353163.patch | 2.38 KB | skiminki |
Comments
Comment #1
PixelClever commentedI changed this to critical because when this error occurs the whole site goes down.
Comment #2
skiminki commentedCan you provide the actual error message related to the break? If I had to guess, we miss a
require_oncefor radioactivity.inc in nodeapi/load, which is somehow provided in nodeapi/view. I'll look into this later this weekend, if I could retrace and fix this.Comment #3
skiminki commentedOk, I looked into this and AFAICT this can happen only if radioactivity_node.module is loaded and radioactivity.module is not. However, this shouldn't happen in normal circumstances, as radioactivity_node has a dependency to radioactivity.
I'm not too eager to make the change suggested, because we really want to have the 'radioactivity' member returned in node_load, and not only in node_view.
Some questions:
Comment #4
PixelClever commentedYou know I think this was a fluke. I was having this error show up for several hours while I was working on something then the database started showing signs of corruption. Then all sorts of bizarre errors started popping up. I reinstalled from a backed up database and now the error is gone even with your original code. I apologize for the false alarm.
Comment #5
PixelClever commented