News:

SMF 2.1.6 has been released! Take it for a spin! Read more.

Main Menu

Problem with large poll

Started by _Ziggy_, December 13, 2009, 03:02:02 PM

Previous topic - Next topic

_Ziggy_

I have a new forum running on RC2.
I have stumbled upon a problem with this poll: http://www.bluesforum.com/blues/index.php?topic=144.0
From the moment we have added option 129 the options get mixed up when new titles are added.

The problem seems to effect only the options from 129 and higher. Numbers 1 to 128 don't get mixed up.
Today we have added 137 to 141 but options 129 to 135 got deleted.

I have added all the options again, one by one, and now it seems ok.
Bluesforum.com   2.0                     Bluesforum.nl   2.0
Rockabilly-forum.com   2.0              Bluesharp.nl   2.0
Bungalowpark-forum.nl   2.0        Eee pad forum   2.01
Cristiano Ronaldo   2.02              Lockout Tagout   2.02


Looking to buy existing forums, send pm.

Arantor

Hmm, I'm not sure it's entirely designed to have that many options at once - it has a physical maximum of 255, and I know that in some circumstances there could be issues as you go over halfway (i.e. 127) but I've never actually seen them in practice :S
Holder of controversial views, all of which my own.


_Ziggy_

I have noticed this problem on my 1.1.11 forum as well, so it is not a typical 2.0 bug.

It seems that if you a multiple options to a large poll, sometimes the options get mixed up.
For instance: in this poll http://www.bluesforum.nl/smf/index.php?topic=500.0 I added no's 101, 102, 103 at once. Option 101 was in the right place, but options 102 and 103 ended up on 81 and 82.

If you ad new options one by one, there's no problem.
Bluesforum.com   2.0                     Bluesforum.nl   2.0
Rockabilly-forum.com   2.0              Bluesharp.nl   2.0
Bungalowpark-forum.nl   2.0        Eee pad forum   2.01
Cristiano Ronaldo   2.02              Lockout Tagout   2.02


Looking to buy existing forums, send pm.

Norv

So it seems rather related to adding later a few more options at once... But only for large polls, most likely - which are very rare afaics, I haven't seen this problem reported anywhere else as yet.
Will try to replicate it as well.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

_Ziggy_

What worries me is what happens if I upgrade the 1.1.11 forum to 2.0. Will the polls get messed up during the database upgrade?

Bluesforum.com   2.0                     Bluesforum.nl   2.0
Rockabilly-forum.com   2.0              Bluesharp.nl   2.0
Bungalowpark-forum.nl   2.0        Eee pad forum   2.01
Cristiano Ronaldo   2.02              Lockout Tagout   2.02


Looking to buy existing forums, send pm.

Norv

No, the data should be preserved, of course.

However, it is ALWAYS necessary to make a good backup (and verify it) before upgrading. Specially of the database, or even the entire forum. That way if anything happens, you can always restore the working backup.
Also, you could if you wish, install a test SMF 1.1.x, restore the database backup in it, make it work (you need to run repair_settings on the test installation after restoring the backup), then upgrade it. You'll see for yourself how it goes, without affecting the live site...
I'd recommend a local test installation, even (on localhost), if you could take the time to have the necessary for it to work (see Vertrigo on google).
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

emanuele

Partially related added an error if more than 256 options are added (0 to 255), I managed to replicate the error after I deleted some options: adding new ones will mix the sorting of the table and that will results in a form similar to:
<li>
<label for="options-245" >Option 240</label>:
<input type="text" name="options[245]" id="options-245" value="456" class="input_text" size="80" maxlength="255" /> (0 votes)
</li>
<li>
<label for="options-244" >Option 241</label>:
<input type="text" name="options[244]" id="options-244" value="qwe" class="input_text" size="80" maxlength="255" /> (0 votes)
</li>
<li>
<label for="options-243" >Option 242</label>:
<input type="text" name="options[243]" id="options-243" value="753" class="input_text" size="80" maxlength="255" /> (0 votes)
</li>
<li>
<label for="options-242" >Option 243</label>:
<input type="text" name="options[242]" id="options-242" value="159" class="input_text" size="80" maxlength="255" /> (0 votes)
</li>
<li>
<label for="options-241" >Option 244</label>:
<input type="text" name="options[241]" id="options-241" value="789" class="input_text" size="80" maxlength="255" /> (0 votes)
</li>
<li>
<label for="options-246" >Option 245</label>:
<input type="text" name="options[246]" id="options-246" value="789" class="input_text" size="80" maxlength="255" /> (0 votes)
</li>
<li>
<label for="options-247" >Option 246</label>:
<input type="text" name="options[247]" id="options-247" value="" class="input_text" size="80" maxlength="255" />
</li>


and these are the new options added by the javascript:
<li>
<label for="options-247" >Option 247</label>:
<input type="text" name="options[246]" id="options-246" value="" size="80" maxlength="255" class="input_text" />
</li>
<li>
<label for="options-248" >Option 248</label>:
<input type="text" name="options[247]" id="options-247" value="" size="80" maxlength="255" class="input_text" />
</li>
<li>
<label for="options-249" >Option 249</label>:
<input type="text" name="options[248]" id="options-248" value="" size="80" maxlength="255" class="input_text" />
</li>


See the overlapping in the names?

Does it make sense an ALTER TABLE {db_prefix}poll_choices
ORDER BY id_poll, id_choice
after any edit of any poll?


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Advertisement: