ability turn off story URL validation

manamana - August 1, 2008 - 08:28
Project:Drigg
Version:5.x-1.9
Component:Miscellaneous
Category:feature request
Priority:normal
Assigned:cedricfontaine
Status:closed
Description

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

#1

taqwa - August 5, 2008 - 16:32

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.

#2

cedricfontaine - August 18, 2008 - 14:49
Assigned to:Anonymous» cedricfontaine

#3

sicjoy - August 18, 2008 - 15:01

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

#4

cedricfontaine - August 18, 2008 - 16:01

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.

#5

mercmobily - August 18, 2008 - 16:16

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.

#6

sicjoy - August 18, 2008 - 18:35

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

#7

cedricfontaine - August 18, 2008 - 22:25
Status:active» needs review

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.

AttachmentSize
drigg_URLValidation-289903-7.patch 817 bytes

#8

mercmobily - August 18, 2008 - 22:25
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.

#9

sicjoy - August 18, 2008 - 22:53

You're the boss!

--sicjoy

#10

cedricfontaine - August 25, 2008 - 18:34

Committed a setting to disable URL http validate.

#11

cedricfontaine - August 25, 2008 - 18:34
Status:active» fixed

Committed a setting to disable URL http validate.

#12

mercmobily - August 25, 2008 - 18:55
Status:fixed» active

Hi cedric,

Sorry about reopening it...
I noticed this:

<?php
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.

#13

cedricfontaine - August 25, 2008 - 19:47

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

#14

mercmobily - August 25, 2008 - 21:45

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.

#15

cedricfontaine - August 26, 2008 - 17:46
Status:active» fixed

Yes it works for me...

#16

mercmobily - August 28, 2008 - 16:43
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.