Download & Extend

Link module changes full stops "." by underscores "_"

Project:Link
Version:7.x-1.1
Component:Code
Category:bug report
Priority:major
Assigned:Unassigned
Status:needs review

Issue Summary

Hi there,

First of all thanks for this fantastic module.
I have an issue with how the links are displayed when a node is created.
When I am creating a node with several fields, and I enter an affiliate link in the ‘Link’ field, once the node is saved the URL displayed is different from the URL introduced.

In the example below, when the link is displayed the “.” are changed by “_”. But if I click edit, the URL in the link field is correct.

This is the link that I introduced in the ‘Link’ field:

http://ecs-es.kelkoo.es/ctl/go/sitesearchGo?.ts=1338833010331&.sig=qP9GX...

And this is the one displayed in the node:

http://ecs-es.kelkoo.es/ctl/go/sitesearchGo?_ts=1338833010331&_sig=qP9GX...

As you can appreciate, the full point after the question mark (…sitesearchGo?_ts=1338833010331…) and after the & (…&_sig=qP9GXeEFH6syBzwmzYkxmsvp1EI…), have been changed by an underscore symbol.
As I said before, if I click “edit”, the link in the field is the correct one (with the “.” Instead of the “_”), but when the node is displayed, the link is changed (and so I cannot introduce any affiliate product).

Please let me know if you need more information (is my first issue in drupal)

Thanks in advance for your time and again for this module!

Fernando

Comments

#1

Same thing is happening to me, though it replaces my "+" with underscores in the Link output. This is happening in the full node -- not a view working with fields in which I've altered the output.

#2

Priority:normal» major

#3

Please, can someone help with this?
The affiliate links don't work... :(

Thanks!!

#4

Status:active» needs review

Please see the attached patch, which I believe will solve the issue. The fault lies in the use of PHP's in-built parse_str() method.

AttachmentSize
Link-1616752-4.patch 941 bytes

#5

Hi Jimmed,

Thanks for your answer.
When I applied the patch the following notice was showed:

Notice: Undefined offset: 1 en _link_parse_str() (line 1181 from C:\wamp\www\xxxxxxx\sites\all\modules\link\link.module).

Cheers,

#6

A small modification of Jimmed patch fixed the problem. :)

I didn't delete this line
- parse_str($query, $query_array);
Because deleting it the URL is cut after '?'

Cheers Jimmed!

#7

Status:needs review» closed (fixed)

#8

Version:7.x-1.0» 7.x-1.1
Status:closed (fixed)» needs review

Was this patch committed to the module? I'm still having this issue without the patch applied and with the latest release version (1.1) of the Link module.

#9

Hi dmetzcher,

I updated the link module and happened the same problem again.
Try to replace the content of the link.module with the content I've attached in the .txt

It worked for me.

Cheers,

AttachmentSize
content of link.module.txt 40.43 KB

#10

This crept up on me today after updating last night.
Thanks for posting this. Testing now.

#11

I also have this issue, and before I patch production, I am wondering if the fix will be merged soon. Thank you!

nobody click here