Closed (outdated)
Project:
Inline Registration
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Apr 2010 at 10:48 UTC
Updated:
14 Aug 2021 at 03:31 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
hunmonk commentedsomething is clobbering the #submit array prior to the form getting to LT.
i suspect it's the way inline reg. is handling the #submit array in it's form_alter function. it's a bug that inline reg is using array_reverse() to put it's submit handler first -- that completely wrecks the original order of the handlers, which might be important depending on what else is installed. instead, the module should do:
that adds the handler to the front of the array without disturbing the other elements.
Comment #2
Lbob commentedHunmonk, thank you for your response.
I'm not a programmer, so I'm afraid I don't understand everything you're saying ;)
However, in inline-registration.module, I replaced
$form['#submit'] = array_reverse($form['#submit']);by$form['#submit'] = array_unshift($form['#submit'],'inline_registration_submit');on line 50.I still get the same error message... Where did I get it wrong?
Comment #3
hunmonk commentedyou're using array_unshift() incorrectly. replace your array_reverse() line with the exact line of code i provide in #1.
fyi, it's very easy to search php.net for function help: simply visit php.net/<name_of_function>, like:
http://php.net/array_unshift
Comment #4
Lbob commentedI did that too :
But I still have the same error...
Comment #5
hunmonk commentedwhat's the exact error message?
Comment #6
Lbob commentedsame message:
Comment #7
hunmonk commentedit's not a bug in the code i've given you. something other module is doing nasty things with the $form['#submit'] array, and it shouldn't be.
your issue is out of scope for the bug reported. i suggest you start disabling other contrib modules until the problem goes away, then file another bug with that module.
let's make this issue about fixing the spotted problem with inline reg.
Comment #8
Lbob commentedI disabled the following modules, which were the only other modules I was using that had a "$form['#submit']" array in them:
- rules
- hierarchical select
- cck
- location
But that didn't fix the issue: I still get the same error message again...
The only way to get rid of the error message is to disable the 'login tobbogan' module.
Actually, I wouldn't mind disabing it, as long as I find another way to display 2 emails fields in the registration form
=> see http://drupal.org/node/583152
Comment #9
hunmonk commenteddisable *all* other contrib modules, including inline registration. the only contrib module that should stay enabled for this test is logintoboggan.
if you still have the error after you perform this test, then my only other guess is that there's something seriously broken with your drupal base installation.
Comment #10
boreg commentedThis happen when login tobogan and inline registration modules are instaled together. I'm also not very skilled programmer, but this error happen when the array is empty, so simple add condition into login tobogan module:
i covered this
into this simple condition:
That works for me well!
Would be great if someone will find better solution. Rather change code in inline registration module, cause its still in development? Anyway looks like its more login tobogan problem, because we always have to assume empty variables :)
Sorry for my english :\
Comment #11
hunmonk commentedno, we shouldn't have to assume that's an empty variable. core should *always* populate that variable, and no module should ever completely unset it.
as a test, enable just core and the logintoboggan module, and see if you get any errors. then enable core, logintoboggan, and inline registration, and see if you get any errors. if you get no errors in the first case, but errors in the second case, then you've triangulated the problem ;)
this has nothing to do with anything ;) a bug is a bug, no matter what stage of development a module is in...
Comment #12
Lbob commentedThank you Boreg,
I'll try that, but I had Drupal uninstalled, and now I'm trying other things... I'll keep you posted when I try your solution!
Comment #13
derjochenmeyer commentedHere is a patch that uses array_unshift() in the right position.
In addition to this line, that uses array_reverse
there's another line that has to be changed, otherwise the 'inline_registration_submit' callback gets added twice:
Comment #14
elamanIssue is very old. Closing it.
Comment #15
elaman