Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
krem CreditAttribution: krem commentedI second this error
Comment #2
andrebonfanti CreditAttribution: andrebonfanti commentedI 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).
Comment #3
arnold_mad CreditAttribution: arnold_mad commentedany update on that issue ?
Comment #4
anonLinkit 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.
Comment #5
anonOk, 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.
Comment #6
plopesc