Automatic Nodetitle for Audio

Flying Drupalist - January 26, 2009 - 04:42
Project:Automatic Nodetitles
Version:6.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

Audio takes the id3 info from mp3 files and sticks it in the title. I want to use automatic node title to let the module handle this. But placing the tokens and setting auto node title to auto title and hide the field, causes on node submission the error Title field is required.

Thanks.

#1

jyg - January 28, 2009 - 06:32

I've been looking into this. I'm more inclined to think this is a problem with the Audio module. But from what I can tell so far, audio properly adds to $form['$submit'], and so does Auto_nodetitle. I can see auto_nodetitle_node_submit_form() in the $form['#submit'] array, but for some reason it doesn't get called. I.e. I do not know what actually cycles through $form['#submit'] :p Anyone know?

#2

jyg - January 28, 2009 - 07:32

More searching... can't figure it out. So, I've opted to use the Audio modules built-in version of auto_nodetitle. Check out your Admin Home's Audio config link. You can set the default in there. If you want to hide the field in the form, you can just theme it.

#3

drewish - February 3, 2009 - 02:33

the difference between audio's titling and this module's is that audio lets you have a unique token based title for each node where this one is per node type. i'd considered making this a dependency but it seemed like a loss of functionality. there's an issue in the audio queue to add permissions to that field to prevent people from editing it.

#4

Flying Drupalist - February 3, 2009 - 02:51

I agree in general, I themed it. Some people might not want per-node tokens.

#5

jyg - February 3, 2009 - 17:49

What do you mean by "i'd considered making this a dependency"? (Did you mean...) Would it be interesting and useful to change Audio in such a way that If Auto_nodetitle is active for the Audio content type, then Audio's internal token replacent scheme would be bypassed?

#6

ferrangil - February 4, 2009 - 12:56

I have audio nodes as well as photo and video nodes. For photo and video, I used CCK and modules to enable more cck fields.
I'm using auto_nodetitle setting it to Automatic title generation ->Automatically generate the title and hide the title field
And there, I just enter a token that is working fine for photo and video nodes: [field_description-raw]
This is a longer text field, and it's mandatory, but when I try to create a node (filling the description field) it also complains and with "Title field is required."

Why this is not working? Ideas?

UPDATE:
I get it working! I just added my token into the admin/settings/audio -> Default node title format:
but the problem is that when I create a new audio node I see the token in there! That's quite odd, and for regular users it's not desirable. Okay, I could just theme it to hide it.
The problem is that when the users goes and edit the audio node, and changes the description text field (which is used to generate the title), the audio title is not updated (because on the title field there's the first description text, and not the token as it was when creating the node).
Too confusing at the end...

 
 

Drupal is a registered trademark of Dries Buytaert.