Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: Tim on December 29, 2009, 09:33:22 AM

Title: Remove poll
Post by: Tim on December 29, 2009, 09:33:22 AM
Hi,

is anyone else having problems with removing polls from a topic in 1.1.11?

I get this error:
Session verification failed. Please try logging out and back in again, and then try again

Which I did, without success...
Title: Re: Remove poll
Post by: Arantor on December 29, 2009, 09:38:27 AM
As of 1.1.11, there was an additional session check added; your Display.template.php needs updating to include the session variable in the remove-poll link. It's done in the default theme.
Title: Re: Remove poll
Post by: smartmouse on January 05, 2010, 05:24:33 PM
Hi, i have the same problem:

Quote
An Error Has Occurred!
Session verification failed. Please try logging out and back in again, and then try again.

Please can you tell me what is the part of the code that i have to paste in Display.template.php of my theme?

Thank you.
Title: Re: Remove poll
Post by: smartmouse on January 07, 2010, 11:50:27 AM
Then? How to solve this problem?
Title: Re: Remove poll
Post by: smartmouse on January 08, 2010, 07:34:46 PM
Please fix it! It is a bug of SMF v1.1.11!
Title: Re: Remove poll
Post by: Arantor on January 08, 2010, 07:40:39 PM
No, it's a bug in your theme. You might want to ask the theme author about it.
Title: Re: Remove poll
Post by: smartmouse on January 10, 2010, 01:15:08 PM
Quote from: Arantor on January 08, 2010, 07:40:39 PM
No, it's a bug in your theme. You might want to ask the theme author about it.

Ok, i will. Thanks.
Title: Re: Remove poll
Post by: smartmouse on January 14, 2010, 01:32:32 AM
I posted there and they said that it's not a problem depending by custom theme neither default theme.
(see http://www.tinyportal.net/index.php?topic=12933.160)

Can you help me to try to understand what is the matter?
Title: Re: Remove poll
Post by: Arantor on January 14, 2010, 02:51:51 AM
So does it work on the default theme?
Title: Re: Remove poll
Post by: smartmouse on January 14, 2010, 07:06:42 AM
Quote from: Arantor on January 14, 2010, 02:51:51 AM
So does it work on the default theme?

No, i get the same error:
QuoteSession verification failed. Please try logging out and back in again, and then try again
Title: Re: Remove poll
Post by: smartmouse on January 15, 2010, 11:40:36 AM
What could be the problem?
Title: Re: Remove poll
Post by: Deviliciouz on January 17, 2010, 10:18:54 AM
I have the same problem and I'm using the default theme, please HELP!!!!!
Title: Re: Remove poll
Post by: Deviliciouz on January 17, 2010, 12:30:47 PM
By the way....I don't think it's a bug in the theme, I've just installed a brand new smf 1.1.11 , I don't use custom theme's (as I said before I'm using the default theme) and I've still got the problem. So it's a bug in SMF 1.1.11
Title: Re: Remove poll
Post by: smartmouse on January 17, 2010, 02:49:17 PM
Quote from: smartmouse on January 08, 2010, 07:34:46 PM
Please fix it! It is a bug of SMF v1.1.11!

Quote from: Arantor on January 08, 2010, 07:40:39 PM
No, it's a bug in your theme.

Someone does not think like us...
Title: Re: Remove poll
Post by: smartmouse on January 20, 2010, 07:29:55 PM
None has the solution to this bug?
Title: Re: Remove poll
Post by: mizuno151 on January 22, 2010, 03:52:08 PM
i've fixed it!!!

open Themes\default\Display.template.php

find this

'url' => $scripturl . '?action=removepoll;topic=' . $context['current_topic'] . '.' . $context['start']),

replace with

'url' => $scripturl . '?action=removepoll;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']),
Title: Re: Remove poll
Post by: smartmouse on January 22, 2010, 07:31:12 PM
It worked! Thank you very much!

