Adding a new Web Link or modifying an existing one causes the URL to disappear from the weblinks table.

This is caused by an issue in the db_query calls in the weblinks_insert and weblinks_update functions, the url-string is surrounded by double-quotes (") which works in MySQL, but has another meaning in Postgresql. Search-and-replacing "%s" by \'%s\' in weblinks.module fixes the problem, but I'm currently not in a position to create an actual patch to HEAD for this - computer-troubles, don't ask :-(

If someone could fix this, I would be grateful.

Comments

ideaoforder’s picture

Assigned: Unassigned » ideaoforder

I will work this into the next revision. Unfortunately, I don't have access to or experience with Postgres, so I haven't tested it. Thanks for the feedback!

roderik’s picture

Status: Active » Needs review
StatusFileSize
new1.94 KB

I rolled the patch as discussed in the main message (since I needed it myself). It works on PostgreSQL now.

Can someone test (insert a weblink) on mysql, just to be sure, and then commit it?

Thanks!

roderik’s picture

Version: master » 5.x-1.8
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new2.9 KB

...or don't... but then just commit the patch.

This updated patch fixes a PostgreSQL issue in the v1.8 update script, too.

bdragon’s picture

Status: Reviewed & tested by the community » Fixed

Modified patch committed on DRUPAL-5 and HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.