I'm trying to set up an on-line poll on the home page of our intranet.
This is what I want to happen
The public user goes to the home page and sees the poll question
The user picks a radio button and votes
on submission of the vote the user goes to the results page
when the user goes back to the home page the user sees the poll results (Results format)
What is actually happening is
when the user votes and goes back to the home page they still see the poll question?
I presumed that this was due to cache so I have set up the cache manager to dump the cache for the poll elements every 15 minutes.
So I would have thought that after a public user has voted and the clear cache job had run, if the user refreshes their browser they would see the poll results, but they don’t, they still see the question!!
Any help with this problem would be greatly appreciated.
How are you printing the poll on the page? Is it nested inside another page or does it use the nested content design area?
I'm nesting the poll asset inside another page (I have also set the cache manager to clear the cache on the nesting page every 15 minutes)
You cant nest a dynamic page with a form into a static page and have caching on. That poll form would not be submitting because the cached version of the main page would always be displayed. The same thing happens with asset builders and custom forms. The URL does not change when the poll is submitted, so the cache manager intercepts the page before the poll has a chance to record the result. Are you seeing any results in the poll at all?
You'd be better off creating a new design or customisation for this page and nesting the poll in that way. This allows each content area to cache differently.
[quote]You cant nest a dynamic page with a form into a static page and have caching on. That poll form would not be submitting because the cached version of the main page would always be displayed. The same thing happens with asset builders and custom forms. The URL does not change when the poll is submitted, so the cache manager intercepts the page before the poll has a chance to record the result. Are you seeing any results in the poll at all?
You'd be better off creating a new design or customisation for this page and nesting the poll in that way. This allows each content area to cache differently.[/quote]
I am indeed, when i hit the vote button my selection is being updated on the results page, but when I go back to the homepage instead of seeing the results I see the poll question again.
I will go ahead and try to create a new customisation as suggested, many thanks.
I have added the poll into the design creating a design customisation but…
The poll results seems to work with a fully qualified domain name, but with the short url it does not work.
So, when i vote on the poll I go to the results page, then when i hit the home button (which is set up with a short url) I go back to the home page and still see the question.
If i replace the short url with the fully qualified domain name in the url box I see the results as expected.
I presume the cookie that is being set is referencing the fully qualified domain name, therefore the cookie won’t recognise the short name.
Can I change what is being set in the cookie? Or any other suggestions would be helpful.
Also, I have deleted the voting records for root user and the number of votes for the current options has not been updated accordingly???
As far as I know, the Online Poll asset does not tally what vote each user entered, merely that they have voted (which will stop a user from voting again when "Allow Multiple Voting" is set to "No" on the Online Poll asset itself). So you can find out that Root User has voted, but you can't find out that Root User has voted for "option A", for instance.
If you delete the voting record for a user, it removes them from the list of users that have voted, letting them vote again. However, the number of votes will not be affected by this.