Hi,

just found an issue with links containing a query.
On _link_sanitize the query string is stored in $item['query']. This is later reused to call url() but in D7 this function doesn't accept the query as string.
Thus the query string has to be parsed before.
Attached patch should do the trick.

Comments

tekante’s picture

Testing out the attached patch, I found that the query string appears to be stripped from the URL when being displayed. It appears in the display text but the actual URL linked to does not contain the query string portion. This was tested using the following link: http://sports.espn.go.com/new-york/mlb/news/story?id=5725982

The attached patch includes the correction for the error during save and corrects the error during display by removing the line that transforms the URL to the base portion only. I have doubts as to whether this is the correct solution but I have not found a way to store the query (in the attributes for example) and then reapply it on display.

jcarlson34’s picture

@tekante Your patch in #1 solved many errors I was receiving thanks to queries in my urls. Thanks!

jcfiala’s picture

Status: Needs review » Closed (duplicate)

Looks like this is a duplicate of #955214: Passing in query as string leads to fatal errors, which has been fixed and committed.