I'm testing the new version 6.x-2.5 and getting these warnings after installation:

* warning: Parameter 1 to admin_menu_admin_menu() expected to be a reference, value given in .../www/htdocs/includes/module.inc on line 483.
* warning: Invalid argument supplied for foreach() in .../www/htdocs/includes/menu.inc on line 258.
* warning: call_user_func_array() expects parameter 2 to be array, string given in .../www/htdocs/includes/menu.inc on line 452.

Comments

brt’s picture

Title: Warnings after installing Domain Access 6.x-2.5 » Warnings after installing Domain Admin 6.x-2.5

Correcting typo in the heading.

Also the normal "Domain Access" menu items in "Site building" seems to be missing after installing "Domain Admin"

ergonlogic’s picture

Title: Warnings after installing Domain Admin 6.x-2.5 » Warnings after installing Domain Admin 6.x-0.4

Presumably you meant the latest version of Domain Admin (6.x-0.4)?

We just finished the basic merger of Domain Admin and Domain Admin Helper (ref:#778510: Merge with Domain Administration Helper), so we appreciate you testing the new functionality. For testing purposes, please update to Domain Admin 6.x-1.x-dev, as that's where we'll be committing bug fixes.

brt’s picture

Updated to Domain Admin 6.x-1.x-dev

Warnings:
* warning: Invalid argument supplied for foreach() in .../htdocs/includes/menu.inc on line 258.
* warning: call_user_func_array() expects parameter 2 to be array, string given in .../htdocs/includes/menu.inc on line 452.
* warning: mysqli_real_escape_string() expects parameter 2 to be string, object given in .../htdocs/includes/database.mysqli.inc on line 323.

These warnings appear on all pages when logged in as User 1. Other test users don't see the warnings.

Normal "Domain Access" menu items in "Site building" still seems to be missing.

nirbhasa’s picture

Taking a look now...I've a feeling I know what is happening

ergonlogic’s picture

Fixed error on line 258 in latest commit, along with code cleanup.

Needs further testing, especially on install.

Also added dependency on domain_conf: http://drupal.org/cvs?commit=372696

nirbhasa’s picture

thanks ergonlogic...just got there before me :)

I could only replicate the line 258 error - fixable by turning the domain view access callback to an array

I also noted the errors with domain_conf, and was about to solve it by adding 'module_exists' checks in the menu access, translate access and block functions..but im also ok with just adding a straightforward dependency, its certainly much simpler

will test your changes now

nirbhasa’s picture

Version: 6.x-0.4 » 6.x-1.x-dev

Ok tested your changes, everything worked out...I made a couple minor string changes and removed some module_exists checks on domain_conf since it is now a full dependency. I committed changes to head, not sure when the dev snapshot will be generated. I think we can close this issue and make a 0.5 release

And...as regards btw's observation on the Domain menu items being missing, the items are certainly there as local menu items and in the Admin Menu dropdown, but in the default Drupal navigation menu they are not. It's a tiny bug (I mean, who uses the navigation menu these days?) and it may very well be to do with the main Domain Access module, rather than Domain Admin. I'm inclined to leave it be for now.

brt’s picture

Thanks, this is a great model for our needs. The "Multiple permissions for each aspect of domain adminstration" solves many problems for me.

Installed the latest 6.x-1.x-dev (29.5.2010)

When "Domain Admin" is installed I still get this error on every page.
warning: mysqli_real_escape_string() expects parameter 2 to be string, object given in /home/mws/www/htdocs/includes/database.mysqli.inc on line 323.

I can change to mysql in settings.php which naturally removes this error, it is therefore not a major issue.

ergonlogic’s picture

@nirbhasa: I'd run it through coder tough-love, which entailed a bunch of very minor changes. I figured I'd post it as soon as I saw you were working on it.

Domain_conf seems to be a fairly innocuous dependency, but then perhaps it deserves some discussion. Certainly in my use case, I can't do without it. But considering how many other modules could potentially be integrated with Domain Admin, I'd agree with making module_exists() checks everywhere.

I can confirm the Domain menu item disappearances, and agree on ignoring it for now. Odd though... So on with the releasing!

@brt: Thanks again for testing, but I haven't been able to replicate the error you're reporting. Could it be a conflict with another module?

ergonlogic’s picture

Status: Active » Fixed

Marking as fixed.

@brt: feel free to re-open this issue if your error persists.

nirbhasa’s picture

Im happy with keeping the domain_conf dependency, I'll bet that 99% of DA installations have it. I also take your point about coder tough love, ill do it in future :)

brt’s picture

I systematically uninstalled and reinstalled almost every module in the installation and somewhere in the process the mysqli_real_escape_string() error disappeared. Unfortunately I can't say which module seems to have caused the conflict. I can't recreate it and can't explain it.

Note: Changing to mysql in settings.php in fact did not solve the problem, but that is now also irrelevant.

brt’s picture

Status: Fixed » Needs work

I have tracked the problem down. Once the Locale (core) module is installed AND a second language (German in my case) is added the error pops up.

nirbhasa’s picture

Hmmm...I am also using this module on a multilingual installation with locale enabled with no problems. Let's see...

brt’s picture

Other Modules I have installed:

Administration menu 6.x-1.5
Advanced help 6.x-1.2
Colorpicker 6.x-2.0
Content Construction Kit (CCK) 6.x-2.6
Devel 6.x-1.20
Domain Access 6.x-2.5
Domain Admin 6.x-1.x-dev (2010-Jun-04)
Domain Blocks 6.x-1.3
Domain Bonus 6.x-1.x-dev (2009-Jul-01)
Domain User Edit 6.x-1.x-dev (2009-May-27)
FileField 6.x-3.3
ImageAPI 6.x-1.8
ImageCache 6.x-2.0-beta10
ImageCache Actions 6.x-1.7
ImageField 6.x-3.3
Poormanscron 6.x-2.2
Printer, e-mail and PDF versions 6.x-1.10
Scheduler 6.x-1.7
Twitter 6.x-2.6
Views 6.x-2.10
Wysiwyg 6.x-2.1

nirbhasa’s picture

Can you use devel to get a trace of the problem?

brt’s picture

The problem disappears when I set a Default front page for domain 0 in Site-configuration > Site-information.

I'm not sure about this but:
It seems the problem comes from the sql-query on line 584 in domain_admin.module.

If $domain_vars['site_frontpage'] is not set this query fails.

nirbhasa’s picture

Assigned: Unassigned » nirbhasa

Ok, working on this now, should have patch today

nirbhasa’s picture

Ok, patch committed to HEAD.

To get book bid, we try first to find the bid of the current node, if the node isnt available we try and get it from the front page if it is set. If that doesnt work, the link is not displayed.

nirbhasa’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

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