Closed (fixed)
Project:
Open Atrium
Version:
7.x-2.33
Component:
Contextual Tabs App
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Apr 2015 at 22:19 UTC
Updated:
28 Apr 2015 at 02:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Argus commentedPlease add a step to step description on how to reproduce this bug
Comment #2
paean99 commentedIt isn't a bug that appeared on the site, only a situation that i saw while browsing the code in OA.
oa_contextual_tabs module is calling code in trash_flag module, but there is not a dependency between them. Therefore it is possible to disable trash_flag module at admin/modules, and then a bug should appear once function oa_contextual_tabs_access is executed.
Here is the culprit in oa_contextual_tabs file. It is calling trash_flag_flag_access() function of trash_flag module.
I added a simple patch that should solve the potential bug.
Comment #3
Argus commentedOkey...
Comment #4
paean99 commentedThe dependency arise because oa_contextual_tabs is creating a contextual menu tab for node/%node/archive-content. It assumes several times in the code that the trash_flag module is enabled, without confirming it.
Another way to do it would be to add a module_exists() test, this way the dependency would be only conditional.
Comment #5
paean99 commentedThis patch implements the module_exists() solution.
I didn't tried it but it should be ok.
Comment #6
hefox commentedAdded check for module_exists oa_archive in the hook_menu item (sorry, totally forgot to mention you in commit message). Thanks!
Comment #7
paean99 commentedNo problem.
It is a very small check for an extreme situation.
But i think i saw others similar situations.
If i remember what those were or encounter them or others again (i have to browse the code from time to time),
i will create a new issue.