First of all, thank you for this module. The default display of the audio field is awful, and tinkering with all that theme wizard functions is still beyond my reach. Replacing that long text by a neat button/player is just what I was looking for.

Having said that, let's go to the bug description itself.

I've created a CCK content with an optional (not required) audio field. In 'Display Fields', if I choose 'Default', the field behaves as expected, i. e., it is showed if there's an audio file attached to it, and is hidden if the audio field is left empty.

But if I choose '1 Pixel Out player' or 'Button player', the audio fields – i.e. the players – are always shown, even if the fields are empty. If you click the buttons, the animation starts, as if there was something playing, but of course there's nothing playing. The 1 Pixel Out player shows an endless "Buffering..." message and the time counter is stuck in 00:00:00.

This happens in Teasers, Bodies and also in a Table view created with Views module.

Comments

nedjo’s picture

Hmm. I can't reproduce this. In teasers, full nodes, and view tables the players display for me only if the field has a value.

What release version of CCK are you using?

dtabach’s picture

CCK version: 5.x-1.5

Audio Field version: 5.x-1.x-dev

Drupal: 5.2

dtabach’s picture

The CCK content with an audio field I was using was created before the installation of mediafield_display.

Today I created a new content type just to test, and bingo!, the players were proprly hidden when there was no audio file.

But I had to create a new CCK content from scrap. Adding a new node of the old cck content type did not solve the problem.

dtabach’s picture

If, in the new content type, I add a file, save, then edit the node again and delete the audio file, the player (for a non-existent file) is displayed....

nedjo’s picture

Status: Active » Fixed

I needed to test of the file object was set but empty before displaying. Fixed.

dtabach’s picture

Thank you nedjo, it's working fine now.

Anonymous’s picture

Status: Fixed » Closed (fixed)