UX-wise, the "report to Mollom" link duplicates the "delete" link, and you have to read carefully to understand that by reporting, something will be deleted.
Additionally, that completely separate form requires us to not only resemble complex permission checks for every single entity. It also makes full integration of third-party modules like Webform very complex.
In #645374: Make entity ids available to form submit handlers, I've prepared Drupal core to supply the entity id in the same form value location as in the entity edit form. This allows Mollom to simply re-use and integrate with all the regular delete confirmation forms, instead of duplicating them.
Comment | File | Size | Author |
---|---|---|---|
#19 | mollom-DRUPAL-6--1.report.19.patch | 11.95 KB | sun |
#18 | mollom-DRUPAL-6--1.report.18.patch | 11.91 KB | sun |
#18 | mollom-HEAD.report.18.patch | 1.37 KB | sun |
#14 | mollom-HEAD.report.14.patch | 29.17 KB | sun |
#13 | mollom-HEAD.report.13.patch | 25.89 KB | sun |
Comments
Comment #1
sunSo this is what it will approx. look like. Already works to some extent (only tests are failing).
However, I searched the issue queue pretty extensively and tried to find the reason for why we have those "unpublish and report to Mollom" node/comment operations.
They make absolutely zero sense for me. And since they make things more complex than they need to be and also break my tests, I will go ahead and kill them.
Comment #2
sunI like.
Comment #3
sun#states flavor.
Doesn't work out though, since radio buttons cannot be deselected. Otherwise, quite cool. :)
Comment #4
sunStill lovely. That's what I had previously:
Comment #5
sunI also considered this, but when actually having to use it, it's much slower than a exposed radio list.
Comment #6
sunSo let's go with this:
...
Yes, I shortened the options even more. And I also shortened the description. This widget was *far* too verbose. So the worst that can happen, happens: You are either confused, or you don't read it at all.
Comment #7
sunRemaining @todos:
Didn't think of this use-case originally. This means we need to iterate over all "elements", not "enabled_fields".
Shouldn't hold up this patch, but should be a critical task in the queue.
1) We need to cache this in a suitable manner, i.e. using "delete form" as primary array key and the form id as value. Invalidate the cache whenever mollom_form_save() runs. Create the cache whenever mollom_get_form_info() runs.
Alternatively, consider to use a variable. Doesn't change invalidation/creation rules though.
2) We also need to cache mollom_get_form_info(). That is, because Webform needs to load entire nodes to build its form info for Mollom. mollom_get_form_info() is invoked for every form. Performance killer. Also applies to D6, unfortunately. :-/
Sorry, forgot to remove.
Powered by Dreditor.
Comment #8
Dries CreditAttribution: Dries commented1. The mass node and comment operations have been deleted. These are very important to keep.
2.
Good idea, and should probably be backported to D6.
3.
If we add the 'created' column and expire older entries, this might not be necessary?
Comment #9
sunSafety re-roll against HEAD. No changes since last patch. I'll try to come back to this issue after tackling the scaling problem.
Comment #11
sunStraight re-roll against HEAD. No other changes (yet).
Comment #13
sunNew changes in this patch:
- Added {mollom}.changed column. It's not "created", because session data for a certain entity may be updated after editing. (TBD elsewhere)
- Fixed wrong/D6 links on status report page.
- Removed all hook_ENTITY_delete() hook implementations in favor of simplified integration and automated expiry via {mollom}.changed.
@todo:
- Implement lookup cache for "delete form".
Comment #14
sunI'm not 100% happy with this patch (the lookup cache), but it works and is a giant improvement over what we have currently.
Meaning: There is definitely room for improvement.
Comment #16
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.
Comment #17
sunYayayay! :)
Though: part of the goal was to backport the essentials of this patch, so modules like Webform can use it + actually send feedback to Mollom. (we cannot change the integration for node, comment, user modules in D6, as users would be confused)
Comment #18
sunSo this patch:
- Adds {mollom}.changed column and expiration handling.
- Adds the mollom_data_report[_multiple]() and mollom_data_delete[_multiple]() helper functions + form alters for registered forms defining "delete form".
Additionally: A small clean-up patch for HEAD.
Comment #19
sunFixed missing $ret in module update function.
Tested with revised Webform integration, and: WORKS! :)
Comment #20
sunCompanion patch for Webform now over in #686136: Implement hook_mollom_form_info for submission protection by Mollom
Comment #21
Dries CreditAttribution: Dries commentedCommitted to DRUPAL-6--1 and CVS HEAD. Thanks!