All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Low Variables Playa field problem

Carnix 30 Sep 2013 17:22 problem, complete

I'm having trouble with using a Playa field with Low Variables.

Basically, it doesn't render anything. I have Playa 4.3 (due to an apparent bug in Playa, I cannot update past that - all attempts based on their information fails with ugly database errors, so I'm stuck on that version for now).

I've boiled the template down to this:

{exp:channel:entries channel="live_pages"}
{exp:low_variables:pair var="lv_live_carousel_vegas2014"}


{live_promotion_caption}

{/exp:low_variables:pair}
{/exp:channel:entries}

lv_live_home_carousel_vegas2014 contains a single Playa field. That variable is configured to group children from a different channel.

The resulting output is simply blank:
http://screencast.com/t/5FhED5KKb0kW

I've triple checked the field names are correct and that the promotion channel entry is open - it's just rendering nothing at all. What I'm trying to do is use LV as a configuration option - editors can select which promotion they want in the carousel and in what order, and then use the Promotions channel itself to build out the actual promotion items (technically speaking, a different editor manages the promotions channel from the one that has access to LVs.. but that's neither here nor there). If there's perhaps a better way to accomplish this, I'm open to it, but it seems to me this is a pretty efficient way to do it - except Playa doesn't seem to be playing well...

We're using LV 2.2.1
Playa 4.3
EE 2.5.3

Thanks!

Replies

  1. Carnix 30 Sep 2013 17:35

    By the way, I tried updating to LV 2.4.0 - it didn't help.

  2. Carnix 30 Sep 2013 17:59

    (just realized, there *was* some HTML code in that code sample... but even what shows up there is sufficient to illustrate the problem).

  3. Carnix 30 Sep 2013 18:10

    Oh, also, I read this post:
    https://getsatisfaction.com/low/topic...

    I changed my template to look like this:
    BEGIN LOW----
    {exp:channel:entries channel="live_pages"}
    {exp:low_variables:pair var="lv_live_carousel_vegas2014"}
    {live_promotion_caption}
    {/exp:low_variables:pair}
    {/exp:channel:entries}
    ---- END LOW
    ---BEGIN PLAYA
    {exp:playa:children field="lv_live_carousel_vegas2014"}
    {url_title}
    {/exp:playa:children}
    ---END PLAYA

    And I ended up with this:
    http://screencast.com/t/Er9vVnDuF

    So the Playa field is working correctly, the issue is when I try to get at the Playa field via LV. Maybe the solution here is to use use the playa tags instead of coming at it as a Low Variable? Seems backwards.. but I'll give that a go anyway.

  4. Low 30 Sep 2013 20:22

    Why would you nest the Low Variables tag inside the channel:entries tag? What happens when you un-nest the tag and just use the low_variables:pair tag in the template? Does that give you the entries?

    Carnix 10 Oct 2013 12:23

    ^^ this solve my problem.

  5. CNG 8 Oct 2013 22:45

    Hello, I am apparently having the same problem on a site I inherited.

    This template code was working with EE 2.5.2, Low Variables 2.3.0 and Playa 4.3. I now have upgraded to EE 2.7.1, Low Variables 2.4.0 and Playa 4.4.5:

    {exp:low_variables:parse var="lv_partner_promos"} 
    content
    {/exp:low_variables:parse}


    Now pages with this code produce a blank page, but no PHP errors that I can find get recorded to my Apache log.

    “lv_partner_promos” is a variable type Playa. The blank page still happens after removing the entries from the Playa selector.

    Any other info I can provide?
    Thank you!

  6. CNG 8 Oct 2013 23:13

    Also, FYI:

    This causes the same white screen error:

    {exp:low_variables:pair var="lv_partner_promos" limit="2"} 
    content
    {/exp:low_variables:pair}


    This:
    {lv_partner_promos}
    Outputs:
    [158] [this-is-a-title] This is a title
    [1058] [this-is-a-title] This is a title
    [3026] [this-is-a-title] This is a title

  7. Low 9 Oct 2013 07:21

    Can't reproduce. Can you post your complete template here? You can use http://pastie.org/ or http://pastebin.com/ for large chunks of code.

  8. CNG 9 Oct 2013 23:21

    Hi Low,

    I created a new template for testing in both the pre upgrade (EE 2.5.2, LV 2.3.0, Playa 4.3) and post upgrade (EE 2.7.1, LV 2.4.0, Playa 4.4.5) environments.

    Template site/lv_test:

    THIS IS A TEST 
    {exp:low_variables:parse var="lv_partner_promos"}
    LOW VARIABLES AND PLAYA WORK
    {/exp:low_variables:parse}
    THIS IS A TEST


    This for some reason revealed an error message on the front end trying to access the site/lv_test URL.

    On the pre upgrade site, the template rendered as:

    THIS IS A TEST 

    LOW VARIABLES AND PLAYA WORK

    LOW VARIABLES AND PLAYA WORK

    LOW VARIABLES AND PLAYA WORK

    THIS IS A TEST


    But on the post upgrade site, the template rendered as:

    <p>Error Number: 1054</p> 

    <p>Unknown column 'rel.parent_is_draft' in 'where clause'</p>

    <p>SELECT DISTINCT(rel.child_entry_id) AS entry_id
    FROM exp_playa_relationships rel INNER JOIN exp_channel_titles AS ct ON ct.entry_id = rel.child_entry_id AND ct.'entry_date' < "1381360428" WHERE rel.parent_is_draft = 0 AND rel.parent_var_id = 19 ORDER BY rel.parent_entry_id, rel.parent_field_id, rel.parent_row_id, rel.parent_col_id, rel.parent_var_id, rel.rel_order</p>

    <p>Filename: [redacted]/application/third_party/playa/mod.playa.php</p>

    <p>Line Number: 797</p>


    I’m not familiar with those database tables. This indicates a problem with Playa? Should I be reporting this to that team?

    Thanks a lot, I appreciate your help!

  9. CNG 9 Oct 2013 23:32

    After finding error 1054 referenced on http://expressionengine.stackexchange..., I tried to follow that answer and go to Addons->Fieldtypes->Playa, but got another similar error 1060. Upon refreshing, the error disappeared. And then the template I posted in the last comment magically rendered fine.

    So I think the problems are resolved now. It would be nice to know why this happened and have some confidence it won’t happen again or know how to avoid it, though, if you have any insight.

    Thank you!

  10. Low 10 Oct 2013 06:50

    Anna's answer on the EESE site was exactly what the problem was. The new is_draft column wasn't added to the Playa table, and now it is, so it works. Definitely a Playa issue. Next time, remember to visit Playa's fieldtype setting page for each update.

  11. Carnix 10 Oct 2013 12:21

    I'm going to mark this solved, since my problem was solved by putting the field outside the channel loop, and it looks like the other issue piggy backing here is a problem with the Playa plugin. (Sorry, I went on leave and forgot to close this out before I left)

    Carnix 10 Oct 2013 12:22

    (looks like Low already did it... so, nevermind ;)

    Carnix 10 Oct 2013 12:26

    By the way, just for completeness, I was able to put the playa field outside the channel loop and still have the content woven into the channel data like I needed because we're using Stash heavily as a meta template (master + layouts) anyway, so it was just a simple as making the data output in Stash and then putting the stash variable into the content where needed.