Anyone know why? How i can correct it? Thanks.
SOLVED Double Options Of Polls With The New Update
Subject: Double Options Of Polls With The New Update
With the new update I have doubled all survey options.
Anyone know why? How i can correct it? Thanks.

Anyone know why? How i can correct it? Thanks.
Subject: Re: Double Options Of Polls With The New Update
Hi Limun, I searched this table everywhere and can't find it. Where is it?
Subject: Re: Double Options Of Polls With The New Update
Maybe you didn't update properly... it could be tricky to fix this.
How many old polls do you have?
If you create a new poll, does it work properly?
How many old polls do you have?
If you create a new poll, does it work properly?
Subject: Re: Double Options Of Polls With The New Update
Last edited by spirit22 on Tue 07 May, 2013 19:30; edited 1 time in total
Hi guys.
Here is the ip_3poll_options
IMAGE DELETED
I have about 30 or 40 old polls.
When I create new works perfectly, The fail It's only with the old polls.
Here is the ip_3poll_options
IMAGE DELETED
I have about 30 or 40 old polls.
When I create new works perfectly, The fail It's only with the old polls.
Last edited by spirit22 on Tue 07 May, 2013 19:30; edited 1 time in total
Subject: Re: Double Options Of Polls With The New Update
I guess you simply have not done the DB checks (like I said in another thread)... ACP >> Database Maintenance.
Otherwise, have you tried edttng manually, one by one? (probably MG's next response :oops: )
Also.. yes MG, it was a messy install withmany repair tries.
Otherwise, have you tried edttng manually, one by one? (probably MG's next response :oops: )
Also.. yes MG, it was a messy install withmany repair tries.
Subject: Re: Double Options Of Polls With The New Update
It is very tough to fix now honestly... I think best solution is to remove old options manually.
The code to fix Polls is as follow, but it works only on old DB, it would mess up everything on IP 2.0.
The code to fix Polls is as follow, but it works only on old DB, it would mess up everything on IP 2.0.
##### POLL CONVERSION - BEGIN
# Table: 'phpbb_poll_options'
CREATE TABLE `phpbb_poll_options` (
poll_option_id tinyint(4) DEFAULT '0' NOT NULL,
topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
poll_option_text text NOT NULL,
poll_option_total mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
KEY poll_opt_id (poll_option_id),
KEY topic_id (topic_id)
);
# Table: 'phpbb_poll_votes'
CREATE TABLE `phpbb_poll_votes` (
topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
poll_option_id tinyint(4) DEFAULT '0' NOT NULL,
vote_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
vote_user_ip varchar(40) DEFAULT '' NOT NULL,
KEY topic_id (topic_id),
KEY vote_user_id (vote_user_id),
KEY vote_user_ip (vote_user_ip)
);
##ADD
ALTER TABLE `phpbb_topics` ADD `poll_title` varchar(255) DEFAULT '' NOT NULL AFTER `topic_type`;
ALTER TABLE `phpbb_topics` ADD `poll_start` int(11) UNSIGNED DEFAULT '0' NOT NULL AFTER `poll_title`;
ALTER TABLE `phpbb_topics` ADD `poll_length` int(11) UNSIGNED DEFAULT '0' NOT NULL AFTER `poll_start`;
ALTER TABLE `phpbb_topics` ADD `poll_max_options` tinyint(4) DEFAULT '1' NOT NULL AFTER `poll_length`;
ALTER TABLE `phpbb_topics` ADD `poll_last_vote` int(11) UNSIGNED DEFAULT '0' NOT NULL AFTER `poll_max_options`;
ALTER TABLE `phpbb_topics` ADD `poll_vote_change` tinyint(1) UNSIGNED DEFAULT '0' NOT NULL AFTER `poll_last_vote`;
UPDATE phpbb_topics t, phpbb_vote_desc vd
SET t.poll_title = vd.vote_text, t.poll_start = vd.vote_start, t.poll_length = vd.vote_length, t.poll_max_options = 1, t.poll_vote_change = 0
WHERE t.topic_vote = 1
AND vd.topic_id = t.topic_id;
INSERT INTO `phpbb_poll_options`
SELECT vr.vote_option_id, vd.topic_id, vr.vote_option_text, vr.vote_result
FROM `phpbb_vote_desc` vd, `phpbb_vote_results` vr
WHERE vr.vote_id = vd.vote_id
ORDER BY vd.topic_id ASC, vd.vote_id ASC, vr.vote_option_id ASC;
INSERT INTO `phpbb_poll_votes`
SELECT vd.topic_id, vv.vote_cast, vv.vote_user_id, vv.vote_user_ip
FROM `phpbb_vote_desc` vd, `phpbb_vote_voters` vv
WHERE vd.vote_id = vv.vote_id
ORDER BY vd.topic_id ASC, vv.vote_user_id ASC;
##REMOVE
ALTER TABLE `phpbb_topics` DROP `topic_vote`;
DROP TABLE `phpbb_vote_desc`;
DROP TABLE `phpbb_vote_results`;
DROP TABLE `phpbb_vote_voters`;
##### POLL CONVERSION - END
# Table: 'phpbb_poll_options'
CREATE TABLE `phpbb_poll_options` (
poll_option_id tinyint(4) DEFAULT '0' NOT NULL,
topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
poll_option_text text NOT NULL,
poll_option_total mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
KEY poll_opt_id (poll_option_id),
KEY topic_id (topic_id)
);
# Table: 'phpbb_poll_votes'
CREATE TABLE `phpbb_poll_votes` (
topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
poll_option_id tinyint(4) DEFAULT '0' NOT NULL,
vote_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
vote_user_ip varchar(40) DEFAULT '' NOT NULL,
KEY topic_id (topic_id),
KEY vote_user_id (vote_user_id),
KEY vote_user_ip (vote_user_ip)
);
##ADD
ALTER TABLE `phpbb_topics` ADD `poll_title` varchar(255) DEFAULT '' NOT NULL AFTER `topic_type`;
ALTER TABLE `phpbb_topics` ADD `poll_start` int(11) UNSIGNED DEFAULT '0' NOT NULL AFTER `poll_title`;
ALTER TABLE `phpbb_topics` ADD `poll_length` int(11) UNSIGNED DEFAULT '0' NOT NULL AFTER `poll_start`;
ALTER TABLE `phpbb_topics` ADD `poll_max_options` tinyint(4) DEFAULT '1' NOT NULL AFTER `poll_length`;
ALTER TABLE `phpbb_topics` ADD `poll_last_vote` int(11) UNSIGNED DEFAULT '0' NOT NULL AFTER `poll_max_options`;
ALTER TABLE `phpbb_topics` ADD `poll_vote_change` tinyint(1) UNSIGNED DEFAULT '0' NOT NULL AFTER `poll_last_vote`;
UPDATE phpbb_topics t, phpbb_vote_desc vd
SET t.poll_title = vd.vote_text, t.poll_start = vd.vote_start, t.poll_length = vd.vote_length, t.poll_max_options = 1, t.poll_vote_change = 0
WHERE t.topic_vote = 1
AND vd.topic_id = t.topic_id;
INSERT INTO `phpbb_poll_options`
SELECT vr.vote_option_id, vd.topic_id, vr.vote_option_text, vr.vote_result
FROM `phpbb_vote_desc` vd, `phpbb_vote_results` vr
WHERE vr.vote_id = vd.vote_id
ORDER BY vd.topic_id ASC, vd.vote_id ASC, vr.vote_option_id ASC;
INSERT INTO `phpbb_poll_votes`
SELECT vd.topic_id, vv.vote_cast, vv.vote_user_id, vv.vote_user_ip
FROM `phpbb_vote_desc` vd, `phpbb_vote_voters` vv
WHERE vd.vote_id = vv.vote_id
ORDER BY vd.topic_id ASC, vv.vote_user_id ASC;
##REMOVE
ALTER TABLE `phpbb_topics` DROP `topic_vote`;
DROP TABLE `phpbb_vote_desc`;
DROP TABLE `phpbb_vote_results`;
DROP TABLE `phpbb_vote_voters`;
##### POLL CONVERSION - END
Subject: Re: Double Options Of Polls With The New Update
Ok, no problem. I will remove the old options and put them back. Thanks guys.
Subject: Re: Double Options Of Polls With The New Update
Just remove the doubles, nothing to put back :wink:
Page 1 of 1
You cannot post new topicsYou cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events
This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by Icy Phoenix based on phpBB
Generation Time: 0.1414s (PHP: 14% SQL: 86%)
SQL queries: 11 - Debug Off - GZIP Enabled