hi,
when i enable all the audio modules in drupal 5.0, there doesn`t seem a way to attach audio to other nodes. as i read here: http://drupal.org/node/91516 , this should be an option under /admin/content/types/[xx] ?
the option doesnt seem to show up here.

Comments

drewish’s picture

Title: option to attach audio to a node type doesn't appear » audio_attach update for 5.0
Component: Code » contrib

it was not updated for 5.0. i'll accept patches.

drewish’s picture

Category: bug » feature
zirafa’s picture

I'll volunteer to work on this.

zirafa’s picture

StatusFileSize
new4.45 KB

Here is my first attempt at updating this module.

Drewish, I'm having trouble saving the node - I set the node object with $node->title_format = $_POST['audio_title'], yet the default title_format overrides any value put in there. Any ideas? I'm not sure what's going on.

zirafa’s picture

Ah, it seems I can't access $_POST variables in nodeapi $op = 'prepare'. Hmm, not sure why this is.

drewish’s picture

Yeah, I've run into the same problem in 5.0 with my method of processing uploads in audio_prepare(). If you re-upload a file you can't overwrite the user submitted artist, title, etc. It looks like we need to rethink this structure and use form_set_value ala http://drupal.org/node/79671

yngens’s picture

after installing the module when i press update.php it gives the following error:



    * user warning: Table 'database.audio_attach' doesn't exist query: update_sql ALTER TABLE audio_attach ADD weight int(10) NOT NULL default '0' in /home/mysite/public_html/includes/database.mysql.inc on line 172.
    * user warning: Table 'database.audio_attach' doesn't exist query: update_sql ALTER TABLE audio_attach ADD PRIMARY KEY (nid, aid, weight) in /home/mysite/public_html/includes/database.mysql.inc on line 172.


The following queries were executed
audio_attach module
Update #1

    * Failed: ALTER TABLE {audio_attach} ADD weight int(10) NOT NULL default '0'
    * Failed: ALTER TABLE {audio_attach} ADD PRIMARY KEY (nid, aid, weight)
drewish’s picture

snegny, did you the 4.7 version of the module installed before?

yngens’s picture

Well, not sure I got what you mean. On 4.7 I had playlist.module. Then I have upgraded to Drupal 5.X and since no playlist module anymore, tried to install audio_playlist module which required audio_atach module. Was I supposed to first install something in between?

zirafa’s picture

Looks like the audio_attach table didn't get created. Snegny, before you run the upgrade script, go to the modules page and make sure you've installed the audio_attach module so it can make the database table. If you aren't upgrading the audio_attach.module from 4.7 there shouldn't be a need to run the upgrade script.

zirafa’s picture

Currently there is no script to migrate from 4.7 playlist.module to 5.0 audio_attach+audio_playlist.module. Check this thread for updates on that.

zirafa’s picture

Just want to point people to one place where this code is being worked on. I've got some stuff working in my development sandbox.

yngens’s picture

Yes, they are installed. At least I see check marks against audio attach and audio playlist modules. And there is no error anymore when pressing update.php (it only happened first time). However, there no such modules on
http://www.mysite.com/admin/by-module I could not find no page in admin section to configure two modules, no any new features on user side.

zirafa’s picture

There is no audio_playlist module for 5.0. Do you mean audio_feeds.module?
Configuration is on the node configuration page for each node type, i.e. admin/content/type

zirafa’s picture

#11 I meant to say

currently there is no script to migrate from 4.7 playlist.module to 5.0 audio_attach+audio_feeds.module.
yngens’s picture

Now I see. Thanks! I was able to configure the module. But... it requires from me uploading of new files when I really hoped that it would allow me to compile playlist from the existing on the server audio files.

Users of my site who used to enjoy playlists and the block with a player on 4.7, now missing those features on 5.X. I need any module who would allow to compile playlists from already uploaded audio files and that will allow to automatically play number of audio files without pressing play button each time. Do we have any chance to get these kind of function on near future or it is good idea to turn back to 4.7?

It would be excellent guys just to upgrade existing module and then begin to modify it. Well, I am repeating what I already asked on another thread. But guess how many websites using excellent playlist module now are refrained from upgrading to 5.X. A lot!

zirafa’s picture

Yea, I am planning on having an autocomplete field so you can attach pre-existing audio files.

elio’s picture

Hi zirafa,

are you encontering problem with draggable and droppable offered in interface plug in ?

Once i tested and gave a problem on IE, are you planing to integrate that javascript to make something as manage audio playlist?

Thaks a lot for your work!

zirafa’s picture

Hi, I've got the draggable/droppable javascript working now, I'm just having trouble firing the AJAX callback function so it actually saves the re-ordered list.

elio’s picture

Ok,
If you want I can contribute integrating fast multiple file upload found in this link.
Do you like the idea? I already made in 4.7 but is a raw patch.

zirafa’s picture

Would a flash server be required?

elio’s picture

Surely not
do you want a special account in my test site?
www.drupio.com

I really want to contribute but still I don't know how.

zirafa’s picture

Sure, if you think it'll help me understand what you've built so we can try and integrate it. An uploader widget would be really cool.

newdru’s picture

OK.

I've been trying to follow this upgrade of playlist to 5.0 across no less than 3 threads.

Can someone provide an update as to what that status is?

1) does teh functionality that existed in 4.7 exist now in 5.0?

2) If not what's still missing if i try the upgrade here (vice versa - what IS included)?

3) how do i install / update - what do i need to do "precisely" to make this work- do i just require the the audio_attach patch here or do i need something else?

I'm really interested in this functionality but i'm not sure if it exists yet for 5.0?

Suggestion: would it make sense to open up a specific thread on playlist 5.0 status with a checked off list of features specifying "implemented" OR "not ready yet" plus a specific set of instructions on how to upgrade using the interim code patches? Then when something changes, the original post is copied into a new post and updated accordingly so that the latest greatest info is always contained in teh most recent post versus spread across multiple posts and multiple threads?

thanks

zirafa’s picture

The status of the playlist -> audio contrib modules can be found:

http://drupal.org/node/113750

snav’s picture

Category: feature » bug
Priority: Normal » Critical

I'm not sure what the problem is.. but it is definately triggered when I enable the audio_attach module. When I try to create a new node I get a blank screen. I'm not really too sure of what additional info I can provide, as there are no on screen error messages that get displayed.

I am running drupal 5.1 on a local testsite. The audio module and audio import modules are configured correctly.

drewish’s picture

Category: bug » feature
Priority: Critical » Normal

snav, don't change the status if you're having a problem with it, provide feedback. it's not even clear to me that your comment is about zirafa's code. if you're not using his code open a new issue.

snav’s picture

Sorry about that.. i don't ever get a chance to post issues and I think it was my first ever post to one of the issue follow-ups.. i'll try to be a bit more thorough in the future. I think that the post does belong here because I downloaded and installed Zirafa's code above at post #4.

A few steps of what I did:

I activated the audio attach module.
I then navigated to admin/content/types and allowed a few different nodes types to have the 'Attach audio files' option enabled.

After making these changes, I then tried to create new content for the site. If I try to create content for a type where I enabled the 'Attach audio files' option, I am displayed a blank page. If I try to create any other content, I am presented with the usual content creation form.

Further, when I modify the content type settings and disable 'Attach audio files' and then try to create new content, everything works fine. So from this I get the feeling that perhaps something in the code triggered the problem. As an afterthought, I figured that perhaps the problem may have been introduced by the audio module itself ( I was using the March 8, 2007 development snapshot), so I obtained and tested the official audio module release from Feb 16, 2007. The problem is still present.

I am not sure of what else I can do to better diagnose the issue. Please let me know how I can help further.

zirafa’s picture

Snav, I'll take a look at this soon, it does sound like it's the audio_attach module's fault.

elio’s picture

Zirafa,

are you thinking to support attach existing audio? with search capability?

I started testing the audio attach module seems ok, is a pitty that collapse.js doesen't work with interface.js loaded....

Thanks!

zirafa’s picture

Hi, adding existing audio will be a separate module - audio_playlist.module. This will give every audio node an "add to playlist" link. We can add other cool playlist-y type functionality there.

zirafa’s picture

Hello,

Fixed some annoying bugs today. I also made the re-ordering UI look very similar to views for consistency. I also got rid of the drag and drop re-ordering for now, it's not well supported. I'm going to clean up the code just a bit more and commit it to the audio module contrib directory soon. If you want to try out what I've got, I've updated my sandbox.

elio’s picture

StatusFileSize
new12.12 KB

I though the playlists were to be ported as node with attachments, I liked the idea because of the advantage that users have not to create the playlist and then manage the audio with tabs, most of my friends didn't understand it.
I have the develop a music store and I thought to use your code and make contributions, making the stuff attach centric. Add an existing audio is a must and I can not use both playlist and attach_audio tables. So I would like to extend the audio_attach and then to make an script to udpdate old 4.7 sites with playlist.

I modified the old module, this skip the validations .... I had to attach with the patch extention but renaming it as .module you can have a preview of what I mean, we can think to use AJAX for the searches.

What do you think about? Actually node reference to audio is a good idea too for the store but if we manage attach audio I think will be better.

zirafa’s picture

Yes, playlists should be ported as node with attachments. I think you misunderstood me, I don't plan on having a playlist table at all.

You seem to have the right idea with implementation. Can you post that code as a patch file and describe what it does a bit better? I can't tell what's going on since you posted a module file.

elio’s picture

Hi, this is the patch, I made under windows so I don't trust so much.

The user can search existing audio and attach to the node, I did not loose so much time in styling the forms, the pager miss, I will not do it in this week.

The patch provides a field for views, but you have to put a node distict filter becouse the audio attach table replicates the nid many times, how to solve the problem? do you think about any performance problems?

Let me know if you want to integrate in the release this code, I would be happy.

Elio

newdru’s picture

i can't tell.. are you saying you have an initial playlist contrib module in your sandbox now or just completing the other modules?

any idea when the playlist module might be done? (roughly - it seems like you guys are moving along nicely now)

thanks

zirafa’s picture

I'm just completing the other modules first before doing the playlist stuff. But conceptually all the playlist module does is provide a UI for adding existing audio files to the audio_attach table. Hope that makes sense.

zirafa’s picture

Right now I'm just completing the other modules first before doing the audio_playlist stuff. But conceptually all the new audio_playlist module will do is provide a UI for adding existing audio files to the audio_attach table. Hope that makes sense. Elio seems to have done some work on this already - but we should start a new issue thread to talk about this.

elio’s picture

Now I understand the plan, yes surely makes sense, but with the new form API capabilities we can make oneother form (wizard) step just for attaching audio with all the old playlist capabilities, in this way would be more usable and we will save including one more module, anyway there will be the problem of writing a script for migrating from playlist tables, isn't it ? a form in the administration?
Keep connected,
Elio

steveparks’s picture

subscribing. thanks for great audio modules!

moonray’s picture

Subscribing...

jyamada1’s picture

subscribing, thanks!

zirafa’s picture

Hello,

I have committed this module to audio/contrib HEAD.

zirafa’s picture

Status: Active » Fixed

Marking this as fixed, please start new issues if you find bugs, etc.

Anonymous’s picture

Status: Fixed » Closed (fixed)