node id or node name?
drupaloSa - January 7, 2008 - 18:17
| Project: | Smackdown |
| Version: | 5.x-2.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
I'm confused about the usage of this module. When i try to write a contestant name, autocomplete adds ":[nodeid]" at the end of the name. For example it becomes:
Heroes:[150]
Lost:[83]
I thought that it just works this way, but it didn't. Then i deleted the auto-added parts leaving only "Heroes" and "Lost", but again it didn't work. At the end i just wrote those ids and it worked. I think, using numbers is not a user-friendly and intuitive way. And therefore, i wonder if this is the way it supposed to work. I mean, if it can find those ids, it can also use them at the back-end letting the user just work with node names. Am i wrong?

#1
It should just work with the appended :[#]
This is similar to how node reference fields work in cck, except the format there is [nid:#]
An ideal solution would definatly be to just use node titles, except how do you deal with this when you have two nodes with the same title?
#2
Thanks for response. In my case, module works when only node-id is entered. "Note-title:[node-id]" doesn't work. Is it possible that clean-urls interfere with the module? I don't know what else may cause this. I may provide you a test account, if you need to check it yourself.
When it comes to deal with identical node-titles, Note-title:[node-id] is ok for me. But as i mentioned above, it didn't work that way. Anyway, i think using concatenated node-ids doesn't solve this problem for users since users can't learn node-ids when the cleanurls are enabled (i'm not sure this one). Perhaps adding author names may be a better option.
#3
Clean urls would not interfere. If you'd like to provide me a test account to check this out, please contact me through my contact form (http://drupal.org/user/59025/contact)
And FYI, node id's can still access node ids with clean urls enabled by going to /node/# ;)
Author names would still not solve the problem as the same author could still create two different nodes with the same title of the same type.
#4
I've pm'ed you a test account.
You're right about the author name. I just thought it would be a small probability for someone to write posts with identical titles. What about node creation date? :)
#5
the fix in #207459 should fix this
#6
Thanks to your fixes, all the filtering, content body, human readable names are ok. But node-title:[node-id] still doesn't work for me. I reopen this issue.
You might have seen the error reports at my site, but i'll copy them here:
* warning: Invalid argument supplied for foreach() in /var/www/vhosts/focagenc.net/httpdocs/tv/modules/node/node.module on line 521.* warning: implode(): Bad arguments. in /var/www/vhosts/focagenc.net/httpdocs/tv/modules/node/node.module on line 525.
* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM dp_node n INNER JOIN dp_users u ON u.uid = n.uid INNER JOIN dp_node_revisions r ON r.vid = n.vid WHERE in /var/www/vhosts/focagenc.net/httpdocs/tv/includes/database.mysql.inc on line 172.
* warning: Invalid argument supplied for foreach() in /var/www/vhosts/focagenc.net/httpdocs/tv/modules/node/node.module on line 521.
* warning: implode(): Bad arguments. in /var/www/vhosts/focagenc.net/httpdocs/tv/modules/node/node.module on line 525.
* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM dp_node n INNER JOIN dp_users u ON u.uid = n.uid INNER JOIN dp_node_revisions r ON r.vid = n.vid WHERE in /var/www/vhosts/focagenc.net/httpdocs/tv/includes/database.mysql.inc on line 172.
* warning: Invalid argument supplied for foreach() in /var/www/vhosts/focagenc.net/httpdocs/tv/modules/cck/fieldgroup.module on line 394.
* warning: Invalid argument supplied for foreach() in /var/www/vhosts/focagenc.net/httpdocs/tv/modules/cck/fieldgroup.module on line 394.
#7
5.x unsupported. please try 6.x