View Full Version : Poll voters being displayed after import
Todi
Mon 4th Apr '05, 11:49am
My polls are behaving strangely. I've imported a bunch of posts and polls from phpBB (where afaik there is no option to display who voted in them) and now a few names here and there are automatically displayed when you View poll results. Not all of them, only one here, or 2 or 3 there, out of hundreds. I can't figure out why they're showing up. Is it an importer bug, or is it natural?
Preferably, i wouldn't want those imported polls to display who voted in them at all. What do i need to do to make that happen? (edit the sql tables i'm guessing)
Steve Machol
Mon 4th Apr '05, 4:10pm
Moved to Import forum so Jerrry sees this.
Try running this query:
DELETE FROM pollvote WHERE votedate='0';
Backup your database first!
Todi
Mon 4th Apr '05, 5:01pm
What would that do exactly? I'm a bit hesitant to make big changes to the database, since it was a bother to get it over to the host (no ssh/telnet access). I'll see about testing it in a test enviroment thou.
In the meantime, i've included a screenshot since i'm bad at explaining exactly how it looks. Let me know if i need to fill out a ticket or something.
Steve Machol
Mon 4th Apr '05, 5:02pm
To run queries from the Admin CP:
Admin CP -> Import & Maintenance -> Execute SQL Query -> Manual Query
Then enter your query in the Manual Query box and click on 'Continue'.
To run queries you first need to give yourself permission to run queries in the Admin CP. To do this, edit this section of config.php:
// ****** USERS WITH QUERY RUNNING PERMISSIONS ******
// The users specified here will be allowed to run queries from the control panel.
// See the above entries for more information on the format.
// Please note that the ability to run queries is quite powerful. You may wish
// to remove all user IDs from this list for security reasons.
$canrunqueries = 'x';
...with x being your userid number.
Todi
Mon 4th Apr '05, 7:50pm
Heh, was that an automated response? I know how to do a query, i'm hesitant to do it without knowing the ramifications thou, but thanks for the instructions ;)
Steve Machol
Mon 4th Apr '05, 7:57pm
Sorry - just trying to help. I'll remember this in the future.
If you are concerned, then make a backup of the database firrst.
Todi
Tue 5th Apr '05, 3:41am
No worries Steve, i appreciate you trying to help me. I had a look at the polls in my test environment, where i first imported the database.. strange thing is, everything looks fine there, no users being displayed in the polls. It's gonna take some time to transfer the database backup from the live environment to the test one, but could this possibly be a problem related to this one http://www.vbulletin.com/forum/showthread.php?t=135082 ?
I'm gonna try reloading all the styles and everything, see if that makes a difference.
Jerry
Tue 5th Apr '05, 3:50am
Also down load the latest impex because this only got sorted a few days ago :
http://www.vbulletin.com/forum/bugs.php?do=view&bugid=3125
Todi
Tue 5th Apr '05, 4:03am
Ok, interesting. I used ImpEx "Revision: 1.66" downloaded on the 29th of march, which i guess was just a day or so before the fix, since the newest version appears to be 1.67. Now, what i'd like to know is if running the sql query mentioned or some other sql query can fix the problem, since my users have already started posting again, and i really don't want to start over again.
Jerry
Tue 5th Apr '05, 6:09am
The bug fixed was with the polls.
The voters that were attached to the polls were assigned with their importuserid and not their userid.
To redo it, you could rerun the import polls module, that would clean out all the imported polls and voters and reattach the users correctly, though you would loose and votes on thoses polls since the import.
To be 100% sure, I'd delete all the polls and votes, then reimport. That way there will be no data floating about that shouldn't be there, i.e. votes from incorrect userid's.
Todi
Tue 5th Apr '05, 6:36am
Ah you can run the poll importer without running the rest of them, didn't think of that. Ok, so how do i go around deleting the polls first then, without loosing anything else, do i just clean out the poll / pollvote tables completely?
Jerry
Tue 5th Apr '05, 5:56pm
First thing is back up your database.
Yes truncate (empty) the poll and pollvote table, then re-run the import poll module with the new impex code.
Todi
Wed 6th Apr '05, 6:49am
Impex says (after running the new poll importer) 94 imported, 2 failed (none failed last time). Also, by comparing the test environment where i did the fresh import with the live one, it appears that everyone who posted AFTER the import has their nickname displayed. After some testing, this seems to be natural behaviour, since all imported polls are set to "public", i.e display voters. So, this wasn't a bug. But since the importer was bugged before, i guess it was just as well to reimport them, even if 2 polls failed (do those still exists as normal threads or what happens?)
Jerry
Wed 6th Apr '05, 3:06pm
(do those still exists as normal threads or what happens?)
Polls can fail on 2 stages, either the thread that the poll was supposioed to be attached to couldn't be found, i.e. it was deleted or the voters couldn't be attached to the poll.
Todi
Wed 6th Apr '05, 3:32pm
Hmm. I hadn't changed anything else with that database since the last attempt. But with the new import script, it failed. Any way i can tell which of those two stages it failed at, and why it would fail now and not before? (It could be a good sign of course, if it's supposed to fail)
Would a possible reason for the failure be that i had deleted the thread while on phpBB, but that it doesn't delete the poll data when you delete the poll?
Jerry
Wed 6th Apr '05, 3:49pm
a possible reason for the failure be that i had deleted the thread while on phpBB, but that it doesn't delete the poll data when you delete the poll?
That would do it.
The error should be displayed when importing the polls during the module, i.e. there will be some red text next to the error return.
Though it may go past quicky.
Powered by vBulletin™ Version 4.0.0 Beta 4 Copyright © 2009 vBulletin Solutions, Inc. All rights