Hi

I tried installing on a fresh d6.3 site, and the module installs.
When refreshing the module page, it displays following error:

warning: call_user_func_array() [function.call-user-func-array]: First argumented is expected to be a valid callback, 'system_admin_menu_block_page' was given in includes/menu.inc on line 346.

I can see the link administer -> gallerix, but when clicking on it, it displays nothing.
If u want i can give u access.

thnx

Comments

QuirinKoerner’s picture

I have the same problem with the d6 version.

gertieiv’s picture

i have the same problem

I can access settings via admin/by-module

Annakan’s picture

it seems the menu item are missing the new required parameter "file"=> and maybe 'file path' => in the menu declaration.

I am still learning drupal so I am not sure about the exact paths to correct and their relative meaning and such but it should be trivial for the developer to correct.

If it is right it shows the module was not tested under D6 because going to thee gallerix admin page give a blanck page right away and messages appear in the module page, maybe some testers would be needed ?

===== EDIT QUICK FIX ====

indeed two lines are missing open gallerix.module and locate the following lines

function gallerix_menu() {
$items = array();

$items['admin/gallerix'] = array(
'title' => 'Gallerix',
'description' => 'Administer Gallerix Settings.',
'page callback' => 'system_admin_menu_block_page',
'file' => 'system.admin.inc',
'file path' => drupal_get_path('module', 'system'),

'position' => 'left',
'access arguments' => array('configure gallerix'),
);
$items['admin/gallerix/general'] = array(
'title' => 'General Settings',
'description' => 'Configure your galleries.',
'page callback' => 'drupal_get_form',
'page arguments' => array('gallerix_admin_settings'),
'access arguments' => array('configure gallerix'),
);

the two new lines to add are in bold

the final code portion thus become

>
 $items['admin/gallerix'] = array(
    'title' => 'Gallerix',
    'description' => 'Administer Gallerix Settings.',
    'page callback' => 'system_admin_menu_block_page',
    'file' => 'system.admin.inc',
    'file path' => drupal_get_path('module', 'system'),
    'position' => 'left',
    'access arguments' => array('configure gallerix'),
<

ps : and oh my god !!! DRUPAL DOES needs a decent editor (the what you see is what you mean or technical kind not the word-sucks kind)

silviogutierrez’s picture

Category: support » bug
Status: Active » Postponed (maintainer needs more info)

I can't seem to replicate this problem. I've done it on a fresh install of Drupal 6.4, and I get no errors.

Can anyone provide more details?

Silvio

Annakan’s picture

I think everything is in the comment as far as external perception of the problem.

Do you have the aforementioned lines inside your menu code ?

'file' => 'system.admin.inc',
'file path' => drupal_get_path('module', 'system'),

because thus you should not have the bug (and you probably did the fix in you sleep :) ).

And if you have those lines, it means the uploaded version did not contains these lines (it was not in mine and the previous poster ones too).

And if you do not have these lines AND not the problem then I am puzzled :)

silviogutierrez’s picture

Annakan,

I don't have the lines, and it still works fine. I don't see a reason why system.admin.inc should be included, since it's included automatically.

I'm puzzled too.

Silvio

Annakan’s picture

I am still in the process of reading the Pro drupal dev book but if I got my lesson right you have to include this lines because the menu item you are referring to is in another module (but you know this right) than the one you are referencing it from.
But if the effect of the line is to make an include happens and you do not need it in your code that means in your installation this include is already done.

I do not know enough of drupal internals to check that though and all the "calling by name / untyped stuff" do not aid tracing :)

But I think the proper way is to specify the two parameter.

I should try to do a fresh install myself and see If I have the same problem you do not have. ;)

(I had it on two different install before reporting it but I will try to do one only focused on that point)

Tomorrow though :)

silviogutierrez’s picture

Status: Postponed (maintainer needs more info) » Fixed

Annakan,

Turns out you were right. I looked at other modules, and they use the solution you proposed.

Thanks a lot,

Silvio

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.