0

EE 3.1.4 Stash 3.0

I have a relationship field to entries that I am stashing. Everything was working fine until I changed the status options in the relationship channel. They need to have "Sold", "For Sale", "Sale Pending" statuses. I added these statuses and can render them in a template using the status tag with the relationship field like this:

{relationship_field status="not goofy"}
    {relationship_field:data}
{/relationship_field}

However, in my stash, when I add the status, nothing changes. So this:

{exp:stash:set_list name="sv_my_list" parse_tags="yes" parse_depth="2"}
    {relationship_field status="not goofy"}
        {relationship_field:data}
    {/relationship_field}
{/exp:stash:set_list}

...still only renders the "open" entries related instead of the rest. I have the status restriction option set in the channel field, so that the closed don't show up as options.

Is this a bug? Would it be for EE or Stash? Or am I doing this wrong?


EDIT

BTW... This doesn't work either...

{exp:stash:set_list name="sv_my_list" parse_tags="yes" parse_depth="2"}
    {relationship_field}
        {relationship_field:data}
    {/relationship_field}
{/exp:stash:set_list}

CLARIFICATION

To better clarify, I can achieve the results I am after while NOT using stash like this: (actual fields)

{exp:channel:entries
    channel="home_page"
    limit="1"
}
    <h2>{title}</h2>
    <ul>
        {model_homes status="not goofy"}
            <li>{model_homes:entry_id} : {model_homes:url_title} : {model_homes:overview}</li>
        {/model_homes}
    </ul>
{/exp:channel:entries}

But this will NOT work:

{exp:channel:entries
    channel="home_page"
    limit="1"
}
    {exp:stash:set_list name="sv_model_homes" parse_tags="yes" parse_depth="2"}
        {model_homes status="not goofy"}
            {stash:sv_house_id}{model_homes:entry_id}{/stash:sv_house_id}
            {stash:sv_house_url}{model_homes:url_title}{/stash:sv_house_url}
            {stash:sv_overview}{model_homes:overview}{/stash:sv_overview}
        {/model_homes}
    {/exp:stash:set_list}
{/exp:channel:entries}

UPDATE 3/21/16-9:15PM

I am removing all logic from templates to simplify as mush as possible since this is a larger site. This should simplify it enough to the issue at hand...

.index template

{!-- Call stash template file for frame --}
{stash:embed:control:home_frame}

{exp:stash:content}
    {stash:embed:markup:content_home}
{/exp:stash:content}

{stash:embed:data:content_variables
    stash:channel="home_page"
    stash:segment_data="home"
    stash:limit="1"
    stash:dynamic="no"
    stash:status=""
    stash:order_by=""
    stash:paginate=""
    stash:url_title=""
}

stash:embed:control:home_frame

    ...ALL THE HEADER STUFF
</head>
<body class="gray withAnimation" itemscope itemtype="http://schema.org/WebPage" style="overflow: 'hidden'; height: '100%'; position: 'fixed';">
    <div id="fader" style="background: #2d4656 url({exp:stash:logo}) no-repeat center center; height: 100%; left: 0; position: absolute; top: 0; width: 100%; z-index: 99999;"></div>
    <div class="wrapper">
        <header></header>

        {exp:stash:content}    <--- THIS IS WHAT I AM GETTING

        <!-- FOOTER -->
        <footer class="dark" itemscope itemtype="http://schema.org/WPFooter">
        ...THE REST OF THE FOOTER STUFF

stash:embed:markup:content_home (Shortened to just the list for this)

{exp:stash:get_list name='sv_model_homes'}
    {switch='<li><div class="row">||'}
        <div class="col-md-4 col-sm-6">
            ... THE REST

stash:embed:markup:content_variables (shortened to just the model homes segment)

