Joomla Registration not completing according to settings

Juliusm31 12 Nov, 2010
Hi,

First of, I already tried the solution suggested here:

http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=9&t=15978&p=53020&hilit=empty+passwords#p53020

It didn't work.

Here's what I need to accomplish:

I need a small, simple form that also acts as a Joomla Registration, with the following fields:

Name
Email
Zip
and a single Checkbox

The said form has to generate a password for the user. That's problem #1 which then leads to other obvious problems. When the form is sent to the user, the password is empty, so the user can't log in. As you can see from my capture below, I have the configuration set to create a password...but it doesn't.

[attachment=0]cf-joomla-registration.JPG[/attachment]

The email gets sent but on submit, the user gets the error:

"Username or password do not match or you do not have an account yet."

Other than that, it's working fine and I've even created a table to capture the data on submit. It's a thing of beauty. Now I just need the user to actually be registered, as the plugin purportedly does. But I'm completely stumped.

Any help appreciated.

Thanks
Juliusm31 14 Nov, 2010
Hi Fredrik,

Thank you for your reply. I got it to work finally. It's not 100% but at least my user is now logged in when he sends the form.

Thanks again mate.
Juliusm31 16 Nov, 2010
Hi,

To follow up on my comment about creating other obvious problems...

So I got the user to register, and automatically be logged in on submitting my form. But now, it doesn't send the user an email at all so when my user comes back, he can't log in.

The debug doesn't give me any useful information.

The form was sending the email before I employed the fix described in previous posts.

Again, any help appreciated. Thanks.
nml375 16 Nov, 2010
Hi,
It's hard to tell what might be the issue. You could try setting error reporting to full in your Joomla setup, to catch any notices or warnings generated during the registration. Any errors should stop the script processing completely, not logging the user in at all.
If possible, check the email server logs to see if the email message was handed off by Joomla, but got stuck in some spam filter or similar.

There is an issue with the mentioned fix, where an email is sent, but without username or password. I've just posted an (long overdue) update on that.

/Fredrik
Juliusm31 18 Nov, 2010
Hi,

Ok, so I managed to get an email sent to the admin, containing all the relevant data. Also, I have an email sent to my user, but it simply reads:

"You may now login to http://mysite.com using the username and password you registered with."

The error reporting didn't catch anything that I could see.

Then I tried the "fix" that Fredrik posted here:

http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=2&t=18161&start=0&hilit=auto+login+password

Suffice it to say, now I could not even get into the Chronoforms component on the admin side. It threw a parse error on line 416 and locked my ass out completely.

The only way I could get back in was to strip out your fix and replace it with the original code farmed from the initial download of the component.

Nonetheless, back to square 1 I am.
Juliusm31 23 Nov, 2010
Nothing? No help for me whatsoever? I wonder if I would get some support if I bought your component. Perhaps that's the trick to get it to work according to the settings.
GreyHead 23 Nov, 2010
Hi Juliusm31,

Sorry for the lack of an instant response - we have this thing called 'night time' in Europe were we take a few hours sleep.

Bob
Juliusm31 23 Nov, 2010
Hi Bob,

Waiting 4 days for a response is hardly asking for an immediate reply.
GreyHead 23 Nov, 2010
Hi Juliusm31,

True, I need some coffee to wake up properly. Sorry about that.

As far as I know, buying the product doesn't make any difference to the support - or lack of it :-(

I expect Fredrik will reply when he next logs in.

Bob
Juliusm31 23 Nov, 2010
Bob,

If I can get this registration form to work the way I need it to, I'll buy you a Coffee Maker mate.

Thanks though, I'm just getting a little desperate, and a tad annoyed myself. Mostly at myself and my incompetence.

Julius
GreyHead 23 Nov, 2010
Hi Julius,

Which version of ChronoForms are you using? The 3.1 RC5.5 release should be OK apart from one password bug. I haven't yet tried the 3.2 release with this plug-in so don't know if Max made any changes.

Bob
Juliusm31 23 Nov, 2010
Bob,

Now I'm at a loss mate. All I can find is a comment in chronocontact.html.php and this is it:
/*
/**
* CHRONOFORMS version 3.1
* Copyright (c) 2008 Chrono_Man, ChronoEngine.com. All rights reserved.
* Author: Chrono_Man (ChronoEngine.com)
* @license GNU/GPL
* See readme.html.
* Visit http://www.ChronoEngine.com for regular update and information.
**/

Other than that, I can't tell you what version it is because now I see I have the ChronoForms_Plugin_V3.1_RC5.2 and ChronoForms_V3.2.0 zips in my local extensions folder.
GreyHead 23 Nov, 2010
Hi Julius,

Hmmm . . . Max doesn't always update the file headers. You can find the current version from Site Admin | Extensions | Install/Uninstall then the Components tab.

Bob
Juliusm31 23 Nov, 2010
Ahh ok IC. I have v.3.2 Wonder if it's worth having a go with 3.1 RC5.5... Would I have to uninstall the version I have now and rebuilt the form from scratch?

I'm not too lazy to do it, I'd just rather avoid having to if I don't need to.
GreyHead 23 Nov, 2010
Hi Julius,

I'll take a look shortly. Just have to finish a forum installation.

Bob
Juliusm31 23 Nov, 2010
No problem Bob. Thanks mate.
nml375 23 Nov, 2010
Hi Julius & Bob,
Been out of town for the weekend, and my new daytime job tends to eat up on my free time. Hence, my response-time might not be what it used to be..