@admins: Please mark this topic as solved!
Title: Re: Remove poll
Post by: JimM on January 22, 2010, 07:54:36 PM
Tim (http://www.simplemachines.org/community/index.php?action=profile;u=12) - were you able to use this suggestion and solve your issue?
Title: Re: Remove poll
Post by: Deviliciouz on January 23, 2010, 07:52:45 AM
@ mizuno151 : Thank You.... Thank You so much!!!!!!!!!!!!
Title: Re: Remove poll
Post by: JimM on January 25, 2010, 08:18:53 PM
Be sure and make this change on every theme that you use. 
Title: Re: Remove poll
Post by: romper on February 11, 2010, 02:41:15 PM
It should be solved with this but it isn't in my case...I tried manualy fixing it, and the diffrence is:
';sesc='...where I have ";sesc='... but if I try to change theme collapses?
Title: Re: Remove poll
Post by: JimM on February 11, 2010, 07:40:29 PM
You shouldn't have a double quote on that line.  Copy about 5 lines before and 5 lines after and post it here.
Title: Re: Remove poll
Post by: romper on February 12, 2010, 11:01:45 AM
Here it is from my default theme:

   'lock' => array('test' => 'can_lock', 'text' => empty($context['is_locked']) ? 'smf279' : 'smf280', 'image' => 'admin_lock.gif', 'lang' => true, 'url' => $scripturl . '?action=lock;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']),
      'sticky' => array('test' => 'can_sticky', 'text' => empty($context['is_sticky']) ? 'smf277' : 'smf278', 'image' => 'admin_sticky.gif', 'lang' => true, 'url' => $scripturl . '?action=sticky;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']),
      'merge' => array('test' => 'can_merge', 'text' => 'smf252', 'image' => 'merge.gif', 'lang' => true, 'url' => $scripturl . '?action=mergetopics;board=' . $context['current_board'] . '.0;from=' . $context['current_topic']),
      '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']),
      'calendar' => array('test' => 'calendar_post', 'text' => 'calendar37', 'image' => 'linktocal.gif', 'lang' => true, 'url' => $scripturl . '?action=post;calendar;msg=' . $context['topic_first_message'] . ';topic=' . $context['current_topic'] . '.0;sesc=' . $context['session_id']),
   );

   if ($context['can_remove_post'] && !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1)
      $mod_buttons[] = array('text' => 'quickmod_delete_selected', 'image' => 'delete_selected.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['quickmod_confirm'] . '\');" id="quickmodSubmit"', 'url' => 'javascript:document.quickModForm.submit();');
Title: Re: Remove poll
Post by: Matthew K. on February 12, 2010, 11:09:03 AM
My mod, Fix Session Verification for Polls (http://custom.simplemachines.org/mods/index.php?mod=2403) fixes this issue.
Title: Re: Remove poll
Post by: Caesarrrrr on February 12, 2010, 01:10:14 PM
I sometimes get this error when just logging out
Title: Re: Remove poll
Post by: romper on February 12, 2010, 01:46:44 PM
Quote from: Labradoodle-360 on February 12, 2010, 11:09:03 AM
My mod, Fix Session Verification for Polls (http://custom.simplemachines.org/mods/index.php?mod=2403) fixes this issue.

Tried, nothing changes either in default theme or others, then mannualy tried and can't move " or everyting collapses...strange and anoying problem.


....just realized where could be a problem...I have additional polls mod installed, could that be a reason?
Title: Re: Remove poll
Post by: Arantor on February 12, 2010, 05:34:47 PM
Yes, I don't think additional polls has been fully updated for 1.1.11.
Title: Re: Remove poll
Post by: JimM on February 12, 2010, 06:45:25 PM
Quote from: romper on February 12, 2010, 01:46:44 PM
....just realized where could be a problem...I have additional polls mod installed, could that be a reason?

That would probably be the issue.  You might check with the mod author to see if there are plans to update it for 1.1.11.
Title: Re: Remove poll
Post by: romper on February 12, 2010, 07:13:41 PM
And of course no uninstall option just delete of the mod....so I have to do it mannualy, but pretty confident that was the issue.
Title: Re: Remove poll
Post by: JimM on February 13, 2010, 12:14:21 PM
Yep, the uninstall option disappears when you upgrade the forum.  If this is solved, please mark it solved by clicking the Mark Topic Solved link at the bottom left.
Title: Re: Remove poll
Post by: Rehash D Internet on March 05, 2010, 07:06:09 PM
Hello there.

The code in the display.template of the theme I'm using is a little difference.

if ($context['can_remove_poll'])
$moderationButtons[] = '<a href="' . $scripturl . '?action=removepoll;topic=' . $context['current_topic'] . '.' . $context['start'] .'" onclick="return confirm(\'' . $txt['poll_remove_warn'] . '\');">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/admin_remove_poll.gif" alt="' . $txt['poll_remove'] . '" border="0" />' : $txt['poll_remove']) . '</a>';


Could you tailor your solution to fit this too please?

Appreciate your help.
Title: Re: Remove poll
Post by: Matthew K. on March 05, 2010, 07:13:36 PM
@Rehash D Internet - I have done this for you on my mods support topic.

Labradoodle-360
Title: Re: Remove poll
Post by: Sincere on September 23, 2010, 07:19:53 PM
Quote from: mizuno151 on January 22, 2010, 03:52:08 PM
i've fixed it!!!

open Themes\default\Display.template.php

find this

'url' => $scripturl . '?action=removepoll;topic=' . $context['current_topic'] . '.' . $context['start']),

replace with

'url' => $scripturl . '?action=removepoll;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']),

You are a star! it is people like you who make the difference.
Title: Re: Remove poll
Post by: JimM on September 25, 2010, 05:09:53 PM
This topic does contain the solution, thus I am marking it solved.
Title: Re: Remove poll
Post by: Sincere on September 25, 2010, 05:12:22 PM
Quote from: JimM on September 25, 2010, 05:09:53 PM
This topic does contain the solution, thus I am marking it solved.

indeed it does, and it is such an easy and fast solution. thank you for that.

Title: Re: Remove poll
Post by: BigMike on November 29, 2011, 12:22:42 PM
mizuno151: Thank you for this fix. Saved me a lot of time