Closed (fixed)
Project:
Mollom
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Sep 2010 at 20:00 UTC
Updated:
24 Apr 2014 at 17:13 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
sunHm. Right now, the administrative form configuration should prevent you from protecting a form with text analysis, if no fields are selected. You should get a form validation error.
Is it possible that you got this error after updating from an earlier version, perhaps? Because, the only way I say to get past that validation would be to programmatically save a form protection (which does not perform that validation of fields)
Comment #2
sunThe added unit test in attached patch proves that it is not possible to configure a form for text analysis without enabling fields to analyze. Therefore, I'm not really sure how you were able to get this error.
Comment #3
sun#2: mollom-DRUPAL-6--1.form-fields.2.patch queued for re-testing.
Comment #5
sunComment #6
sunThe patch in #5 was identical to #2.
This might have been caused by our own module update, so fixing that.
However, we should not "fix" the low-level data type mismatch issue, because $fields should never be FALSE, and thus, all that a change for this error message would do is to hide an actual error caused by some other module. In turn, you'd never ever notice that something is actually wrong on your site.
Comment #7
dries commentedThis looks like a good fix to me. I'll ping Paul to see if he can help test this or so.
Comment #8
paul.lovvik commentedThis fix looks good to me also. I think this patch is right however I don't believe that it fixes my specific issue on our existing site because our updates have already run and therefore this new code has no effect on our site. That said, we are no longer experiencing the issue on our site. It appears that the point of this patch (to ensure that the enabled_fields field in the mollom_form table has an array) directly addresses the issue we were having.
At any rate, we are no longer having this problem, and I believe this patch would have prevented the problem we experienced.
Comment #9
dries commented@sun: let's get this committed then!
Comment #10
sunThanks for reporting, reviewing, and testing! Committed to all branches.
A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.