Hi,

I've installed domain access and domain locale on my local windows machine to test some multisite / -language setups.

I'm using domain access 6.x-2.1 and the alpha1 release of domain locale. I can set up the domains and add languages from the main domain. I've set up a 'path prefix with language fallback' config and added a path prefix to each language.

The main domain is http://admin.example.com with a set of subdomains in the form de.example.com, fr.example.com for the different countries.

When I try to call http://de.example.com/admin/build/domain/language/2 the crash happens. In watchdog I have the following entry Object of class stdClass could not be converted to string in C:\path\to\drupal\includes\bootstrap.inc on line 768.

CommentFileSizeAuthor
#10 672460-domain_locale-DRUPAL-6--1.patch1.81 KBnonsie

Comments

nonsie’s picture

Status: Active » Postponed (maintainer needs more info)

Could you please post which languages (including their prefixes) you have enabled?

The error message indicates that it fails in drupal_validate_utf8() which is called by check_plain() in theme_domain_locale_languages_overview_form which is a slightly modified version of a core function.

rogerpfaff’s picture

i have set up english (en) as standard, german (de) and french (fr).

nonsie’s picture

Also, are you running the latest core version? What other modules that alter language settings do you have enabled?

rogerpfaff’s picture

it's tested with the newest core version. no other modules than the standard core modules are enabled except domain access, domain config, domain locale, locale and content translation.

rogerpfaff’s picture

some more info on this. If I click on the language link of my main domain I get the following errors:

warning: Invalid argument supplied for foreach() in C:\...\includes\form.inc on line 1206.

recoverable fatal error: Object of class stdClass could not be converted to string in C:\...\includes\bootstrap.inc on line 774.

warning: preg_match() expects parameter 2 to be string, object given in C:\...\includes\bootstrap.inc on line 777.

recoverable fatal error: Object of class stdClass could not be converted to string in C:\...\laser2000.local\includes\bootstrap.inc on line 774.

warning: preg_match() expects parameter 2 to be string, object given in C:\...\includes\bootstrap.inc on line 777.

recoverable fatal error: Object of class stdClass could not be converted to string in C:\...\includes\bootstrap.inc on line 774.

warning: preg_match() expects parameter 2 to be string, object given in C:\...\includes\bootstrap.inc on line 777.

rogerpfaff’s picture

the error persists also in the dev version.

rogerpfaff’s picture

I've tested the configuration on a ubuntu 9.10 with newest lamp installation and the error occurs there too

nonsie’s picture

I haven't been able to replicate this on my local dev copy. If you put debug code in form.inc which form element does it complain about?

rogerpfaff’s picture

ok, I found the problem.

in domain_local.admin.inc on line 68 you set the default_value for site_default to $domain_default. In my config this is an object and causes the error.

When I use $domain_default->language it works.

nonsie’s picture

Version: 6.x-1.0-alpha1 » 6.x-1.x-dev
Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new1.81 KB

Now I see what's happening. You do not have default language enabled with Domain Conf so it falls back on language_default() which returns an object. The same thing is happening in domain_locale_languages_overview_form_submit().

Patch against dev version attached.

rogerpfaff’s picture

Status: Needs review » Reviewed & tested by the community

the patch works. thank you!

nonsie’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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

danmed’s picture

Version: 6.x-1.x-dev » 6.x-1.0-beta1

Hello,
I have the same symptoms, with Domain Locale 6.x-1.0-beta1 installed.
same errors when clicking on the "languages" link for the default domain.
Is the patch above OK to be applied to my version of the module?

SOLVED:

Editing my own comment: Looked closer at patch command and the patch itself: is already applied in my current module version.
I got the error messages away by selecting a default language for the default domain (did I miss that radio button?).
maybe I need rest.