11001 Posts in 2733 Topics by 1823 members
|Go to End||Next >|
13 July 2009 at 5:01pm Last edited: 27 July 2009 2:31pm
I just (3 hours ago) downloaded UserForms-v0.2.tar from the Modules section because it said it was v0.2, or I think it did. Now when I go there it says v0.1 with a link to v0.2rc2. Am I imagining things?
The tar file won't open anyway which is why I went back. If 0.2 isn't stable then I'll give rc2 a go.
14 July 2009 at 11:37pm Last edited: 27 July 2009 2:31pm
I too get an error
Fatal error: Method name must be a string in /var/sites/<sitename>/sapphire/forms/Form.php on line 245
on a completely new install of 2.3.2 with userforms 0.2-rc2, spamprotection 0.2, recaptcha 0.3, mollom 0.2, googlemapselectionfield 0.1
I put userforms in /mysite/userforms (with the s on the end...)
I installed silverstripe 2.3.2, with the userforms etc. logged in as admin, and inserting a userform field didn't produce an error, but failed to actually work. I did a /dev/build and then an /admin/?flush=1 and then the error started.
I've had this error with userforms with all of the 0.2 vesrions (incl. svn) that I have tried. I simply can not get it to work.
I tried installing potentially related modules (spamprotection etc.) in case that would help, but it does not.
This is very frustrating now - have been trying (on and off) for months to get this. In the end, I had to revert to a silverstripe version that has userforms included.
Any suggestions as to what can be done to diagnose this?
15 July 2009 at 12:21am Last edited: 27 July 2009 2:31pm
Well, for some reason (and I remember reading it), I was putting the userforms directory under the mysite directory.
I have since moved it to the root of the site, and am no longer getting the error. I've tested it, and it seems to be working fine.
Hopefully this tip may help others.
15 July 2009 at 9:16am Last edited: 27 July 2009 2:31pm
slang - If you can remember were you read it let me know so I can change it
sicp - Yes sorry I was getting 1 step ahead of myself. You can download the 0.2rc2 off the sticky thread in this forum
22 July 2009 at 4:42am Last edited: 27 July 2009 2:31pm
I'm happily playing around with the new userforms, and all goes well except for one thing: for some reason the Mollom field is always active - even when the form is first called. On my custom forms Mollom is working fine... Using the latest revision and SS2.3.2. Didnt find anything on this. Do you have any ideas?
22 July 2009 at 5:01am Last edited: 27 July 2009 2:31pm
Same here, I didn't find why it happens.
22 July 2009 at 7:23am Last edited: 27 July 2009 2:31pm
I might have found something. I can force this behaviour to appear in my Custom Form by disabling the following line:
if($protector) $protector->setFieldMapping('Name', 'Comments')
The Custom Form uses the MollomSpamProtection::updateForm() function, that does some work like verifying the keys and initiating the ServerList. It then returns the new MollomField(..). After the field is created, the FieldMapping is done that makes Mollom dynamic.
The userforms do no such thing: they create an EditableSpamProtectionField instead, that finds the current Spamprotector (Mollom) and creates a MollomField. Mollom keys are never verified, and no FieldMapping is done, making the Mollom field appear as default. And there doesn't seem to be a way to add the mapping 'by hand'.
I might have missed something, but it looks like this is it?
BTW: as the MollomField constructor calls initServer, this method is called twice for Custom Forms, just thought to mention...
22 July 2009 at 8:57am Last edited: 27 July 2009 2:31pm
for some reason the Mollom field is always active - even when the form is first called
Yes as you said, Mollom only hides if you give it a field mapping. For userforms we do not give it a field mapping currently so it will always show. To get mollom working as per other forms you would need to generate an array of all the fields you would like the spam protector to cover. So I would think any EditableTextFields.
Coding completely off the top of my head, you could try
$fields = $this->Fields(); // in UserDefinedForm.php
$protector->setFieldMapping($fields->map('Name')); // I think this takes an array of fieldnames
|Go to Top||Next >|