{exp:switchee parse="inward" variable="{stash:segment_data}"}
    {case value="home"}
        {exp:channel:entries
            channel="{stash:channel}"
            dynamic="{stash:dynamic}"
            limit="{stash:limit}"
            status="{stash:status}"
            order_by="{stash:order_by}"
            sort="{stash:sort}"
            paginate="{stash:paginate}"
        }
            {!-- ANY META DESCRIPTIONS OR TITLE HERE --}
            {exp:stash:seo_title}{title}{/exp:stash:seo_title}
            {exp:stash:seo_desc}{exp:chopper chars="160"}{brief_intro}{/exp:chopper}{/exp:stash:seo_desc}

            {exp:stash:sv_title}{title}{/exp:stash:sv_title}
            {exp:stash:sv_url_title}{url_title}{/exp:stash:sv_url_title}
            {exp:stash:sv_entry_id}{entry_id}{/exp:stash:sv_entry_id}
            {exp:stash:sv_entry_date}{entry_date format="%Y %m %d"}{/exp:stash:sv_entry_date}
            {exp:stash:sv_edit_date}{edit_date format="%Y %m %d"}{/exp:stash:sv_edit_date}

            {exp:stash:set_list name="slideshow_images" parse_tags="yes"}
                {slideshow}
                    {slideshow:slider_images}
                        {stash:sv_slideshow_image}{image:url:slider-optimized}{/stash:sv_slideshow_image}
                        {stash:sv_slideshow_title}{image:title}{/stash:sv_slideshow_title}
                    {/slideshow:slider_images}
                {/slideshow}
            {/exp:stash:set_list}
            {exp:stash:sv_welcome_title}{welcome_title}{/exp:stash:sv_welcome_title}
            {exp:stash:sv_welcome_greeting}{welcome_greeting}{/exp:stash:sv_welcome_greeting}
            {exp:stash:set_list name="sv_model_homes" parse_tags="yes" parse_depth="2"}
                {model_homes}
                    {stash:sv_house_id}{model_homes:entry_id}{/stash:sv_house_id}
                    {stash:sv_house_url}{model_homes:url_title}{/stash:sv_house_url}
                    {stash:sv_overview}{model_homes:overview}{/stash:sv_overview}
                    {exp:stash:set_list:nested name="sv_address_{model_homes:entry_id}" context parse_tags="yes"}
                        {model_homes:address}
                            {stash:sv_street}{address:street}{/stash:sv_street}
                            {stash:sv_city}{address:city}{/stash:sv_city}
                            {stash:sv_state}{address:state}{/stash:sv_state}
                            {stash:sv_zip}{address:zip}{/stash:sv_zip}
                        {/model_homes:address}
                    {/exp:stash:set_list:nested}
                    {exp:stash:set_list:nested name="sv_house_images_{model_homes:entry_id}" parse_tags="yes"}
                        {!--{model_homes:house_images cover_only="yes"}--}
                        {model_homes:house_images}
                            {stash:sv_house_image_full}{image:url}{/stash:sv_house_image_full}
                            {stash:sv_house_image}{image:url:gallery}{/stash:sv_house_image}
                            {stash:sv_house_title}{image:title}{/stash:sv_house_title}
                            {stash:sv_house_description}{image:description}{/stash:sv_house_description}
                        {/model_homes:house_images}
                    {/exp:stash:set_list:nested}
                    {exp:stash:set_list:nested name="sv_details_{model_homes:entry_id}" parse_tags="yes"}
                        {model_homes:house_details}
                            {stash:sv_price}{house_details:price}{/stash:sv_price}
                            {stash:sv_bedrooms}{house_details:bedrooms}{/stash:sv_bedrooms}
                            {stash:sv_bathrooms}{house_details:bathrooms}{/stash:sv_bathrooms}
                            {stash:sv_living_rooms}{house_details:living_rooms}{/stash:sv_living_rooms}
                            {stash:sv_dining_rooms}{house_details:dining_rooms}{/stash:sv_dining_rooms}
                            {stash:sv_square_footage}{house_details:square_footage}{/stash:sv_square_footage}
                        {/model_homes:house_details}
                    {/exp:stash:set_list:nested}
                {/model_homes}
            {/exp:stash:set_list}
        ... MORE MORE MORE

TEMP SOLUTION

Since I needed to work around this, I just created a custom field named {house_status} and used the {channel:entries search:house_status=""} to get around the custom statuses not working.

I would still like to find a solution though. :)

11
  • This may seem like a silly question, but if it works natively, why are you needing to use Stash here? Mar 22, 2016 at 1:45
  • Because the lists are being generated and stashed in a earlier stage for rendering in a later process.
    – W3bGuy
    Mar 22, 2016 at 1:46
  • How are you outputting the stash list? The get lsit will likely need to be wrapped in {exp:stash:parse} tags due to the parse order. Mar 22, 2016 at 2:56
  • I updated the OP to reflect the usage example. These are just small segments of the templates being used, but it should hopefully help with the usage understanding. Like I said, I can render them to the list as long as the status is NOT a custom status. STATUS=OPEN works fine. STATUS=SOLD or FOR SALE, etc... will not go in the list.
    – W3bGuy
    Mar 22, 2016 at 3:17
  • Brian, I am wondering if this has to do with the fact that you are leaving the status param blank for your parent entry. When you pass the status param to your data embed you are leaving the status set to blank or default, which means open only. I wonder if this particular way of using stash for related entries is messing around with the native status logic. Mar 22, 2016 at 11:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.