Simple Machines Community Forum

SMF Development => Bug Reports => Fixed or Bogus Bugs => Topic started by: Bilgehan on December 03, 2009, 04:01:28 PM

Title: [4072]A poll can not be removed.
Post by: Bilgehan on December 03, 2009, 04:01:28 PM
Hello ;)

after upgrading from 1.1.10 to 1.1.11.

A poll can not be removed. It then appears the following error:

QuoteAn Error Has Occurred!
Session verification failed. Please try logging out and back in again, and then try again.
Title: Re: A poll can not be removed.
Post by: [SiNaN] on December 03, 2009, 04:13:54 PM
I can confirm this. Looks like a checkSession('get') is added to RemovePoll() function in Poll.php but the button 'url' in Display.template.php lacks session id.
Title: Re: A poll can not be removed.
Post by: NO CARRIER on December 06, 2009, 06:07:52 PM
Same here.
Title: Re: A poll can not be removed.
Post by: Dujma on December 07, 2009, 05:20:36 AM
I have this problem too. Is there any fix for this? I'v used search but only this topic appeared.
Title: Re: A poll can not be removed.
Post by: Norv on December 07, 2009, 07:53:38 AM
Please find in Display.template.php of the default theme, as well as from your theme currently used: (./Themes/default/Display.template.php, ./Themes/your_theme/Display.template.php)
Code (find) Select

'remove_poll' => array('test' => 'can_remove_poll', 'text' => 'poll_remove', 'image' => 'admin_remove_poll.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['poll_remove_warn'] . '\');"', 'url' => $scripturl . '?action=removepoll;topic=' . $context['current_topic'] . '.' . $context['start'] . "),

Code (replace) Select

'remove_poll' => array('test' => 'can_remove_poll', 'text' => 'poll_remove', 'image' => 'admin_remove_poll.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['poll_remove_warn'] . '\');"', 'url' => $scripturl . '?action=removepoll;topic=' . $context['current_topic'] . '.' . $context['start'] . ";sesc=" . $context['session_id']),
Title: Re: A poll can not be removed.
Post by: NO CARRIER on December 07, 2009, 08:11:25 AM
It works! Thanks!
Title: Re: [4072]A poll can not be removed.
Post by: Dujma on December 08, 2009, 02:22:43 AM
Tnx it works now.