Skip to content

Instantly share code, notes, and snippets.

@jamiepittock
Last active January 4, 2016 05:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamiepittock/8579243 to your computer and use it in GitHub Desktop.
Save jamiepittock/8579243 to your computer and use it in GitHub Desktop.
Unique venues
{exp:stash:set_list name="venues" parse_tags="yes" parse_conditionals="yes" trim="yes"}
{exp:channel:entries channel="events" dynamic="no" show_future_entries="yes"}
{if cf_events_place}
{stash:venue_title}{cf_events_place}{title}{/cf_events_place}{/stash:venue_title}
{stash:venue_id}{cf_events_place}{entry_id}{/cf_events_place}{/stash:venue_id}
{/if}
{/exp:channel:entries}
{/exp:stash:set_list}
<select>
{exp:stash:get_list unique="yes" name="venues" trim="yes"}
<option value="{venue_id}">{venue_title}</option>
{/exp:stash:get_list}
</select>
@jamiepittock
Copy link
Author

If logged out this works as expected. If I'm logged in my browser (Chrome and Safari) fails to load the page. If I remove the parse_tags parameter the page loads but obviously what I was trying to accomplish doesn't.

@croxton
Copy link

croxton commented Jan 23, 2014

Could be a PHP error notice being generated - do you have errors set to output when logged in? What version of PHP, EE and Stash are you using?

@jamiepittock
Copy link
Author

EE 2.7.3
Stash 2.4.8
PHP 5.4.16

Scrap the bit about being logged in or out. It's now not working either way.

I'm not sure about the PHP error. I do have errors set to output and it's not a white screen (of death). It's the browser default telling me it couldn't open the page.

https://dl.dropboxusercontent.com/u/79629/Screen%20Shot%202014-01-23%20at%2014.34.46.png

@jamiepittock
Copy link
Author

Sorry, just tried uninstalling and reinstalling Stash and it's now working. I'm not sure why that happened.

Thanks for looking anyway. I'll let you know if it happens again.

@croxton
Copy link

croxton commented Jan 23, 2014

Ah, could be module updates button wasn't run last time you upgraded Stash? Some changes were made to the db tables a few versions back.

@jamiepittock
Copy link
Author

Yeah maybe. Other stashes on other pages were working ok though. It was just the inclusion of parse_tags and parse_conditionals that seems to throw it out.

Anyway, thanks again. I'll let you know if it happens again and I can replicate it.

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