1

EE version: 2.5.2 Assets version: 2.1.2

I'm using the {exp:assets:folders} tag with the parent_folder parameter set and it's not working when that parameter is set.

This is an MSM site and I'm working on the 2nd site. I can see everything just fine within the control panel.

I've setup a dedicated page to test this out so that there aren't conflicts with other add-ons. Here's my code:

<ul>
{exp:assets:folders parent_folder="{filedir_7}human-resources"}
    <li>
        <a href="{path=assets/view/{folder_id}}">{folder_name}</a>
        {if total_subfolders}
            <ul>
                {subfolders}
            </ul>
        {/if}
    </li>
{/exp:assets:folders}
</ul>

This code does work:

<ul>
{exp:assets:folders}
    <li>
        <a href="{path=assets/view/{folder_id}}">{folder_name}</a>
        {if total_subfolders}
            <ul>
                {subfolders}
            </ul>
        {/if}
    </li>
{/exp:assets:folders}
</ul>

What's strange is that using the parent_folder parameter worked at one time. I've looked back at my check-ins and don't see anything that would conflict with the Assets code.

I tried some debugging by looking at the _get_folder_id_by_tagpath function in mod.assets.php. I noticed that $tagpath is passed in as http://intranet.compassoncology.com/uploads/human-resources instead of {filedir_7}human-resources. The code appears to be expecting the latter. Is there something that could have happened to cause {filedir_7} to be replaced?

Thanks for any help or direction!

1

I can reproduce this, so I've submitted it as a bug. We'll update here with progress.

Thank you!

8
  • Thanks Lisa! I think I may have also found a bug related to a feature added in 2.1.1, "Added the file_id parameter to the {exp:assets:files} tag". Should I start a new question related to that?
    – Mark Croft
    May 1 '13 at 21:43
  • Mark - sure; or if you think you have a bug, go ahead and email directly to support@pixelandtonic.com.
    – Lisa
    May 2 '13 at 13:54
  • ...any progress on this? I might be having the same issue with Assets 2.1.3 and EE 2.6.1.
    – Sandwich
    Jun 9 '13 at 13:09
  • Lisa? Any updates? IMO it's pretty serious when the example provided in the docs doesn't work... ;)
    – Sandwich
    Oct 11 '13 at 12:10
  • Hey, uhh, Sandwich :) I can't reproduce this on the latest Assets/EE. Are you still having issues? If so, shoot an email to support@pixelandtonic.com! Oct 11 '13 at 14:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.