Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The Mollom PHP library sets the server endpoint as a public variable. We should expose this through the Mollom settings screen and allow it to be set via the Drupal module.
Comment | File | Size | Author |
---|---|---|---|
#18 | 2381343.mollom.endpoint.18.patch | 7.59 KB | eshta |
#16 | 2381343.mollom.endpoint.13.patch | 13.02 KB | eshta |
#13 | 2381343.mollom.endpoint.13.patch | 11.64 KB | eshta |
#11 | 2381343.mollom.endpoint.11.patch | 9.6 KB | eshta |
#9 | 2381343.mollom.endpoint.9.patch | 8.95 KB | eshta |
Comments
Comment #1
eshta CreditAttribution: eshta commentedHere's the first try.... it is still lacking in test updates, however.
Comment #3
Nick_vhI'm not sure if it has to be an UI option. A variable that one can set is more than enough imho. If we make it a UI option, it rapidly becomes easy for someone to mess with this. Unless we expose our customers to some website where they can choose different endpoints based on their region or if they want to be on the beta platform they can choose to be?
I think there is a better function for this. Use the https://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_... function and then recompile it without the http or whatever prefix they give it. If they set it to ftp, it should also be removed :)
Comment #4
eshta CreditAttribution: eshta commentedThanks @Nick_vh. Unfortunately drupal_parse_url just includes the scheme in the path return if it is an external URL so it won't help us here. For stripping of protocols, a full list would be pretty long, but I could switch this to a regex like /^[a-z][A-Z]*:\/\// (need to test that rather than writing off the top of my head).
Of course this is moot if we're not going to expose it in the form, lol. I'm fine with leaving this out for now and adding it in if we find we have a larger-scale need to allow site administrators to specify their endpoint.
There are a bunch of test failures in the installation test that I'm seeing in the dev branch as well as this patch. I'm uploading the patch with failures now, but I'm going to figure out what's going on with these before any commits.
Comment #5
eshta CreditAttribution: eshta commentedComment #9
eshta CreditAttribution: eshta commentedRunning this to see what the testbots say.....I think there are some local differences in my environment.
Comment #11
eshta CreditAttribution: eshta commentedMinor tweak.
Comment #13
eshta CreditAttribution: eshta commentedOK - so here is a full and final patch with tests in place. The patch will fail the testbots here, but that is due to an unrelated testing issue that has its own issue here: https://www.drupal.org/node/2391671
Comment #14
eshta CreditAttribution: eshta commentedJust to make sure the rest of the tests are still alright ;-)
Comment #16
eshta CreditAttribution: eshta commentedFixing the unexpected test failures...
Comment #18
eshta CreditAttribution: eshta commentedReroll
Comment #20
eshta CreditAttribution: eshta commented