• I'm testing polls 0.8 on elgg 1.7.1.

    I met the same problem as Trajan. When I delete the lines from 99 to 114 of /mod/polls/views/default/object/poll.php, the page load fine.

    So far, I can't work out how to poll. 

  • I change the lins 63~65 of /mod/polls/views/default/polls/forms/vote.php from

    <?
        }
    ?>

    to

    <?php
        }
    ?>

    It works, ant the lines 99~114 of /mod/polls/views/default/object/poll.php was not needed to delete now.

  • What does "Latest community polls" mean? I have created an individual poll and a group poll, but this widget shows "No polls found.".

  • @Blue - well spotted. It now also works for me after adding in the missing 'php'.

    Latest community polls pulls in all polls not made by the widget_owner. Create a second user from admin and use them to create a new poll.

    Then go back to that widget and you should see the poll you just created.

  • Blue, thanks for the bug fix - I'll include that in the next release. Trajan is correct - that was the behaviour in the previous "poll" plugin and I left that in. I could just include all the polls in the next release  if people find that behaviour less confusing, however.

  • Trajan and Kevin, Thanks!

    I have another question. How to let the un-logged in users polling? The default access is PUBLIC, and the poll access is also PUBLIC.

     

  • Hi Blue,

    Polls can be made public in the sense that that they can viewed by non-logged-in users.

    You need to be logged in to vote.

    It might be possible to change this to use some other mechanism to prevent people from voting more than once, eg. IP address, but that would need to be funded to develop as it would not be completely trivial to do.

  • Hi Kevin,

    I found the line 76 and line 77 of /mod/polls/start.php should be:

    add_submenu_item(sprintf(elgg_echo('polls:user'),$page_owner->name),$CONFIG->wwwroot."pg/polls/list/" . $page_owner->username);
                        add_submenu_item(sprintf(elgg_echo('polls:user:friends'),$page_owner->name),$CONFIG->wwwroot."pg/polls/friends/" . $page_owner->username);


    Otherwise, the left menu does not work properly.

  • Thanks, Blue - I've made those changes and will include them in the next release.

  • I'm sorry,I think I've read the answer to this already.This new plugin "polls" won't be able to use the old database for the "poll" plugin will it?

  • patriot, The only difference so far as I can remember is the poll choices. So if you edit each existing poll and re-enter the choices, everything should work. Please tell me if that works for you.

  • Thanks for the reply Kevin,I have way to may user polls to do that,but I will warn them when it's time to dump the old quotes.

  • All of you who get the DB error, did you use Custom Style plugins???

    This error are same with im get when using Custom Style plugins

  • Hi Kevin,

    I'm using polls with elgg 1.7.2 on a LAMP server. (fresh install, fresh database)

    I get the DB error in 1 specific case : when looking at group polls from the left menu in a group's page.

    Apache2's error log says :

     "Invalid argument supplied for foreach()" in file /var/www/elgg172/mod/polls/pages/index.php (line 33), referer: https://veille.pole-numerique.com/pg/groups/3/ecommerce/

    The error i get on the elgg's page says :

    Table 'elgg172.entities' doesn't exist

    QUERY: SELECT * from entities e join objects_entity o on e.guid=o.guid where e.type='object' and e.subtype=7 and e.container_guid = 3 and ( (1 = 1) and e.enabled='yes') order by e.time_created desc limit 0, 50

    What strikes me is that table 'elgg172.entities' really doesn't exist : it should be 'elgg172_entities'

    Don't know if it's a real clue, but it's the only few things i've noticed. I tried to disable all plugins (except groups of course :-) but n anyway the error is still the same.

    It's the only issue i've met with your plugin, nice work anyway, thanks for your work !

  • Kevin,

    Thanks a lot, evereything works fine right now

  • Hi Kevin,

    I am getting an error and up to this point I have read all the comments and did fixes here and there to make other errors go. But i cant get rid of the following error. I will keep you posted if I find a solution. I have also attached an image, you can notice how polls are displayed at the very top. I am running Elgg 1.7.1.

     

    DatabaseException

    Unknown column 'a.parent_guid' in 'where clause'

    QUERY: SELECT count(a.id) as sum from annotations a WHERE a.parent_guid=2 and ( (a.access_id = -2
    AND a.owner_guid IN (
    SELECT guid_one FROM entity_relationships
    WHERE relationship='friend' AND guid_two=24
    )) OR (a.access_id IN (2,1)
    OR (a.owner_guid = 24)
    OR (
    a.access_id = 0
    AND a.owner_guid = 24
    )
    ) and a.enabled='yes')

     

    http://img137.imageshack.us/img137/2041/fullscreen2.png

  • nxqamar - parent_guid is not a valid Elgg database field and is not used by core Elgg or any of my plugins, including polls. (It is used as metadata by some plugins, but that code is not how you access metadata.)

    I think that you have a problem with another plugin.

  • kevin, upon further investigating, i found two plug-ins that used parent_guid instances. I disabled those two plug-ins but I am still getting the same error.

    DatabaseException

    Unknown column 'a.parent_guid' in 'where clause'

    QUERY: SELECT count(a.id) as sum from annotations a WHERE a.parent_guid=5 and ( (a.access_id = -2
    AND a.owner_guid IN (
    SELECT guid_one FROM entity_relationships
    WHERE relationship='friend' AND guid_two=24
    )) OR (a.access_id IN (2,1)
    OR (a.owner_guid = 24)
    OR (
    a.access_id = 0
    AND a.owner_guid = 24
    )
    ) and a.enabled='yes')

  • I have noticed a problem. When someone decides to edit a poll choice, annotations of this certain choice are't being updated. So if for example this choice has already 2 votes, after editing it will show zero votes. 

  • Is there a way to switch from the original poll plugin to the polls plugin with keeping the old polls? I don't know how the polls entries in the database look like and if there's a great difference to the entries of the original plugin. It seems the poll features are quite the same though. Would it be possible to maybe include an update option in a future release of the polls plugin?

  • kostis - that's by design - if you change the value of a choice then it isn't the same value. iionly - no there currently is no upgrade path (polls tend to change fairly often so I didn't see the need), but I think that you *may* be able to run both plugins at once.

  • iionly - come to think of it, you may be able to edit an exisiting poll and add back the potential values so it works with the new plugin.

  • Thanks Kevin. I don't know if I will manage to do the changes but I will at least take a close look at the code.

  • Kevin, Thank you for the great plugin.

    can it be configured so only admins can create polls?

Kevin Jardine

Elgg plugin developer

Stats

  • Category: Widgets
  • License: GNU General Public License (GPL) version 2
  • Updated: 2014-11-17
  • Downloads: 4036
  • Recommendations: 15

Other Projects

View Kevin Jardine's plugins