vmichnowicz / vwm_polls

Free ExpressionEngine Poll Module and Fieldtype
Apache License 2.0
16 stars 8 forks source link

Options and Vote Button Not showing #11

Closed LilacCreative closed 12 years ago

LilacCreative commented 12 years ago

I'm trying to use VWM Polls in the footer of a client's site, and I've used the exact code in your wiki, but the poll options and vote buttons aren't displaying at all. You can check it out here (scroll down to the footer of the page): http://www.captivatedvisions.co.uk/index.php/blog What do I need to do to get this working?

I'm running EE 2.5.1

vmichnowicz commented 12 years ago

The example code provided on the wiki assumes you are displaying the polls dynamically. If you want to have a static poll on multiple pages regardless of the current URL then you must use dynamic="no" in the {exp:channel:entries} tag.

This issue has been brought up a few times so I just updated the wiki with this information as well.

LilacCreative commented 12 years ago

Hi, Victor. I actually did think of that, and my channel entries tag does have the dynamic="no" parameter. The poll question (which is outside the VWM poll tags) shows up, but none of the VWM poll functions display.

I'm running the same site on a local dev environment and VWM polls seems to work there. But the local dev site is EE 2.5, and the live site is upgraded to 2.5.1. Is there something about 2.5.1 that could be causing VWM polls not to work?

vmichnowicz commented 12 years ago

I believe I have tested the module on EE 2.5.1 successfully, but I will have to double check that later. What version of PHP is running on the live site?

LilacCreative commented 12 years ago

I'm not sure (my client's hosting doesn't give me that information), but VWM options were displaying on her site before I did the upgrade to 2.5.1, so I don't think PHP version is an issue. I'll try to contact her hosting and track down that info to be sure.

vmichnowicz commented 12 years ago

I just tried the module with ExpressionEngine 2.5.2 and it seems to works perfectly. I would double check that you have the correct fieldtype name. The example code assumes the fieldtype will be poll_1. You can do a little debugging with some code similar to below:

{exp:channel:entries channel="polls" status="closed|open" dynamic="no"}
    Title: {title}<br>
    Poll (should be a JSON string): {poll}<br>
    Entry ID: {entry_id}<br>
    Entry ID (should be the same value as above): {poll:field_id}<br>
{/exp:channel:entries}
LilacCreative commented 12 years ago

Okay, field_id="{poll_1:field_id}" was where I was getting hung up. I replaced poll_1 with my custom field name, but also got rid of :field_id as well. Once I put that back, things started working again. Thanks for the help!