New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assets tag 'path' parameter throwing error when used in Statamic 2.5 #1206

joedakroub opened this Issue Jan 30, 2017 · 0 comments


None yet
2 participants

joedakroub commented Jan 30, 2017

Actual behaviour

When using the assets tag to retrieve assets from the Main Assets container, I am specifying a path parameter like so:

{{ assets path="assets" }}

I receive the following error:

Whoops, looks like something went wrong.

I did some digging into the Statamic source and found that Statamic\Addons\Assets\AssetsTag.php makes a call in the index() method to AssetContainer::wherePath($path) on line 58.

Upon looking at Statamic\API\AssetContainer.php the wherePath($path) method appears like so:

 * Get an asset container by path
 * @param string $path
 * @return \Statamic\Contracts\Assets\AssetContainer
public static function wherePath($path)
    // @todo

It also appears to trigger the same error with the if or container parameter.

If I get more time, I'll take a look and see if I can do some further research and possibly do a PR.

Steps to reproduce

  1. Add {{ assets path="assets" }} to a template

Server configuration

Operating system: macOS Sierra

Web server: Laravel Valet

PHP version: 7.1

Statamic version: 2.5.1

Updated from an older Statamic or fresh install: Minty fresh

List of installed addons: None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment