1

A client has just emailed and none of the playa fields are working on the front end templates. No changes have been made to the EE or plugin setup to cause the issue. The site has been up and running for 12 months.

EE is 2.5.5 Playa 4.3.3

For example

<ul class="quicklinks">
 {exp:playa:children field="page_quicklinks" limit="7"}
<li><a href="{exp:structure:entries}{quicklink_url}{/exp:structure:entries}">{title}</a></li>
 {/exp:playa:children}
</ul>

Outputs

<ul class="quicklinks">
<li><a href="">Express Orthodontics</a></li>
<li><a href="">Express Orthodontics</a></li>
<li><a href="">Express Orthodontics</a></li>
<li><a href="">Express Orthodontics</a></li>
<li><a href="">Express Orthodontics</a></li>
<li><a href="">Express Orthodontics</a></li>
<li><a href="">Express Orthodontics</a></li>
</ul>

"Express Orthodontics" is the current page title not the playa item title

Any advice would be greatly appreciated.

1 Answer 1

2

Sounds like the var_prefix parameter is your friend in this case!

7
  • I'm thinking is might be a PHP version issue. I've just grabbed a full copy of the site and put it on our dev server and there are no issues. The live server is running PHP Version 5.4.26 and the dev server is running PHP Version 5.3.28. But if I upgrade playa to the latest version (4.4.5) on the live site I get "A Database Error Occurred Error Number: 1060 Duplicate column name 'parent_is_draft' ALTER TABLE exp_playa_relationships ADD parent_is_draft INT(1) UNSIGNED NOT NULL DEFAULT 0 AFTER parent_var_id Filename: third_party/playa/ft.playa.php Line Number: 474" Mar 27, 2014 at 11:04
  • Haven't seen this in a while! The comment section here ruins all formatting, so here's the solution: pastie.org/private/k07xldc2jrtfrdox0asyg Mar 27, 2014 at 11:08
  • Thanks Andris. Just did the steps and set the correct Playa version number (4.4.5). Didn't fix my issue unfortunately. Playa fields are still not working in the templates on the live site. Mar 27, 2014 at 11:19
  • Are you also using the var_prefix parameter? It is definitely recommended, if you're dealing with Playa tags within an exp:channel:entries loop. Mar 27, 2014 at 11:35
  • Hi Andris. I tried the var_prefix, as you suggested, on my original example like this: pastie.org/8973037. It worked. I hope I'm doing it right and not setting myself up for another issue. I still have no idea why a site that has worked fine for 12 months would all of a sudden have issues with playa fields and require the var_prefix to work. If anyone can tell me why for my own knowledge, that would be great. Thanks very much for taking the time to help me out. Mar 27, 2014 at 12:52

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.