Hot answers tagged

21

The guys at P&T did come back to me in less than 24 hours with a fix. I'll post it here in case someone runs into the same problem. Take a look at the columns in exp_playa_relationships table in the database. Does it have a field parent_var_id? If no, then the version you should set is 4.1. If yes, does it have a field parent_is_draft? If ...


12

For some reason sometime the update is applied but EE does not change the version number. I'm not even sure on which side the error happens, but setting the version number to 4.5 in exp_fieldtypes should solve your problem.


9

Looks like the update for Playa didn't complete. The "rel.parent_is_draft" column isn't in the database. Make sure you followed all the Playa update instructions including this one: Go to Add-Ons → Fieldtypes → Playa to trigger Playa’s update script.


7

...And as soon as I write it down in a question, I figured out my mistake. Correct solution for future visitors was: {if "{product_videos:total_children}" > 0} //do something {/if}


6

You can do this: {exp:playa:parents channel="News"} {if count == 1} <h4>Related News</h4> <ul> {/if} <li><a href="{page_url}">{title}</a></li> {if count == total_results} </ul> {/if} {/exp:playa:parents}


6

My decision to use playa over Ellis' new relationships, is based on: 1) When you buy an addon from a top-notch developer like Brandon Kelly, it comes with developer support, which can include timely addition of future features that you request v. paying for a support plan from Ellis if you don't have one already. 2} Playa has been vetted for many years ...


6

I don't know if you already have a anwser yet. But I had the same problem and I. I want to enable pagination within a Playa loop. You need to do 2 things to enable pagination in a Playa loop. Override the default disable of “categories|category_fields|member_data|pagination”. Put var_prefix in your Playa tag and pagination tag. You did a good override of ...


5

You can, you just need to hold Playa’s hand a little so it knows which entries all of those tags belong to. You do that with Playa’s var_prefix param: {exp:playa:parents ... var_prefix="consultation"} Physician: {consultation:cf_consult_doctor var_prefix="doctor"} {doctor:title} {/consultation:cf_consult_doctor} {/exp:playa:parents}


5

