Project:Membership types and registration modification
Version:5.x-1.0
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

(added as new bug as requested)

After filling out the standard Drupal registration form, and clicking submit, a "virgin" installation takes you right back to the homepage, where everyone has authorization to view it.

In my development site, where I have tried to implement your module, the user is taken back to /student_path/0/3 (or similar path) instead. Can you point me to the setting or checkbox that is making this happen? It is crucial that they be brought back to the homepage, because they have not yet received the confirmation link, and therefore receive a Access Denied message.

Comments

#1

Try changing the return value of the function nf_registration_mod_submit_intercept to return''; (two single quotes).

#2

If I understand you correctly (I don't know any PHP), you would like the line to now read:

} // function nf_registration_mod_submit_intercept(return'')

Is this correct?

If it is, then it didn't work for me. After registering (username and email address) and hitting submit, I am still taken to student_path/0/6, which should only happen after they have returned from their authorization email.

Please advise. Thanks!

-David

#3

Sorry, I didn't realize you have no coding background.

What I meant was: the last line in that function returns a value. It should be line 1090 since the first line you changed was the close of the function and this latest you've changed is the first line of that function.

So the last line of the function that starts with 'return' and continues with some long return value should be changed to the line I mentioned before: return '';

So try that. Hopefully I was explicit enough this time.

#4

Thanks for the clarification. If I understand correctly, I will alter line 1090...

From:
  return $routes[$mems[$form_values['mem_choice']]]. '/0/' .$uid->uid;

To:
return '';

Holy crow! It worked! Thank you!

Now, it goes back to the homepage, as expected.

Then, I receive the confirmation email, and click on the link.

Next, I put in a new password, and click submit.

Finally, I receive the following error message:

You still have some mandatory data to enter before you can use this website. You need to complete: reg_basic, reg_student
You still have some mandatory data to enter before you can use this website. You need to complete: reg_basic, reg_student
You still have some mandatory data to enter before you can use this website. You need to complete: reg_basic, reg_student
You still have some mandatory data to enter before you can use this website. You need to complete: reg_basic, reg_student
You still have some mandatory data to enter before you can use this website. You need to complete: reg_basic, reg_student
You still have some mandatory data to enter before you can use this website. You need to complete: reg_basic, reg_student
You still have some mandatory data to enter before you can use this website. You need to complete: reg_basic, reg_student
You still have some mandatory data to enter before you can use this website. You need to complete: reg_basic, reg_student
You still have some mandatory data to enter before you can use this website. You need to complete: reg_basic, reg_student
You still have some mandatory data to enter before you can use this website. You need to complete: reg_basic, reg_student
You still have some mandatory data to enter before you can use this website. You need to complete: reg_basic, reg_student
The changes have been saved.

I am sure that there is just a simple setting wrong, no? I'm almost there! Let me know where I went wrong. Thank you SO much for all your help!

#5

What page is it at when you get the last error?

#6

OK...I realized that the Content Type permissions weren't set correctly.

Now they are, and I have one more wrinkle.

At some point, I deleted my two membership types (Student and Parent) and recreated them, thinking that I had done something wrong, and wanting to start from scratch.

Now, when I go to create a new account, I receive a menu that shows Membership Types of the following:

Student
Parent
Student
Parent

I have tried to clear the cache in IE and Firefox, and still get the same thing.

I even tried deleting ALL membership types, to see if that would cause the menu to have NO items listed, and still I get the same four above.

Attached is a jpg of the current Membership Type settings.

Any thoughts?

AttachmentSize
membership_types.Jpg 42.39 KB

#7

That looks like a bug. I think someone mentioned it elsewhere, but I can't seem to find it now. Do you have access to your database? If so, you can safely delete the entries in the 'variable' table for this module. There are up to 5 entries and they start with 'nf_registration_mod_' . The reason you might not have all five depends on how far you got into the setup process. All entries will be recreated when you start setting things up again.

#8

Thanks for the quick reply.

I deleted the records in the variable table, but it doesn't solve the problem. The menu is the same, and when I go to admin/user/nf_registration_mod, I still see the membership types.

I did a search through the database for nf_registration% and came up with other references. Should I delete these as well?

101 match(es) inside table accesslog
1 match(es) inside table cache
2 match(es) inside table cache_menu
1 match(es) inside table system
10 match(es) inside table watchdog

