Recent Mollom support issues for sites running with Pressflow, Akamai, Varnish, or other external proxy/cache systems indicated that form submissions could not be completed due to missing Mollom session information. It is not sure yet whether the Mollom module is guilty here at all, or whether it is a configuration problem with those external systems.

Some initial background information:

  • We only store data in the user's $_SESSION if we have a Mollom session id. For forms protected by textual analysis, we only have a Mollom session id upon first submission of a form. Effectively, this means that when the page containing the form is initially displayed, no user session is started (with regard to some of those systems).
  • We only disable the page cache when a form contains a CAPTCHA. For CAPTCHA-only protected forms, this means that the page containing the form will never be cached. For forms protected by textual analysis, this means that the initial page containing the form will be cached. Only if Mollom is unsure about the form submission, a CAPTCHA will be added to the form. Effectively, this means that pages containing forms protected by textual analysis 1) are cached 2) but subsequent POSTs to the page/form are not.

Regarding page caching, users having issues with such external systems may want to try to move:

function mollom_pre_render_mollom($element) {
...
    // Prevent the page cache from storing a form containing a CAPTCHA element.
    $GLOBALS['conf']['cache'] = CACHE_DISABLED;
}

to the end of mollom_process_mollom().

Comments

sun’s picture

Title: Support external proxies/caches » External proxies/caches
Component: Code » Documentation
Assigned: Unassigned » sun
Category: feature » support

Not sure what to do with this issue, as there is no concrete task at hand, just documentation we may want to add to mollom.api.php, or, somewhere more appropriate.

dries’s picture

I think this issue was /fixed/ by not caching Mollom protected pages.

mollom.module:    // Prevent the page cache from storing a form containing a CAPTCHA element.
mollom.module:    $GLOBALS['conf']['cache'] = 0;

We might need to set additional HTTP headers but I believe that is taken care of by the above line of code.

neclimdul’s picture

I don't know if there's still a documentation follow up but the additional headers(for Pressflow) have been added so this is probably done.

sun’s picture

Status: Active » Fixed

Right. The only documentation we'd be able to write would be "Mollom requires external proxy/cache systems to respect standard HTTP cache headers." -- which is not really something Mollom should have to document in the first place.

That said, there has been at least one report of an external CDN that does not respect standard HTTP headers and only a custom cookie in #1142686: Handle Mollom session via javascript like ReCAPTCHA does. However, not really much we can do about that.

Therefore, marking this issue as resolved.

sreyas’s picture

Hello Everyone,

We have Pressflow + Varnish running on our website http://www.urltrim.com
Varnish status seems to good

        5301  Client connections accepted
           0  Connection dropped, no sess
        5256  Client requests received
        5182  Cache hits
           2  Cache hits for pass
          40  Cache misses

The problem we are having is with mollom. Whenever a user try to submit a comment, the text analysis comes into play and gives this error


Your submission has triggered the spam filter and will not be accepted.

Its not even showing the image captcha. Could anyone please review it in our site and let me know what need to be changed here.

sreyas’s picture

hey just tried new varnish release dated yesterday and seems to working pretty fine now. I had varnish and expire module running. So it was not related to mollom but the varnish options.

sun’s picture

@sreyas: That's valuable information. From which old version did you update? And to which version did you update?

Status: Fixed » Closed (fixed)

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