This is a very odd problem. If an old form is used, it works fine, but if a copy is made with a new name it breaks. Even if no changes are made anywhere to the form, just the act of copying it breaks it. It breaks in two ways:
1) the email verification plugin stops working; mail is sent out directly and
2) carriage return linefeed pairs from the text area are mailed out as rnrn so all the text is smooshed together as a result.
How weird is that? I have two sites on the same server (so same apache and php). One site works fine still and one exhibits the above problem. Both sites have the same code (both mine and chronoforms versions - 3.1rc5.5). The only difference is that the site that works is Joomla 15.15 and the site that doesn't is J15.23. It was 15.22, but I upgraded it to see if that would make a difference.
The email verification plugin looks just the same in the broken copy as it does in the original working copy.
Any ideas at all bob? Perhaps there is something else that could be different between the two sites that I've overlooked? Could it be a db setting maybe? I'm pretty stumped. Both sites were dumped and restored the same way to the new server a couple of months ago. The problem may have just showed now because no new forms were made.
paul
(edited to correct the word 'validation' to 'verification', sorry for the confusion)
Hi Paul,
No immediate insights :-(
The email validation is the browser validation of a submitted email address?? If so that sounds like a JavaScript problem.
The new lines are odder, could be some kind of character set difference between LF & LF+CR ?? Is it possible that one site has extra code to use nl2br() to pre-process the textareas code . . . sounds unlikely.
There have been several shift from Joomla! 1.5.15 to 1.5.23 but the only 'big' one I remember is the MooTools upgrade plug-in - could this be the culprit somehow?
Bob
The weird thing is that all the forms work just fine -- as they have done for like a year now. It's only when he goes to make a new version from a copy that it messes up. Oh, shoot, I put validation, I meant verification; it's the email verification plugin that stops working in the copies. Sorry about that.
The other site with the same code (it was copied from the site that is messed up) works perfectly as it always did for old ones, copies and changes. It's only that one site that hates copies being made.
The forms are identical. Same code in each after simply copying it. e.g. a form called 'thankyou' works fine. Make a copy of it using the chronoforms interface and rename it 'thankyou2' and boom! it's broken. email verification breaks and \r\n are broken.
Hi Paul,
If you copy the form then you don't necessarily copy the plug-in settings. They may need to be reconfigured.
By all means email or PM me the site URL and a SuperAdmin login and I'll take a quick look.
Bob
Thanks, will do.
edit: I/they've always just copied the forms to make new ones and they always worked fine and all the plugins and config stayed the same. Simply copying them still works on the other site.
I'll update this thread with results after bob has a look himself.
MooTools upgrade plug-in
I was so distracted by the fact that I'd written the wrong name for the verification plugin that I neglected to follow that up until now. It is the case that the non-working site has that system plugin and the working site does not.
I'll check and see just why it was installed and what else will break if it is turned off.
Looks like kunena forum requires it :-(
Hi gemlog,
I believe that you ae right about the Kunena forum requiring the plug-in enabled.
There are workarounds if you need them; the 'best' answer is probably to switch to ChronoForms v4 but there is no automatic upgrade :-(
Bob
I'll do a test later when I can get a hold of the guy. I'll disable it (breaking their forum) briefly while he makes a copy and does the test quickly.
You make the change to 4.0 sound difficult. I only became aware of its existence when I logged in to ask my current question.
I can't just export the forms and reimport them? Or does uninstalling chrono3 remove the custom tables too? I could dump them first I suppose, no problem.
That info is prolly around here somewhere anyhow.
I'll let you know if disabling the mootools upgrade fixes the problem. Otherwise I'm back at square one I suppose.
Oh, and is it the case that chrono4 is not effected by mootools upgrade for sure?
Paul
edit: Yep, mootools upgrade plugin is the problem. If mootools is off (and his cache is cleared etc.), rerun browser, make copies, change the copy -- no problem. If mootools upgrade is published: have those problems.
Interestingly, any forms that are created while mootools upgrade is turned off still work fine after mootools upgrade is turned back on again, so this is a work-around for the moment.
I'm off to see what's involved in moving to chrono4 if you know it won't be effected by mootools upgrade plugin.
Thanks so much bob -- I'm sure I wouldn't have thought of checking the effect of that plugin on chronoforms.
Paul
Hi Paul,
ChronoForms v4 *requires* the MooTools upgrade plug-in.
The upgrade is more tedious than difficult; you can copy and paste over the main form code but you then need to re-set up the remaining form features: validation, emails. etc. It will work with the same data tables.
There's a modded version of CFv3.2 that can run with the MooTools plug-in in the front end - but not in the back. This may not be much of a problem in practice if you don't do much tweaking of the forms.
Bob
Hi Paul,
Yes - I'm afraid that it's a rebuild job in this case. I just looked at the two backup files (from CFv3 & Cfv4) and they are very different. It's conceiveable to write a translator for about 80% of the content but not a trivial task :-(
Bob
Off topic - but the Mail Your MP form sounds like a database driven ChronoForms application to me with one master form to display the current selection of topics and subsidiary forms to add or remove topics & templates.