Needs review
Project:
Type-local nids
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
20 Dec 2008 at 18:07 UTC
Updated:
9 Jul 2011 at 13:15 UTC
Jump to comment: Most recent file
I currently use http://drupal.org/project/auto_nodetitle for the titles of my content types. And when I tried to use [lnid] nothing happens.
I tried the weight reduction (and increasing) for the module but it didn't help. It doesn't update the title even if I repost the content.
The only workaround that I found is to create Compute field and assign the [lnid] value to it, and then to use that field in the auto nodetitles. And even then this is not working in the first post, but I have to repost in order to update the correct title.
Is there a possibility to add that functionality - using [lnid] with auto nodetitle?
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 349524-lnid.patch | 1.28 KB | andypost |
| #4 | 349524-lnid.patch | 640 bytes | andypost |
Comments
Comment #1
wibe commentedI believe you could do this as follows: 1) Create a CCK field to hold the lnid (see #313476: Problem with CCK computed field). Then, 2) in Automatic Nodetitles, look for the replacement pattern of the field you just created and used at will.
Comment #2
HoKe commentedHi,
can you please explain how to create a cck field to hold the lnid?
should I use the computed Type of data or something else to store it?
what whould be then writen in computed code text area?
thx in advance
Comment #3
jbrown commentedauto_nodetitle uses the presave hook so it can generate the title before the node is saved - the lnid is not available at this time
type_local_nids uses insert / update as it needs the nid for the key in its {node_lnid}
the lnid could be generated in presave to fix this
I am available for hire if anyone wants this fixed.
Comment #4
andypostThis should be fixed because it generated notice
Comment #5
andypostImproved version, no need to increment counter while node is not saved
PS: a lot of trailing spaces on new lines should be fixed also. But not in this issue
Comment #6
arski commentedthanks for the patch! works for me, and very helpful for exactly the same issue :)
Comment #7
tommychrisI created a wrokaround to use the token [node:lnid] in node title, for newly created nodes also!
The workaround is:
Use this code in autotitle form:
Install the Rules module, and configure is:
Comment #8
pepemty commentedWill this work with D6?
Comment #9
arski commentedwell, the original bug and the patch were both in D6, so I dunno why the version was changed, unless the module developer doesn't want to commit any further 6.x fixes.
Comment #10
pepemty commentedThank you Martin.
Surely I'm doing something wrong, since my nodes title are "No title yet".
Any ideas?
Warm regards from sunny México!
: )
Pepe
Comment #11
arski commentedare you using the patch from #5? http://drupal.org/node/349524#comment-3238592
I think you're trying to use the patch from #7 and that's for D7, so it won't be of any use to you on D6.
Comment #12
pepemty commentedYou're right!
Anyway, I settled my mind with another approach:
First I hide titles of the specific content types: http://drupal.org/node/426482
Then I let automatic nodetitles to name these nodes according to my taste (not my clients); then all these nodes are enlisted via Views and instead of calling for titles I enlist aliases, which are fashioned with type local nids according to my clients instructions, and are linked to their node.
I really appreciate your prompt reply : )
Warmest regards from sunny México!
: )
Pepe
EDIT:
Yet, I tried the right patch and it works like a charm. : ) So I changed mi mind, again, for this solution. Thanks!