To the issue, there was a typo in the final fix at the linked thread; I've updated the post now to sort the issue. The str_replace() was missing a trailing )..
Also, the fix was written for 3.1RC5.5, though I havn't noticed any changes in the plugin file in 3.2

/Fredrik
Juliusm31 23 Nov, 2010
Hi Fredrik,

I get my user to log in, but it's still not sending the user his email and password.

Here's the code I'm using
$MyFormEmails->emails[$emailid - 1]->enabled = 1;
$MyFormEmails->emails[$emailid
- 1]->template = str_replace("{vlink}",
JURI::base()."index.php?option=com_user&task=activate&activation=".$user->get('activation'),
$MyFormEmails->emails[$emailid - 1]->template);

$MyFormEmails->emails[$emailid
- 1]->template = str_replace("{user}", $post['username'],
$MyFormEmails->emails[$emailid - 1]->template);
$MyFormEmails->emails[$emailid
- 1]->template = str_replace("{pass}", $post['password2'],
$MyFormEmails->emails[$emailid - 1]->template);

$Myemail = array($MyFormEmails->emails[$emailid - 1]);
GreyHead 26 Nov, 2010
Hi Julius,

I've added my fixes and Fredrik's to the attached copy of the plug-in file. I think it is working OK but there are now so many combinations that it's difficult to be sure that I've tested all of them :-(

A couple of small changes in Fredrik fixes - the placeholders to use in a custom email are now {username} and {password}

I have this working with your form OK.

Note that to use Auto-login you must set "New User Account Activation" to 'No' in Site Admin | Gobal Configuration | System | Server Settings

Bob

Later: attachment removed - see an updated version later in this thread.
Juliusm31 26 Nov, 2010
Hi Bob,

Ok. Did exactly what you said. I'm lost though.

Now I got my user logged in automatically. Great.
I got the admin email sent, and it includes the username and auto-generated password. Great but I'm confused about the custom email supposed to be sent to the user.

Do I have to add an additional email to be sent from the main form editing...where I setup the admin side email? Under the Setup Emails tab?

If so, how would I configure that to send to every individual users at sign up?
Dynamic To and From fields?

Like I said, confused. Thank you for all your help though. I really appreciate it.
GreyHead 26 Nov, 2010
Hi Julius,

There's a choice with the emails. In the Plug-in Configuration tab there are two Email drop downs. They both work the same way.

"E-mail the User" has 'Yes (Default Joomla! Email) as the default setting. This should send the standard Joomla! registration email to the user.

Hello Bob,

Thank you for registering at Joomla! 1.5j. Your account is created and must be activated before you can use it.
To activate the account click on the following link or copy-paste it in your browser:
http://eleanor/joomla1.5j/index.php?option=com_user&task=activate&activation=1e698d90cc8b4da738273b12de40e7d8

After activation you may login to http://eleanor/joomla1.5j/ using the following username and password:

Username: [email]info@example.com[/email]
Password: rVse1WZI



The second option is 'None' which will send no email.

The Third (and following) options match any Email Setups you have in the Form. The To field will be changed to the newly registered user's email address so you don't need to do anything else.

Sign Up NOW!
Name Bob
Email [email]info@example.com[/email]
Zip 29830
Red Tag Notify?

[email]info@example.com[/email]
e5U9BPWw

Submitted by 192.168.1.8



Bob
Juliusm31 26 Nov, 2010
My user still doesn't receive his email. The admin receives his email twice so I'm guessing the To field doesn't get changed. Right now I have just a static To field in that [email]form....signup@mydomain.com[/email]. And both dropdowns are set to Custom Email form 1.
GreyHead 26 Nov, 2010
Hi Julius,

I'll take another look in the morning. The examples I posted were from safely delivered emails (I also go the Admin email) so I'm reasonably sure it's working OK here.

Bob
Juliusm31 26 Nov, 2010
Ok Bob. Thanks again. Have a good night.

UPDATE:

I got it.

I created another email to be sent with the one that's already being sent to the admin. Instead of sending it to a static To field, I added a Dynamic To field and put my To field name (in my case text_2 for the user's email).

Then in the dropdown in Setup Emails, I chose Custom Email form 2. I simply copied the template code from Custom Email form 1 which now included {username} and {password} and dropped it into template #2 which appears below template #1.

Voila. Both emails get sent and what's great about it is now I can customize my admin email and the user email to fit both parties' needs.

Thank you Bob for helping me and putting up with my BS.
GreyHead 27 Nov, 2010
Hi Julius,

Great, I will take another look at the User Email substitution. Possibly that can be improved.

Bob
GreyHead 27 Nov, 2010
Hi Julius,

Here's a slightly updated version. This now adds the user email into a Dynamic To on a custom email. It will overwrite any Dynamic To value set in the Email Setup but will leave any To address unchanged.

The code is also cleaned up a little more.

Bob

PS Unzip the attachment. Rename the current components/com_chronocontact/plugins/cf_joomla_registration.php file to cf_joomla_registration.php.old and then upload the file from the attachment to the plugins folder.
Juliusm31 28 Nov, 2010
Hi Bob,

The weirdest things happen to me, I swear.

First I replaced the file you attached. It didn't work. So I swapped it out again with my original.

Then I had to add another field to the form...another checkbox which screwed it up completely but, I did have a backup. So I restored the backup, reconfigured the Joomla Registration, and when I tried to register a test user, the form (my original with original fields) didn't work.

So I swapped the 2 files (the one you attached above with the one I had) and then the form worked. Perfect.

Except now I have to add another field to the form which I suspect will keep me busy for at least a few more days.
This topic is locked and no more replies can be posted.