Hi,

When I add a user and want to create a userdomain automaticly or by using the checkbox, I get the following after creating the user:

Your personal URL could not be created.

I have had this working but can't figure out what setting it was before. I was testing the system so I enabled a lot of options and finally it worked, but for the moment it doesn't and I need to find out what setting I need.

Thanks

Comments

agentrickard’s picture

The role must be given the 'create personal domain' permission. And the settings must be configured at 'admin/build/domain/user'.

There may also be a bug here.

MatBoy’s picture

Hi,

Still the same issue with these settings.

What I know is when I had it working before that the username, so also subdomain, I addes was not listed under the userdomains so that a specific username could not be registered anymore.

When I manually add a subdomain, the userdomain is listed.

agentrickard’s picture

Status: Active » Postponed (maintainer needs more info)

I do not understand what you are trying to report.

Here is some background on the design.

-- By design, if you create one.example.com, the username 'one' can no longer be registered or used.

-- Domains created by users are stored in the {domain_user} table and shown as the list of user domains.

There may be bugs here, so a clear report (including URLs, steps taken, access settings) would be helpful.

agentrickard’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

There was a bug in the creation sequence. Should be fixed in HEAD today.

NeuZeitgeist’s picture

Component: - Domain User » Miscellaneous
Assigned: Unassigned » NeuZeitgeist
Priority: Normal » Critical
Status: Closed (fixed) » Active

The same story is for me. Yesterday it worked. Yesterday - all my troubles seemed so far away... I reinstalled Domain access and right now module doesn't create subdomains on users' registration... What to do?!
I activated "create personal domain" in Access control for anonimous users.
In "User domain settings" I activated "Automatically create domains for new users"
for "User login behavior" - "On login, go to personal domain"
Domain table prefixing -Obey the settings in Domain Prefix (I don't want to create prefix)
In my table "users" for users there is hote like this: "a:1:{s:11:"domain_user";a:1:{i:0;i:-1;}}" But in table user_domain there are nothing.

agentrickard’s picture

Version: 5.x-1.0rc1 » 5.x-1.0
Component: Miscellaneous » - Domain User
Assigned: NeuZeitgeist » Unassigned
Priority: Critical » Normal

This may be related to http://drupal.org/node/228178

What is the root domain for new user domains set to?

agentrickard’s picture

It may also be that this is occurring for non-anonymous users, so any role that should be able to create a domain should get the 'create personal domain' permission.

The line in the code that controls this behavior is:

      if ($edit['domain_create_user'] && !user_access('create personal domain', $account)) {
        drupal_set_message(t('Your personal URL could not be created.'));
      }

To debug, put in this code:

      if ($edit['domain_create_user'] && !user_access('create personal domain', $account)) {
        print '<pre>';
        print_r($edit);
        print_r($account);
        exit;
        drupal_set_message(t('Your personal URL could not be created.'));
      }

Then copy that to a text file and attach here.

NeuZeitgeist’s picture

Assigned: Unassigned » NeuZeitgeist

Registered user can create subdomain manualy if set "Ask users if they would like to create a domain". But only as registered user. Anonimous user still can't create subdomain, even if set "Ask users if they would like to create a domain" and "create personal domain" in Access control.

agentrickard’s picture

Assigned: NeuZeitgeist » agentrickard

There's a logic error somewhere. Investigating.

[Only assign issues to yourself if you are working on the patch.]

agentrickard’s picture

I can only replicate this error under the following conditions:

-- If anonymous users have the 'create personal domain' permission
-- And authenticated users do not have the 'create personal domain' permission

I think this is a documentation issue. You must give the permission to 'anonymous users' to allow creation during account signup. But during the signup process, those users become 'authenticated' -- so half of the permission check works, and the other half fails.

Here is the current documentation:

----
3.  Permissions

Domain User adds one permission to your Access Control page:

  -- 'create personal domain'
  
Only roles that have this permission can create personal subdomains.  If you 
want users to be able to create subdomains when they register, you must give
this permission to anonymous users.

Users with this permission will have their personal domain created either:
on registration or on updating their account.

Suggested change is:

----
3.  Permissions

Domain User adds one permission to your Access Control page:

  -- 'create personal domain'
  
Only roles that have this permission can create personal subdomains.  

If you want users to be able to create subdomains when they register, you must give
this permission to the 'anonymous users' role and to the 'authenticated users' role.

If you are assigning additional roles during account creation, you may also need to 
grant the 'create personal domain' permission to those roles as well.

Users with this permission will have their personal domain created either:
on registration or on updating their account.
agentrickard’s picture

Component: - Domain User » Documentation
Status: Active » Needs review
agentrickard’s picture

Status: Needs review » Fixed

This has been committed.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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