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.


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

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

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

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


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

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 ...


3

Try capturing the entry_ids to set a stash value then use that value to define the calendars tag. Grab the entry_ids for the events. {exp:stash:set parse_tags="yes"} {exp:channel:entries channel="education" disable="categories|member_data|pagination"} {stash:event_ids}0{exp:playa:children channel="calendar_events" limit="5"}|{entry_id}{/exp:playa:...


3

Looks like I got it working. maybe this will help someone else out, or maybe someone will find an even better solution. I simply switched {if row_count != total_rows} & {if row_count == total_rows} to {if count != total_results} & {if count == total_results} so the final code in my template is: {playa_field show_future_entries="yes" ...


3

Turns out the problem wasn't a parse issue after all. Playa disables categories by default so by placing a blank disable="" parameter on the {cf_feed_videos} tag it overrides this and re-enables categories for the related entries.


3

Looks like a variable name conflict. You can use "var_prefix" when this happens. Try something like this: {exp:playa:children channel="recipe" entry_id="{entry_id}" field="similar_recipes" var_prefix="related" } {related:title} {/exp:playa:children} http://docs.pixelandtonic.com/playa/templating/module/children.html


3

Are you trying to get the count of multiple playa entries for each matrix row? If so, you should be able to do something like the following, setting a different namespace prefix for matrix and playa to separate their tags: {your_matrix_field_name var_prefix="mx"} Matrix row {mx:row_count} of {mx:total_rows} total rows.<br> {mx:...


3

EE allows you to override control panel styling by adding a override.css stylesheet to the themes folder. So you could just add this rule within that stylesheet: .playa-ss {width: 100% !important}


3

This is what the var_prefix="" parameter is for. Update your code like this. {exp:channel:entries set="prod" dynamic="no" disable="pagination"} ... {exp:playa:parents channel="api" field="cf_apis_related_product" var_prefix="api"} <ul class="dropdown"> <li><a href="{path='{PROD_CHANNEL_url_title}/docs/{api:url_title}'}">{...


3

Reposting here the solution that I posted on Devot:ee to the same question: <ul> {exp:stash:get_list name="location_list"} {if 0 == {exp:stash:list_count name="checked_locations" match="#^{entry_id}$#" against="entry_id"}} <li>{entry_id}</li> {/if} {/exp:stash:get_list} </ul>


3

You'll need to write a custom fieldtype to achieve this - I can't think of any existing fieldtypes that could accomplish this for you. So in your fieldtype, you'd query exp_playa_relationships for all parent_entry_id's where where child_entry_id was equal to the entry_id associated with ee()->session->userdata('member_id'). (Not sure how Profile:Edit ...


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