Closed (won't fix)
Project:
Location
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
19 Nov 2007 at 11:13 UTC
Updated:
29 Jul 2011 at 21:39 UTC
Hi,
I have the links_weblink module working nicely.
I added a validation_hook to links_weblink, so it is impossible to insert an weblink which is allready in the system.
/**
* Implementation of hook_validate().
*/
function links_weblink_validate(&$node) {
if (($row = db_fetch_object( db_query("SELECT l.lid , ln.nid FROM {links} l INNER JOIN
{links_node} ln ON l.lid = ln.lid WHERE l.url ='%s'",
$node->links_weblink_url))) && ($row->nid != $node->nid)){
form_set_error('url', t('Link allready added in the system'));
}
else
{
links_weblink_node_build($node);
}
}
But with adding localize information to the weblink nodetype, I am getting this message 'Link allready added in the system' when I only alter the location information.
Does anybody know how to alter the validation_hook so it is not thinking I want to add a new weblink to the system?
I am not seeing a connection in the database between the location, and the node_links, or links module, please help!
Is there a location variable which I can look into in the links_weblink module?
Thanks in advance.
greetings,
Martijn
Comments
Comment #1
yesct commentedMartijn, Is this still a problem?
Marking it postponed (needs more info) for now.
Comment #2
summit commentedHi,
Yes it is still a problem to tell if a link is unique. You can tell if a title is unique through the unique_title module, but not if the link itself is unique.
Thanks for going into this!
Greetings,
Martijn
Comment #3
yesct commentedComment #4
yesct commentedcorrecting tag
Comment #5
ankur commentedIf this is still an issue in the 7.x-3.x or 7.x-4.x branch, please feel free to re-open.