(I may go ahead and delete the cashe and cache_menu records if they don't look too dangerous...)

Also, do you need me to make a separate bug report for this?

#9

I did not delete the cache and cache_menu records...I'll await your instructions.

Thanks,

David

#10

I forgot to mention that you should clear the cache. If you go inside that table, you'll see an entry for 'variable', so even thought the values are gone from the variable table, they are living on! Die variables, die!

Kill them at your leisure.

#11

I needed to kill more than just the record in cache, but also cache_page (and perhaps the other cache_ tables...I did them all, but I think cache_page was the culprit).

Now my Membership Types menu looks correct at registration.

So here's where I'm at. I registered as Student. When I receive my confirmation email, and click on the link, I am able to change my password and hit submit. At that point I am taken to /user/9 (whatever the user number happens to be). I am NOT taken to the pageroute.

My first guess is that, in "Content Type Adjustments", one of the two pages in the student_path is listed as "disabled" even though the actual page is listed as "activated" when you edit it in pageroute.

I have taken screenshots of all the relevent screens, but can't seem to figure out how to attach more than one of them to this posting, so I will add additional postings at the bottom with more screen shots.

I feel like I am so close...but just can't get there! Ugh... Any help would be appreciated!

AttachmentSize
Pageroute List routes.Jpg 14.08 KB

#12

edit student_path.jpg

AttachmentSize
Edit student_path.Jpg 27.06 KB

#13

Edit student_path Avanced Settings.jpg

AttachmentSize
Edit student_path Avanced Settings.Jpg 33.5 KB

#14

student_path List pages.jpg

AttachmentSize
student_path List pages.Jpg 21.64 KB

#15

page1 (top).jpg

AttachmentSize
page1 (top).Jpg 45.95 KB

#16

page1 (bottom).jpg

AttachmentSize
page1 (bottom).Jpg 34.83 KB

#17

page2s (top).jpg

AttachmentSize
page2s (top).Jpg 47.51 KB

#18

page2s (bottom).jpg

AttachmentSize
page2s (bottom).Jpg 36.99 KB

#19

Reg Membership Types.jpg

AttachmentSize
Reg Membership Types.Jpg 33.82 KB

#20

Content type adjustments.jpg

AttachmentSize
Content type adjustments.Jpg 80.74 KB

#21

First, if you use firefox, there's a cool add-on called screengrab! that will take screen shots of entire pages, not just the visible portion.

Second, see my attached screenshot to compare to yours at #12/13. It looks like we are using different versions of pageroute. Otherwise, perhaps I have something else enabled? I'll check about that.

As for #20, it appears I'm not very clear in my explanation, but the "disabled" refers to the menu item relating to that page. You typically want to check all boxes and then hit "Disable menu items" because this module should handle whether people are routed to the pages or not.

I didn't notice any pages designated as required. I think this may be all that is left to get this to work. You see, this module does NOT route users to the pageroute itself when they come back after email verification. Rather, they go to the pages (related to the pageroute) that are a part of their user profile. So, if there are no required pages, they will simply go to their profile page as you indicated. To fix this, check whichever pages you want to be required and then click "Require for login". I'm pretty sure I put that in the README, but perhaps I missed it. Let me know, would you?

Anyway, once you have required one or more pages, as you login, you should now be routed to whatever has not been filled in by that user yet.

Note that in my screenshot, I'm using tab-like submit buttons.

I think that should do you. Let me know how it goes. And I think I'll add these issues' URLs to my README. They may be useful for others.

AttachmentSize
Edit route.png 203.61 KB

#22

To be more clear on you ending up at user/9:

That should only happen that first time you log on after email verification and only if you have not required any of the content types. This is normal Drupal behavior if my module is not installed.

Subsequent logins should take you to whichever page you were headed to - unless you've required content types as I described above. Once those content types are created by that user, subsequent logins will no longer involve this module.

#23

Regarding #7, I found it here: http://drupal.org/node/157295

Since this issue is actively participated in, I'm marking the other as duplicate.

#24

Hooray! It's working! (I think...).

Here's what happens. After registering, and clicking on the link in the confirmation email, I am taken to the user edit screen where I can change my password. At the top of the page, in green, is a message telling me that I have some mandatory data that I need to fill out.

It does NOT present the pages at this time. The only way it will present the pages is if I log out, and then log back in. At that time, it brings up the pageroute, where I can fill out the required info.

Is there any way to log the person out right after they enter in their new password - to make them re-login immediately?

Is this currently working the way it is supposed to?

#25

I think that once the person is logged in for the first time as you describe, browsing to any page outside of their profile will route them to a page they need to fill out. So try creating a user, verifying the email/logging in, and if you aren't presented with the stuff to fill out, browse to any page outside of the profile.

Perhaps I should add to the message you're seeing that they should click on edit - there is an edit tab visible in their profile, right?

#26

Status:active» fixed

Fixed the original message of this post.

Most of the conversation here should have been continued at the previous post. That's why I suggested a new post for that issue. Oh, well.

#27

Sorry if I posted in the wrong thread.

You are correct: when you click on any other link, it takes you to the pageroute. The only exception is when you click on Home, in which case you are logged out (strangely). Either way, it works for me.

How do I control where the user is taken after they hit submit on the pageroute? When my user hits submit, they are taken to the beginning of the route again, rather than to the home page, which is where I would like them to go.

#28

In the screen shot above, notice that you can specify a redirect URL for after the user has finished the pageroute. I noticed in your screen shots that you didn't have that field. So you'll have to find out where it's gone off to (whether it was removed or made part of another of fago's modules).

#29

Upgrading to the development snapshot (5.x-1.x-dev) gave me the advanced menu that I needed.

My friend, I think I am finally done! Time to go find some other module developer to bug now...

Thank you SO much for your patience!

-David

#30

Feel free to work up any additions/changes you think should happen to the README file. That would be a good way to give something back.

#31

Status:fixed» closed (fixed)