Download & Extend

filefield array apparently empty, although FlashField works fine

Project:FlashField
Version:6.x-0.0
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Hi,

I am trying in custom template for my custom Video type to key off something to detect whether FlashField is actually used in a given video node instance (as I have other options such as Emfield for embedded video and sometimes no other video solution, just download of say a MOV), and I have tried to key off the FileField, however it seems to be empty always, even when there is definitely a FileField allocated (confirmed in Edit page).

Also, the Content Template example for my Video type confirms it is seemingly always empty, even when the FlashField clearly runs ok:

$node->field_flash_filefield (array)

Do you know why, and is there anything else I can key off to tell whether FlashField is actually being used ?

This relates to (http://drupal.org/node/351685), and in general the FlashField module should not generate ANY output if it is not being used (the fields are not populated), which would be the proper solution.

Glad for advice or ideas,

Webel

Comments

#1

Here's part of the generated Content Template example for a FlashField that is populated and works:

$node->field_flash_video (array)

    $node->field_flash_video[0] (array)

        $node->field_flash_video[0]['filefield']
            field_flash_filefield
        $node->field_flash_video[0]['width'] (double)
            0
        $node->field_flash_video[0]['height'] (double)
            0
        $node->field_flash_video[0]['substitution']
            <p>!default</p>
        $node->field_flash_video[0]['flashvars']
        $node->field_flash_video[0]['base']
        $node->field_flash_video[0]['params']
        $node->field_flash_video[0]['fid'] (NULL)
        $node->field_flash_video[0]['display']
            0
        $node->field_flash_video[0]['teaser'] (boolean)
            TRUE
        $node->field_flash_video[0]['embed_params'] (array)

            $node->field_flash_video[0]['embed_params']['version']
                7
            $node->field_flash_video[0]['embed_params']['play']
                false
            $node->field_flash_video[0]['embed_params']['loop']
                true
            $node->field_flash_video[0]['embed_params']['menu']
                true
            $node->field_flash_video[0]['embed_params']['allowfullscreen']
                true
            $node->field_flash_video[0]['embed_params']['bgcolor']
                #DDDDDD
            $node->field_flash_video[0]['embed_params']['swliveconnect']
                false

        $node->field_flash_video[0]['view']
            <div class="swftools-wrapper generic-flv "><div class="swftools"> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="320" height="275" id="swf12367755592"> <param name="movie" value="http://localhost/drupal/sites/all/modules/swftools/shared/generic/generic_flv.swf" /> <param name="allowScriptAccess" value="sameDomain" /> <param name="wmode" value="opaque" /> <param name="bgcolor" value="#DDDDDD" /> <param name="scale" value="showall" /> <param name="quality" value="autohigh" /> <param name="align" value="l" /> <param name="allowfullscreen" value="true" /> <param name="base" value="http://localhost/drupal/sites/default/files/" /> <param name="play" value="false" /> <param name="menu" value="true" /> <param name="loop" value="true" /> <param name="flashvars" value="file_url=http://localhost/drupal/sites/default/files/media/drancing/vislab2002/DrancingSuit2002_vfo_am.flv&amp;autostart=false" /> <!--[if gte IE 7]>--> <object type="application/x-shockwave-flash" data="http://localhost/drupal/sites/all/modules/swftools/shared/generic/generic_flv.swf" width="320" height="275"> <param name="allowScriptAccess" value="sameDomain" /> <param name="wmode" value="opaque" /> <param name="bgcolor" value="#DDDDDD" /> <param name="scale" value="showall" /> <param name="quality" value="autohigh" /> <param name="align" value="l" /> <param name="allowfullscreen" value="true" /> <param name="base" value="http://localhost/drupal/sites/default/files/" /> <param name="play" value="false" /> <param name="menu" value="true" /> <param name="loop" value="true" /> <param name="flashvars" value="file_url=http://localhost/drupal/sites/default/files/media/drancing/vislab2002/DrancingSuit2002_vfo_am.flv&amp;autostart=false" /> <!--<![endif]--> <p>You are missing some Flash content that should appear here! Perhaps your browser cannot display it, or maybe it did not initialise correctly.</p> <!--[if gte IE 7]>--> </object> <!--<![endif]--> </object> </div> </div>
$node->field_flash_filefield (array)

Other than $node->field_flash_video[0]['view'], which is a self-fulfilling prophecy, what else could I key off ?

nobody click here