Closed (fixed)
Project:
Inline Registration
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Jun 2008 at 22:05 UTC
Updated:
30 Jul 2015 at 23:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
kulfi commentedsubscribing
Comment #2
Hwangar commentedI think I can realise what can be happening... I ported recently to D6, I'll correct it because it's another module I use...
I'll post it soon.
Comment #3
xamountI struggled with this same exact issue and this is what I did to overcome it. I created a custom module and inside hook_form_alter I put:
Comment #4
livido commentedThis module dont call hook_form_alter for user_register form then this module can not integrate with other module that hook alter user register form.
But we can change a little to use with other module .
Sample with Email registration module :
Change the line 24 :
$form['register']['form'] = user_register();to :
Comment #5
xamountMy previous suggestion is cleaner as you don't actually have to edit the email_registraion.module (hence it will be easier to upgrade). If you did it my way, all the changes will go in your own custom module.
Comment #6
livido commentedI added the callback to form alter for user-register form. So you don't need any modification more.
Comment #7
najibx commentedHi, just to confirm current status on D6 as I'm not getting it as expected without any modification. Email registration works only when registering new account not when adding content (content type with enabled inline registration). Username still shows up.
Inline Registration 6.x-1.x-dev 2009-Apr-07
Email Registration 6.x-1.x-dev & 6.x-1.2
Thanks !
Comment #8
pieterdcCreated a patch against today's dev version.
Works on my site (with email_registration 6.x-1.3 and a custom module that further alters the registration form).
Comment #9
twooten commentedI tried the patch from #8 and am still getting the "choose a username" field on my inline registration forms. I tried first with email_registration 6.x-1.2, then updated to email_registration 6.x-1.3. Using Drupal 6.16.
I love the Inline Registration module, great job! I'm about to roll it out to about 20 sites today.
Tim
Comment #10
pragnatek commentedThanks @PieterDC for patch in #8. Just what I was looking for.
I'm using this patch with 6.x-1.3 and it does the job very well. It allows other modules to alter the registration form (as well as the inline_registration module) which means hook_form_alter's from other modules such as email_registration, avatar or terms_of_use, now show up along with the inline_registration.
Unless I'm missing any unforeseen consequences, this patch would be worth putting back into the module.
also @PieterDC - are able to share your other "custom module that further alters the registration form"? - you've sparked my interest into what's possible!
Comment #11
pieterdc@pragnatek: Imagine! ;-)
Comment #12
pragnatek commented@PieterDC: I'm imagining!
btw I've just hit the issue of the inline_registration + email_registration + logintoboggan(configured for 2 email fields on registration form) fails to check that the submitted emails match. Workaround is just to use 1 email field.
But in my imagination you've already fixed this ;-)
Comment #13
pieterdcI haven't. I use only one email field.
Comment #14
geek-merlinkey is this line:
but drupal_retrieve_form does not fire the hooks that email_registration uses.
simply changing to
which fires hooks raises many issues,the simplest of which is having the captcha twice...
so we have to roll a special spliff for email_registration.
(so do we for any other module that shoud do their job...)
patch flying in that works for me!
edit: the patch is for 7.x
Comment #15
doublejosh commentedFor D6 I tried
$form['register']['form'] = drupal_rebuild_form('user_register', $form_state, NULL);, which hides the field but redirects the page back to an empty version again upon submit.Comment #16
doublejosh commentedWhops. Hadn't tried #8 yet, which works.
Comment #17
liberatrIn response to #14:
email_registration has changed their api - the function has changed to 'email_registration_form_user_register_form_alter'.
updated patch
Comment #18
jdleonardPatch for D7 attached. Thanks for everyone's help.
Comment #19
maked1sky commentedAfter patching Inline registration and adding node with inline registration appears error- see screen 001.png (sorry that there is russian)
Comment #20
maked1sky commentedthere is my Inline registration.module
I may be wrong in the code???
Comment #21
doublejosh commentedI did it the other direction #1911574: Integrate with Inline Registration
Comment #22
maked1sky commentedI'm sorry I do not understand where to put this code (I have not found ---email_registration_form_alter ()--- in inline_registration and email_registration modules
and if it works with Drupal 7?
Comment #23
cafuego commentedAtatched patch seems to work for me on Drupal 7. Unfortunately it appears to not be possible to invoke all normal form alter hooks inside a form_alter hook, so the code specifically tests for the Email Registration module and calls its alter function.
I've set the bug status to normal, as the lack of integration doesn't actually break anything and doesn't prevent Drupal from working.
Comment #24
maked1sky commentedAll the same, an error
Notice: Undefined index: name in the function inline_registration_validate () (line 125 in the file)
Comment #25
cafuego commentedinline_registration.module is only 123 files long after I patch it with the patch from #23.
Anyway, a notice isn't an error. Does the form submit OK and create a user?
Comment #26
maked1sky commentedI added patch from here http://drupal.org/node/861448 cause i have 211 strings in inline_registration.module/
May be because of this error
No. After sumbit an exception page appears
line 125 in the file:
$form_state['values']['name'] = $form_state['input']['name']; // for some reason the name is empty and a scrypt works incorrectly so copy it from other variable
Comment #27
maked1sky commentedHere my file with inline_registration.module
Comment #28
cafuego commentedThat's like trying to work on a moving target. If you're testing patches, please try only one at a time. Once one is applied to the module, if a problem occurs with another patch, you work on that one then. Not before. I appreciate that can be annoying, but I don't want to adjust a patch to someone else's work in progress (especially when it works just fine on the base code).
Comment #29
Jarviss commentedMaked1sky using you version of file I get PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'name': INSERT INTO {users} (uid, name, pass, mail, signature, created, status, language, picture, init) ........... in drupal_write_record() (line 7106 of /includes/common.inc).
Do you also get this error? As I understand it takes empty name and tries to record in user! Better approach is to make username = $account->mail
Comment #30
maked1sky commentedCarliton
Yes,after submit node I get "PDOException...."
Comment #31
maked1sky commentedCafuego
I need both the functionality of the inline registration module,because I try to added 2 patches ("integration with email registration module and registration" and "login and registration on the same page")
Comment #32
hazah commentedI'm going to weigh in on this a little bit since I've had to correct a number validation/submission quirks with this. I'm not exactly clear on the original approach so I ended up rewriting some aspects of the code to better integrate with other modules and make less assumptions about its environment.
Firstly, within
inline_registration_form_alter, this is crucial as it PRESERVES the submission handlers' order for the node. I was completely baffled by thearray_reversechoice:Secondly, I removed any assumption that this module makes about how to push the data to their respective validation/submission handlers for registration:
In
inline_registration_validate:In
inline_registration_submit:If this works for you, please let me know. Thanks.
Comment #33
hazah commentedWhat I posted does not work as is. I'm still hashing out some last details.
Comment #34
jdleonard#18 or #23 (only difference is a variable name) combined with email_registration patch https://drupal.org/node/1911574#comment-7858561 solves all integration issues for me.
Comment #35
gregglesThe patch to email_registration is now committed. Is there anything else holding back this patch?
Comment #36
nunoveloso commentedIteration of #23 (cf. interdiff). Solves some issues raised in #32, but with slightly different approaches.
Tested and working so far, please do the same.
Thanks!
Comment #37
nunoveloso commentedAdded logintoboggan and registration_toboggan modules to the bunch.
Comment #38
nunoveloso commentedAdded logintoboggan and registration_toboggan modules to the bunch.
Comment #40
geek-merlinSo this is committed.