http://www.drigg-code.org/node/451

How do I turn off URL validation?
Posted July 27th, 2008 by bflora
Is there an easy way to turn off URL validation in Drigg? Every once in a while it doesn't work for perfectly valid links. I'd rather have no validation at all instead of spotty, inconsistent validation that frustrates my users.

On July 30th, 2008 manamana said:
I completely agree. I'd like to turn this off too but haven't found where it is in the code.

I posted details about my problems with this here:
http://www.drigg-code.org/node/423

CommentFileSizeAuthor
#7 drigg_URLValidation-289903-7.patch817 bytescedricfontaine

Comments

taqwa’s picture

I agree. We had the same issue. Until this is fixed, you can just 'hack' the module by editing drigg.js. Just remember to note it in case you want to upgrade later.

cedricfontaine’s picture

Assigned: Unassigned » cedricfontaine
sikjoy’s picture

This has become a non-issue since URL validation has been fixed.

cedricfontaine’s picture

I don't think so,

See the following URLs does not validate :

http://specials.rediff.com/news/2008/jul/11sld01.htm
http://news.cnet.com/8301-1001_3-10004226-92.html

So we should offer a way to deactivate URL Validation on settings.

mercmobily’s picture

Hi,

I am not wasting time checking why:

http://specials.rediff.com/news/2008/jul/11sld01.htm
http://news.cnet.com/8301-1001_3-10004226-92.html

Don't work. They either offer a "special guest redirect" or they use broken HTTPD servers.

I agree with the option that needs to be there. I would NEVER turn it on though.

Merc.

sikjoy’s picture

We should be careful adding too many options as the admin settings will become overwhelming for our users. This seems to be a very esoteric setting to me.

In my opinion, this should be fixed at the validation stage.

Best,

sicjoy

cedricfontaine’s picture

Status: Active » Needs review
StatusFileSize
new817 bytes

We should manage error code when page is moved. This patch handles redirect_code returned by drupal. This solves the problem with CNET page.

For the other one (rediff.com), Httpd server seems buggy and does not handle Content-Length to 0.

mercmobily’s picture

Status: Needs review » Active

Hi Sicjoy,

I think it's sensible to turn off validation.
Fixing it at validation is an idea, but I still think it should be possible to turn off URL validation. Too many people asked for it.

Merc.

sikjoy’s picture

You're the boss!

--sicjoy

cedricfontaine’s picture

Committed a setting to disable URL http validate.

cedricfontaine’s picture

Status: Active » Fixed

Committed a setting to disable URL http validate.

mercmobily’s picture

Status: Fixed » Active

Hi cedric,

Sorry about reopening it...
I noticed this:

 if ( variable_get('drigg_trackback_enable', FALSE) &&
      variable_get('drigg_trackback_autodiscovery', FALSE) &&

[...]

   // Fetch the URL (!)
      if (variable_get('drigg_url_validate', TRUE)) {
        $url_request = drigg_url_http_ok($node->url, 'GET', TRUE);
        drigg_debug_msg("HTTP request made to the URL");
      } else {
        $url_request = TRUE;
        drigg_debug_msg("HTTP request NOT made to the URL since drigg_url_validate was OFF");
      }
      $http_request_attempted = TRUE;

Now... this means that if the URL validation is off, there is a side effect here: Drigg won't do the Trackback ping autodiscovery. I can see how somebody might actually want to have validation off, and STILL do the trackback ping autodiscovery. Don't you think?

Why did you add that IF there? I am not asking because I am doubting you, but because you are smarter than me and there's probably a good reason :-D

Bye!

Merc.

cedricfontaine’s picture

Sorry, you are totally right ! I updated my changes... But there might be some side effects to deactivate url validation...

mercmobily’s picture

Hi,

That part of Driggi s *the* nastiest one. It's just too complicated... and there's no real way to simplify it :( There's everything that is ugly: global variables, long functions...

Are you doing the final testing for this now?

Merc.

cedricfontaine’s picture

Status: Active » Fixed

Yes it works for me...

mercmobily’s picture

Status: Fixed » Closed (fixed)