It’s actually just sheer luck that that worked for you in EE1 – there are a lot of variables at play with EE’s parse order, and most of the time that kind of thing won’t work. You can get it working using Matrix and Playa’s var_prefix parameters, though: {exp:channel:entries} {matrix} {playa var_prefix="playafield"} {playafield:...


5

That’s an error in the documentation, and we’ll get that fixed. :child_ids only supports filtering entries with the following parameters: var_id var element_id field_id field col_id col row_id child_id parent_id If you need anything else, and you should just use a tag pair: {event_related_media limit="2" status="Archived" channel="video" ...


5

It's a pretty simple operation, since they are stored very similarly. First, backup your database. Then, run this code in a PHP-enabled template: <?php $playa = ee()->db->query("SELECT * FROM exp_playa_relationships"); foreach($playa->result_array() as $rel) { $data = array( 'parent_id' => $rel['parent_entry_id'], '...


5

Always read the manual Steven!!! http://docs.pixelandtonic.com/playa/using/converting/relationships.html


5

So far I've discovered and fixed one case and will add more here if discovered. File: mod.playa.php Line: 550 FROM $sql = 'SELECT DISTINCT(rel.child_entry_id) AS entry_id TO $sql = 'SELECT DISTINCT rel.child_entry_id AS entry_id, rel.parent_entry_id, rel.parent_field_id, rel.parent_row_id, rel.parent_col_id, rel.parent_var_id, rel.rel_order


4

Have you tried using total_results instead of count? {exp:playa:children} {if total_results == "1"} <ul class="agent"> <li class="name">{title}</li> <li class="phone">{phone}</li> <li class="mail">{agent_email}</li> </ul> {if:else} <div ...


4

Sean, you may need to add a status parameter to your playa tag like so: {exp:playa:parents channel="zoo_visitor" status="not closed"}. Zoo Visitor uses a custom status per member group and the playa tag will only pull in those with an Open status by default.


4

NotoriousWebmaster - Playa disables categories by default. You'll need to add disable= to over-ride the parameter. {exp:playa:children field="also_like" status="open|wide" disable="members"} or similar. Let me know if that helps!


4

I fixed this issue. It was/is a bug in Playa. Pixel and Tonic now knows about it and will include a fix in the next release. In the meantime, here is my solution: Change Line 2484 of ft.playa.php to... $data = array( 'parent_var_id' => $this->var_id, 'parent_is_draft' => 0 ); Basically added 'parent_is_draft' => 0


4

There is a bit of a bug in Playa that impacts Low Variables: exp_playa_relationships has parent_var_id field. It's supposed to be either 0 or 1. Low Variables sets it to NULL due to an oversight in our code. The solution was to set the column to 0 for rows, that were not 1. We'll have a fix for this included in Playa in the future, but for right now, ...


4

Do you mean that a single entry could have a single entry relating itself to over 2,000 other entries, or just that there are 2,000+ other entries to choose from? If the latter, the answer is Yes, Playa is quite capable of dealing with large numbers of entries. Simply set a Limit on the Playa field to something like 100 entries, and then use the Search bar ...


4

After updating Playa and it failing to run it's update forDB schema, here's what you can try: Take a look at the columns in exp_playa_relationships table in the database. Does it have a field parent_var_id? If no, then the version you should set is 4.1. If yes, does it have a field parent_is_draft? If no, then the version you should set is 4.3 If yes, ...


3

The reason Playa isn't working is because you need to use a Channel Entries loop. The template parser for Postmaster is pretty complex, and is different than a channel entries loop for many reasons. You should do something like: {exp:channel:entries dynamic="no" entry_id="{parcel:entry_id}"} {company_membership_package} {title} {/...


3

Here is what worked. Discussion follows below the code. {exp:playa:children field="static_playa_related_posts" entry_id="{entry_id}" var_prefix="child" limit="8" } <div class="related blurb"> {exp:lg_replace:haystack needles="{child:mtrx_images backspace="1"}image_{row_count}|{/child:mtrx_images}"} <h4><a href="{child:...


3

You are using {permalink=enewsletter/article} in your code. http://ellislab.com/expressionengine/user-guide/modules/channel/channel_entries.html#permalink That will return an id What you want is {title_permalink="enewsletter/article"}


3

Not sure if you are using Structure or native EE templating, but a sure way to remedy this is to make sure your outer channel:entries tag is actually pulling the playa:parent page. {!-- Replace XX with the parent page's entry_id --} {exp:channel:entries channel="isp" entry_id="XX"} {events show_future_entries="yes"} {title} {/events} {/exp:...


3

Brandon's solution worked great! Thanks! {event:if count == 1}


3

Just go to the Add-Ons → Fieldtypes → Playa page and the update script will automatically run in the background.


3

If by "robust enough" you mean do they have basically the same features, yes. I've used EE's Relationships without any issues. I love Grid's search:column_name feature. That's a step up from Matrix. However, since it is brand new, it does not work with as many third party fieldtypes as Matrix. I'm sure that will change in the next 2-3 months. Depending on ...


3

I've hacked Playa before to do this same thing. Just modify /playa/views/entry.php Using version 4.3.3, I added the entry_id for each entry like this in line 2 of entry.php. Original: <a> <span class="playa-entry-status <?=str_replace(' ', '_',$entry->status)?>">&bull;</span> <?=$entry->title?></a>...


3

After updating Playa and it failing to run it's DB schema, here's what you can try: Take a look at the columns in exp_playa_relationships table in the database. Does it have a field parent_var_id? If no, then the version you should set is 4.1. If yes, does it have a field parent_is_draft? If no, then the version you should set is 4.3 If yes, then the ...


3

After some quick testing I'm pretty certain you can use the playa tag "total parents" and pipe that in as an orderby parameter. The playa children tag, as stated in their documentation "{exp:playa:parents} supports almost all of {exp:channel:entries}’ tag parameters", so it accepts orderby and sort parameters. So, the following should accomplish what your ...


Only top voted, non community-wiki answers of a minimum length are eligible