Running Drupal 7.14 under MAMP (Apache, etc) on OSX, port 8888, connecting to localhost - install of module went okay, but when I try to enable the Domain Access module I get the following error:

Notice: Undefined index: description in drupal_check_module() (line 1207 of /Applications/MAMP/htdocs/drupal-1/includes/install.inc).
(Currently using Domain Access The domain string is invalid for localhost:8888:
At least one dot (.) is required, except for localhost.
If you are using drush, please ensure to provide the --uri option.)

No doubt the localhost string match isn't happy about the 8888 - any advice?

More:

Tried to do it with connecting as 127.0.0.1, instead of localhost and got the following error: Domain access failed to load during phase: bootstrap include. Please check your settings.php file and site configuration. The content access permissions need to be rebuilt. Rebuild permissions. I rebuilt the permissions, and still get: Domain access failed to load during phase: bootstrap include. Please check your settings.php file and site configuration.

More: I made some changes to the module to be happy enough to accept localhost:8888 - at least to not complain about it.

Progress! After reading the install documentation, I've got things to work, but not without the patch to the core Domain Access to allow for the domain to be localhost:8888. I'm not sure how to make patches, but I'm sure someone else out there will want to address this in the future.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sphet’s picture

Issue summary: View changes

Tried to do it with connecting as 127.0.0.1, instead of localhost and got the following error:

Domain access failed to load during phase: bootstrap include. Please check your settings.php file and site configuration.
The content access permissions need to be rebuilt. Rebuild permissions.

I rebuilt the permissions, and still get:

Domain access failed to load during phase: bootstrap include. Please check your settings.php file and site configuration.

sphet’s picture

Issue summary: View changes

More information

sphet’s picture

Issue summary: View changes

After some poking around...

agentrickard’s picture

Status: Needs work » Active

See http://drupal.org/patch/create. Only patches can be marked "needs work."

You have two options here:

1) Patch domain_valid_domain() to allow for ports on localhost. (I would accept a patch for that. If you cannot write a patch, just post the modified function code.)

2) Use hook_domain_validate_alter() in a custom module to allow this exception.

The other issues are unrelated and part of proper installation.

agentrickard’s picture

Title: Cannot enable Domain Access module with site running on non-standard port » Using localhost with a port protocol does not validate

Better title.

agentrickard’s picture

Status: Active » Needs review
FileSize
2.36 KB

Here's a patch that should fix the issue.

agentrickard’s picture

Status: Needs review » Fixed

Committed to 7.x.3 96fa47d..56f0d38

agentrickard’s picture

Status: Fixed » Patch (to be ported)

Patch coming for 7.x.2.

agentrickard’s picture

Committed to 7.x.2. 4199efe..4c4b985

agentrickard’s picture

Status: Patch (to be ported) » Fixed
FileSize
867 bytes

Committed to 6.x.2. 79a51e1..671ee4b

Status: Fixed » Closed (fixed)

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

judikins’s picture

Please help. I'm trying to apply this patch to get the Domain Access module installed. What does this mean?

/Applications/MAMP/htdocs/sites/all/modules/domain Judi$ patch < 1602214-localhost-domain-access.patch
patching file domain.module
Hunk #1 succeeded at 1241 (offset -23 lines).
can't find file to patch at input line 24
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/tests/domain.test b/tests/domain.test
|index e75d348..57ee04a 100644
|--- a/tests/domain.test
|+++ b/tests/domain.test
--------------------------

Thank You.

Summit’s picture

Status: Closed (fixed) » Active

Hi,
I think this patch needs to be added to 7.3 branch, without it I have same error on 7.3.dev.
EDIT: Patch is committed..but still same error...
Greetings, Martijn

agentrickard’s picture

Status: Active » Postponed (maintainer needs more info)

@judkins -- that means you probably applied the wrong patch. Which version of DA are you running.

@Summit -- The patch in #3 was already committed. Please report exactly what is happening.

houlihas’s picture

I'm running Drupal 7.14, and need a patch to eliminate the subdomain validate. Still getting "WWW prefix handling: Domains must be registered without the www. prefix" error when trying to enable Domain Access module 7.x-3.4

houlihas’s picture

Disregard, found Rory's other patch here:

http://drupal.org/files/domain-7.x-3.x-dev-validate-www-prefix-if-handli...

Thank you Rory!

-sMh-

agentrickard’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)
ejah’s picture

Title: Using localhost with a port protocol does not validate » Currently using Domain Access The domain string is invalid for www.mysite.com

Getting the same error, running a clean Drupal 7.14 with DA 7.x.3.4 on hosted environment, while installing it in an existing site, or on localhost, it works fine.
Am i missing something here?
thanks
Ernst

ejah’s picture

Version: 7.x-3.3 » 7.x-3.4
Status: Closed (fixed) » Active

Installation of DomainAccess fails:
The message I get is:

Notice: Undefined index: description in drupal_check_module() (line 1207 of /home/vhosts/mydomain.com/httpdocs/includes/install.inc).
(Currently using Domain Access The domain string is invalid for www.mydomain.com:
WWW prefix handling: Domains must be registered without the www. prefix.
If you are using drush, please provide the --uri option (e.g. drush en domain --uri="http://example.com/optional_subdirectory").)
I installed D7.14 clean on shared hosting, all defaults. Drupal works fine, no issues. The first module to enable is Domain Access 7.x.3.4, after modifying the settings.php in sites/default. There is no mydomain.com subdir under sites.
Then I get the above error message.
What can I do to further debug this issue?
Thanks,
Ernst

agentrickard’s picture

Status: Active » Closed (fixed)

Open a new ticket please. As a support request with clearer steps.

agentrickard’s picture

Issue summary: View changes

Success!