ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

File {url} not working

March 03, 2012 6:48am

Subscribe [1]
  • #1 / Mar 03, 2012 6:48am

    ukhj

    7 posts

    Hi, I have had a look elsewhere and can’t find anything similar to what I’m experiencing. I am trying to use Flowplayer to play FLV files that are uploaded as part of an entry. The trouble is, when I use {url} within the page template I get a warning.

    Here is my code:

    {scene_trailer}
    <a href="http://{url}" class="player"></a>
    {/scene_trailer}

    And then the Flowplayer JavaScript is below this code.

    When I go to the page, I get the following error:

    A PHP Error was encountered
    Severity: Warning

    Message: array_merge() [function.array-merge]: Argument #1 is not an array

    Filename: libraries/Functions.php

    Line Number: 2585

    Can you help me with this? I don’t see why it wouldn’t work.

  • #2 / Mar 04, 2012 8:25am

    Sean C. Smith

    3818 posts

    Hi anthonyweston,

    You are probably running into issues as {url} is a member field and already exists as a variable in ExpressionEngine. If you change the name of your custom field to {video_url} does it then work?

    Sean

  • #3 / Mar 04, 2012 8:37am

    ukhj

    7 posts

    I don’t think I understand. My custom field is called scene_trailer and it’s a file field. I am trying to get it’s {url} in my above code. Have I got this wrong? It has worked for other files.

  • #4 / Mar 05, 2012 7:06pm

    Sean C. Smith

    3818 posts

    Hi Anthony,

    Now I understand. I just tested this code on my sandbox install and it worked as expected. could you try this on a blank template to see if you get the url working correctly without flowplay on the page.

    Use this code and replace your_channel with the name of your channel.

    {exp:channel:entries channel="your_channel" }
    {scene_trailer}
    <a href="http://{url}" class="player">{url}</a>
    
    {/scene_trailer}  
    {/exp:channel:entries}

    Sean

  • #5 / Mar 06, 2012 6:16am

    ukhj

    7 posts

    Thanks for your reply.

    No, it still doesn’t work. I get the following error 4 times:

    A PHP Error was encountered

    Severity: Warning

    Message: array_merge() [function.array-merge]: Argument #1 is not an array

    Filename: libraries/Functions.php

    Line Number: 2585

  • #6 / Mar 08, 2012 2:45pm

    Dan Decker

    7338 posts

    Hi anthonyweston,

    I have some bad news and some good news. Bad news is, this is a bug :-( Good news is we have a solution 😊 !

    If you apply the solution outlined in the bug report, does this behave properly for you?

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases