Closed (fixed)
Project:
Automatic Nodetitles
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
29 Oct 2009 at 22:04 UTC
Updated:
16 Nov 2010 at 02:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
francewhoa+1 for porting this great module to Drupal 7. Any volunteer?
I would be happy to contribute testing and an updated README.txt file.
Comment #2
fagoas the title as field patch got reverted now, we could start with that now. The port shouldn't be hard anyway.
Comment #3
tanoshimi commentedI thought that I would step forward and have a go at this.
Attached patch (should) apply to current HEAD and converts auto_nodetitle to D7 - I think it pretty much has full functionality.
The main issue I faced from a UI point-of-view is that (as far as I can tell) you can't have fieldsets within a vertical tab, such as that used in the content type edit page. So, when I list the possible replacement patterns, I can't make them collapsible - they are all shown in a big
list. If anybody has any ideas around this, I'd love to hear them!
Also, Coder module complains that the js file still uses the jQuery v1.2 syntax $("input[@name=#edit-auto-nodetitle-ant], but if I change to the v1.3 syntax $("input[name=#edit-auto-nodetitle-ant] it no longer works.... don't know if this a coder issue or my code issue.
Anyway, try it out - hope it helps!
Comment #4
tanoshimi commentedForgot to change the status...
Comment #5
bcn commentedThanks! I tried this out and it seems to work in my limited testing. I see what you mean about the excessive vertical space being used up by the token info, and also not really sure what to do. I wonder if there is an issue for that already?
I made a few change to the patch simply to remove some extra whitespace, etc.. This patch should still apply fine to the latest version of the 6--1 branch.
Comment #6
bcn commentedWhile testing this further, it seems there are some problems with some of the tokens. I had issues with the nid token for example, in that the first time I save a new node, the nid does not appear in the title. Upon editing this node, and saving again, the nid token finally appears in the title.
Edited to add... @Fago, When you get a chance, could you create a 7-x branch for the module and commit at least some parts of this patch. Then it will be easier to make smaller patches. Thanks!
Comment #7
tanoshimi commented@noahb - there is a long-standing issue with using nid in node titles - see http://drupal.org/node/194197.
Since this functionality is not available in current D6 version, it's not available in this port either.
Comment #8
bcn commentedSince the only real problem I saw was with node tokens...back to 'needs review'. Thanks again @tanoshimi for getting this rolling!
Comment #9
fagoThanks for working on this!
@committing: Let's commit it as soon as at least the coding styles and possible security issues are fixed.
* I think we should check_plain() or at least filter_xss() the data from token_info(). Also the 'name' isn't displayed anywhere? If the token module is available, we should leverage the token module's help - but we can add that once we have the first version committed.
* The javascript doesn't follow the coding style. "if(ant==0)" should be "if (ant == 0)".
* So do node tokens work in general?
Comment #10
bcn commentedMakes sense to me!
The attached patch check_plain()'s the token_info() data and fixes the coding style errors in the js file. In general, it seems that node tokens are working.
@todo
* add the token name (from token_info()?)
* check for token module (and do what if it's present?)
Leaving as 'needs work' due the above items.
Comment #11
fagoThanks, I committed the patch from #10.
>* check for token module (and do what if it's present?)
Token module offers a nice widget/help for selecting tokens. In case it's there we should make use of that.
Comment #12
tanoshimi commentedI'm (hopefully) going to find some time to look at the @todo list for the D7 version soon. In the meantime, would it be possible to have it show up on the "Development Releases" section of the project page so that more people can try downloading it and seeing if there's any other issues?
Comment #13
redijedi commentedsubscribing
Comment #14
jrabeemer commented+1 for getting a dev release on the homepage that would get more eyeballs/testing on it
Comment #15
rwohlebsubscribe
Comment #16
scotwith1tsubscribing...and another +1 for getting this on the project page so folks will test it.
Comment #17
fagoI've done so.
Comment #18
dave reidHere's the patch to add the token help. I'm encouraging modules just not to display their own token help and re-use what we're trying to get into core for D8. We already have a dependency on token.module in Pathauto, so it's pretty save that it will be available on a lot of sites.
Comment #19
dave reidAdding my token tag so I can keep track of the issues I'm helping patch.
Comment #20
dave reidMoved token update to a separate issue: #945066: Use token tree UI for D7
Comment #21
fagoI've done a first alpha, please test.
Comment #22
scotwith1tupdating title to include module name