Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Getting "Unknown column 'poll' in 'field list'" error whenever Polls plugin is active
Avatar
Helping Outreach
Member
Free Members
sp_UserOfflineSmall Offline
Sep 29, 2016 - 5:26 pm

Whenever I have the "Polls" plugin activated, every user gets an "Access denied - you do not have permission to view this page" error. I also get the little fading warning box about "Invalid Database Query" up top. Disabling the plugin makes the error go away.

I found the following entry in the error log:

file: /home/myusername/public_html/wp-content/plugins/simple-press/forum/content/classes/sp-topic-view-class.php
line: 236
function: select
error: Unknown column 'poll' in 'field list'

SELECT SQL_CALC_FOUND_ROWS group_id, wp_sftopics.topic_id, wp_sftopics.forum_id, topic_name, topic_slug, topic_status, topic_pinned, topic_icon, topic_opened, wp_sftopics.post_count, forum_name, forum_slug, forum_status, forum_disabled, forum_rss_private, wp_sfposts.post_id, post_date, wp_sfposts.user_id, wp_sftopics.user_id AS topic_starter, guest_name, guest_email, post_status, post_pinned, post_index, post_edit, poster_ip, source, post_content, NULL AS new_post, polls, poll, expire_date FROM wp_sftopics JOIN wp_sfposts ON wp_sftopics.topic_id=wp_sfposts.topic_id JOIN wp_sfforums ON wp_sftopics.forum_id=wp_sfforums.forum_id WHERE wp_sftopics.topic_id=7079 ORDER BY post_pinned DESC, wp_sfposts.post_id ASC LIMIT 0, 20

I have the latest version of both: SimplePress is 5.7.1 and Polls is 1.6.1.

I did, however, recently upgrade WordPress and SimpleForum through several generations to get them up to date; perhaps a database table wasn't updated correctly along the way.

Thank you for any help!

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Sep 29, 2016 - 9:44 pm

not sure what would be up with the permission message as the polls plugin does not have anything to do with page access... quite odd...

as to the db error, yes it seems that you are missing at least one column in your database... can you check your database, the wp_sfforums table and verify if you have a polls column or not?

have you done anything with polls yet?  if not easiest way to try to fix is to uninstall the plugin (on forum - plugins - plugin list) and then activate again...  this will remove any polls data so if you have existing data, you may not want to do this...

lets fix that, then come back to the permission message...

Avatar
Helping Outreach
Member
Free Members
sp_UserOfflineSmall Offline
Oct 3, 2016 - 9:25 am

Thank you. The "poll" field was missing from the sf_posts database. Somehow when I restored data during my migration, it didn't include this field. I restored it manually in phpmyadmin and now it works again.

(I wonder why this field wasn't recreated when I deactivated, then deleted and reactivated the plugin. It might be smart to add a check to the plugin to make sure the field is there and add it if not.)

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Oct 3, 2016 - 11:09 am

It should have. Puzzling. But good that you have corrected the probpem OK

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626