Support Forum

Poll Plugin Error "A Simple press poll can only appear in a forum post"

26 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

This will be the most likely fix. Give it a try perhaps while you are in the code there…

BR Brandon
Brandon
Member

Changing to !$inTopicLoop() didn’t work. Forum page load froze when loading a topic with a poll.

I just went with your example since the site is live and can’t really test.

@elsa.. You should be good to go but if not fixed in the next polls plugin update the change will be reverted. So check with the team here before updating that plugin.

YS Yellow Swordfish
Yellow Swordfish
Member

Apologies – i should have pointed out that there is no such function or variable as ‘inTopicLoop’. It is a property of the topic view data object. We will sort this before another Polls update.

MP Mr Papa
Mr Papa
Member

The check you will want is:

    if (!$spIsForum || !isset($spTopicView) || !$spTopicView->inPostLoop) {

but be sure to declare $spTopicView global at top of routine…

EL Elsa
Elsa
Member

Just saw your warning. Thanks, Brandon, and friends!

 

YS Yellow Swordfish
Yellow Swordfish
Member

Glad we are able to fix this up for you.

MY My
My
Member

I’m having this prob too.. fixed it using the suggested change

 

    if (!$spIsForum) {
DE Dre Erwin
Dre Erwin
Member

Tal said
I’m having this prob too.. fixed it using the suggested change

 

<br />
    if (!$spIsForum) {
<br />

where do i put this..I have not had polls work for weeks

YS Yellow Swordfish
Yellow Swordfish
Member

This is already in the latest release of the Polls plugin.

DE Dre Erwin
Dre Erwin
Member

i cant see polls anymore…says can only post polls in forum lol