Any plans or progress for Drupal 7?

Comments

francewhoa’s picture

Title: Drupal 7 update » Port to Drupal 7

+1 for porting this great module to Drupal 7. Any volunteer?

I would be happy to contribute testing and an updated README.txt file.

fago’s picture

as the title as field patch got reverted now, we could start with that now. The port shouldn't be hard anyway.

tanoshimi’s picture

StatusFileSize
new12.58 KB

I 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!

tanoshimi’s picture

Status: Active » Needs review

Forgot to change the status...

bcn’s picture

StatusFileSize
new11.93 KB

Thanks! 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.

bcn’s picture

Status: Needs review » Needs work

While 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!

tanoshimi’s picture

@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.

bcn’s picture

Status: Needs work » Needs review

Since the only real problem I saw was with node tokens...back to 'needs review'. Thanks again @tanoshimi for getting this rolling!

fago’s picture

Status: Needs review » Needs work

Thanks 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?

bcn’s picture

StatusFileSize
new11.95 KB

Let's commit it as soon as at least the coding styles and possible security issues are fixed.

Makes 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.

fago’s picture

Version: master » 7.x-1.x-dev

Thanks, 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.

tanoshimi’s picture

I'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?

redijedi’s picture

subscribing

jrabeemer’s picture

+1 for getting a dev release on the homepage that would get more eyeballs/testing on it

rwohleb’s picture

subscribe

scotwith1t’s picture

subscribing...and another +1 for getting this on the project page so folks will test it.

fago’s picture

I've done so.

dave reid’s picture

Status: Needs work » Needs review
StatusFileSize
new1.35 KB

Here'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.

dave reid’s picture

Issue tags: +token

Adding my token tag so I can keep track of the issues I'm helping patch.

dave reid’s picture

Status: Needs review » Needs work
Issue tags: -token

Moved token update to a separate issue: #945066: Use token tree UI for D7

fago’s picture

Status: Needs work » Fixed

I've done a first alpha, please test.

scotwith1t’s picture

Title: Port to Drupal 7 » Port to Drupal 7 of Auto Nodetitle

updating title to include module name

Status: Fixed » Closed (fixed)

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