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.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | 672460-domain_locale-DRUPAL-6--1.patch | 1.81 KB | nonsie |
Comments
Comment #1
nonsieCould 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.
Comment #2
rogerpfaffi have set up english (en) as standard, german (de) and french (fr).
Comment #3
nonsieAlso, are you running the latest core version? What other modules that alter language settings do you have enabled?
Comment #4
rogerpfaffit'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.
Comment #5
rogerpfaffsome 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.
Comment #6
rogerpfaffthe error persists also in the dev version.
Comment #7
rogerpfaffI've tested the configuration on a ubuntu 9.10 with newest lamp installation and the error occurs there too
Comment #8
nonsieI 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?
Comment #9
rogerpfaffok, 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.
Comment #10
nonsieNow 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.
Comment #11
rogerpfaffthe patch works. thank you!
Comment #12
nonsieCommitted - http://drupal.org/cvs?commit=314128
Comment #14
danmed commentedHello,
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.