Mollom is sunsetting the CMP (Content Moderation Platform). It will no longer be available to new customers and existing customers will lose access on October 1.
More information here: https://docs.acquia.com/mollom/faq/platform

The module should no longer show options for CMP for new installations. This affects the "Allow content to be moderated from the Mollom Content Moderation Platform" portion of the form configuration screen.

Plan:

  • In an update hook, set a variable to indicate that the site actively uses CMP only if there is at least one Mollom form configured to utilize CMP.
  • Check to see if that variable is set prior to showing the CMP setting for any form
  • Change the text with the option to indicate that the CMP will no longer be available beginning Oct. 1, 2015 with a link to the FAQ
  • Set in the code to no longer utilize the CMP functionality beginning Oct 1., 2015 using hook_cron to update the variable
  • In some later release (post Oct 1, 2015) remove the logic to clean up
  • Update tests to enable CMP in order to continue testing functionality

Comments

eshta’s picture

Issue summary: View changes
eshta’s picture

Issue summary: View changes
eshta’s picture

Status: Active » Needs review
StatusFileSize
new8.33 KB

This still needs tests adjusted and a test added to ensure that access is not available for new users.

Status: Needs review » Needs work

The last submitted patch, 3: 2502961_mollom_cmp-access_3.patch, failed testing.

eshta’s picture

StatusFileSize
new8.77 KB

Fixed failing tests and centralized logic to determine if CMP is enabled into a helper function.

eshta’s picture

Status: Needs work » Needs review

Go bots go!

eshta’s picture

StatusFileSize
new9.55 KB

Trying out a test update for the disabled state - go testbots!

Status: Needs review » Needs work

The last submitted patch, 7: 2502961_mollom_cmp-access_7.patch, failed testing.

eshta’s picture

Status: Needs work » Needs review
StatusFileSize
new9.55 KB

Thanks bots - that's what I needed to know.

eshta’s picture

StatusFileSize
new10.33 KB

Changes from manually testing and an updated automated test for form configuration option.

nick_vh’s picture

Status: Needs review » Needs work
  1. +++ b/README.txt
    @@ -1,7 +1,7 @@
    +Integrates with the Mollom service: https://mollom.com
    

    Please refer to www.mollom.com instead of the non www version

  2. +++ b/README.txt
    @@ -128,6 +137,5 @@ For questions pertaining to the Mollom service go to https://mollom.com/support
     * Dries Buytaert (Dries) - http://drupal.org/user/1
    

    Really? Is Dries still maintaining it? :) If you are making changes, perhaps add me (if you let me?) and remove Dries.

  3. +++ b/mollom.admin.inc
    @@ -456,33 +456,45 @@ function mollom_admin_configure_form($form, &$form_state, $mollom_form = NULL) {
    +      if (mollom_cmp_enabled()) {
    

    a function in an if clause might not work in php versions < 5.4 (eg 5.3). Safer to set it to a variable and then do an if on that variable.

  4. +++ b/mollom.admin.inc
    @@ -456,33 +456,45 @@ function mollom_admin_configure_form($form, &$form_state, $mollom_form = NULL) {
    +            '@moderation-url' => 'https://mollom.com/moderation',
    

    set www.mollom.com

  5. +++ b/mollom.admin.inc
    @@ -456,33 +456,45 @@ function mollom_admin_configure_form($form, &$form_state, $mollom_form = NULL) {
    +            '@moderation-product' => 'Mollom Content Moderation Platform',
    

    Here you use the @ sign, and a bit further you use the % sign. Please be consistent when replacing variables in text.

  6. +++ b/mollom.admin.inc
    @@ -456,33 +456,45 @@ function mollom_admin_configure_form($form, &$form_state, $mollom_form = NULL) {
    +          '#default_value' => (string) (int) ($mollom_form['moderation'] && $has_clean_urls),
    

    two times type casting? How does this make sense? What is this doing even? I like shorthand functions but this might need some explanation

  7. +++ b/mollom.install
    @@ -302,7 +302,7 @@ function mollom_schema() {
    +        'description' => 'Whether to integrate with Mollom moderation - feature is deprecated.',
    

    You can CAPSLOCK this thing. It will only be visible in the mysql schema anyway, but having DEPRECATED doesn't leave much to the imagination heh.

  8. +++ b/mollom.module
    @@ -3224,7 +3233,7 @@ function mollom_mollom_data_insert($data) {
    +  if (mollom_cmp_enabled() && !empty($mollom_form['moderation'])) {
    

    same thing as above, check if all php versions understand this syntax. When backporting to D6 you might end up with problems

  9. +++ b/tests/mollom.test
    @@ -5629,9 +5638,7 @@ class MollomModerationIntegrationTestCase extends MollomModerationBaseTestCase {
    +   * @todo: Remove tests after Mollom CMP is retired on Oct. 1, 2015.
    

    Right, I can see us browsing this code somewhere end of 2016 and reading this. Should we already reference some issue queue # here to make sure it is actionable?

eshta’s picture

Heh - you have some valid points - especially for #3 and #8. #6 is actually the pre-existing code prior to this change (and pre-dates me). I'd be happy to leave it as is (not broke approach) especially given that it will be removed in a few months time anyway. #5 had to do with how much emphasis should be used... although you could argue that the date is what really deserves the emphasis over the feature name - but it makes it stand out nicely when you are listed a specific feature that is to be deprecated. Thanks for the review - changes coming up shortly.

eshta’s picture

Status: Needs work » Needs review
StatusFileSize
new18.8 KB

Here are some changes in response to the review.

nick_vh’s picture

+++ b/mollom.install
@@ -1303,3 +1303,20 @@ function mollom_update_7213() {
+  foreach ($result as $moderation) {

one thing here is that you need to check if the result is an array and not empty. You will end up with errors otherwise.I don't think the db_query always gives you an array back? Might need to be checked

Aside of that it looks very good!

nick_vh’s picture

Status: Needs review » Needs work
eshta’s picture

db_query should return a DatabaseStatementInterface and fetchCol specifically says it returns an indexed array or an empty array.
https://api.drupal.org/api/drupal/includes%21database%21database.inc/fun...

In D6 it appears that db_query can return FALSE if there is a problem executing the query - so that will be something to keep in mind for the back-port.

  • eshta committed 5e3b92a on 7.x-2.x
    Issue #2502961 by estha, Nick_vh: Remove access to Content Moderation...
eshta’s picture

Version: 7.x-2.x-dev » 6.x-2.x-dev
Status: Needs work » Patch (to be ported)

Working on the D6 port now.

eshta’s picture

Status: Patch (to be ported) » Needs review
StatusFileSize
new18.36 KB

Here's the first stab at the d6 backport. I still have some manually testing to do as well but figured I'd let the bots get at it ;-)

Status: Needs review » Needs work

The last submitted patch, 19: 2502961_mollom_cmp-access_d6_19.patch, failed testing.

eshta’s picture

Status: Needs work » Needs review
StatusFileSize
new18.34 KB

Fix URL in test.

  • eshta committed 17abd14 on 6.x-2.x
    Issue #2502961 by eshta, Nick_vh: Remove access to Content Moderation...
eshta’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.