"You can not replace the user register page with a node if a path has been designated as the user register page."

I just updated the module.

I'm using a page I previously created as "User Register Node".
This page is populated with a description and links to some of the other paths I defined below.
One link redirect to a page with some more description and a link to another path used by aar.

It did work fine and still works fine, but if I simply visit admin/user/autoassignrole and try to save (without modifications) the system gives me the previous red error. What's wrong? I'm a little worried about modifing the settings now, since i need aar to work on the site.

CommentFileSizeAuthor
screen-capture-2.png31.71 KBBalbo
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Balbo’s picture

Category: support » bug

My BAD!

I saw now the error was caused by "Default Registration Page" set to YES in all roles in "Assign from Path" section. Modify to NO return no error but when you visit admin/user/autoassignrole next time it again is set to YES.

Since i think this now is a bug i'm modifying Category, even if i'm pretty sure has been reported in other issues...

Balbo’s picture

Other issue... Moved to another topic http://drupal.org/node/854936

stevecowie’s picture

I get the same problem - it seems like the form is setting the value 'no' in the default registration page form but does not then fetch this when the form is redisplayed. The code that sets the default for the field is this #default_value' => (isset($defaults[$k]['registration']) ? 1 : 0) But I don't think that's right because if you want the setting to be 'No' you have set it to zero, so isset returns true. The php.net has this: "TRUE if var exists and has value other than NULL, FALSE otherwise".

jasondecamp’s picture

I am experiencing the same issue. Please address this bug. It undermines the entire point of using Auto Assign Role if I can not control what is the default user registration page.

jasondecamp’s picture

Based on the comment from stevecowie, I have updated the line 110 in autoassignrole-admin.inc to read:
'#default_value' => (isset($defaults[$k]['registration']) ? $defaults[$k]['registration'] : 0),

This fixes the bug on my site.

Sorry, I am not able to develop a patch (still a noob in training). Maybe someone else can roll it real quick?

-Jason

cyberswat’s picture

Priority: Critical » Normal
Status: Active » Fixed

I applied the code you put here ... please learn to submit a patch as placing code in comments is a waste of time and tends to get ignored.

http://drupal.org/cvs?commit=417868

Status: Fixed » Closed (fixed)

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

stratejist’s picture

I have same problem

So how is will been this code

#default_value' => (isset($defaults[$k]['registration']) ? 1 : 0)

jasondecamp did say, real fix from stevecowie. But I don't understanding from stevecowies comment. What is true code ?

Please help. My project paused.

Very Thanks