When I add the Dashboard module I get asked to enter a URL where I want to link it to and regardless what I enter there I get the following error afterwards:

warning: Missing argument 1 for linkit_dashboard() in /var/www/xxx/sites/all/modules/linkit/linkit.module on line 109.

Also I don't get the /admin/settings/dashboard page.

Comments

krem’s picture

I second this error

andrebonfanti’s picture

I get the same error after installing the dashboard module, or after updating the database.
The dashboard admin page link do not appear (/admin/settings/dashboard page redirect to "site configuration" page).

arnold_mad’s picture

any update on that issue ?

anon’s picture

Linkit us calling a function called "linkit_dashboard" on line 109.

I bet there is a hook called hook_dashboard in the dashboard module.

I have really no Idea how we both should solve this. Someone has to change function/hook name.

anon’s picture

Title: Problem when installing Dashboard » hook_dashboard conflicts with other *_dashboard functions
Status: Active » Needs review

Ok, I have some more info now.

First of, a contrib hook should always be called by "hook_[MODULENAME]_whateverhookname" I have been told.

The one on line 88 in dashboard.moule (6.x-2.1) is only called "dashboard". That will conflict with every function called modulename_dashboard in all modules.

I will change the linkit callback to "linkit_dashboard_page", but this should still be a problem for this module.
Like I said, every function name that contains "[MODULENAME]_dashboard" is called by the code in line 88.

I suggest a namechange,

Line 88 dashboard.module:
- foreach (module_invoke_all('dashboard') as $type => $info) {
+ foreach (module_invoke_all('dashboard_dashboard') as $type => $info) {

Line 240 dashboard.module:
- /**
- * Implement hook_dashboard().
- */
- function dashboard_dashboard() {
+ /**
+ * Implement hook_dashboard_dashboard().
+ */
+ function dashboard_dashboard_dashboard() {

That would be much more accurate, and safe for the future.

plopesc’s picture

Issue summary: View changes
Status: Needs review » Closed (won't fix)