Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted December 28, 20204 yr The progress bar for multiple image uploader accepts only integer values, otherwise it displays NaN instead of current progress and scale is always at 0%. But gallery upload script returns float value as current step. If you upload 4 pics, everything will be fine - 25%, 50%, 75%, 100%. But if you upload 3 pics: 33.3333% => NaN, 66.6666% => NaN, 100%. To fix this I've changed a line it \applications\gallery\modules\front\gallery\submit.php line 877: return array( ++$offset, \IPS\Member::loggedIn()->language()->addToStack('processing'), 100 / ( \IPS\Request::i()->totalImages ?: $offset ) * $offset ); To: return array( ++$offset, \IPS\Member::loggedIn()->language()->addToStack('processing'), intval(100 / ( \IPS\Request::i()->totalImages ?: $offset ) * $offset) ); And now uploader shows correct progress for any number of pics.
December 28, 20204 yr I'm not seeing this issue. When I upload 3 images I get 33.33%, 66.66% and then it finishes (we round to two decimal places).
December 28, 20204 yr Author Hmmm. Maybe this is specific to this Russian language pack here: Russian language for Invision Community - Translations - Invision Community I'll look further. Edited December 28, 20204 yr by phpony
December 28, 20204 yr 26 minutes ago, phpony said: Hmmm. Maybe this is specific to this Russian language pack here: Russian language for Invision Community - Translations - Invision Community I'll look further. Yes your thinking is on the right track, I encountered this a few weeks ago, it's specific to locales that use a comma for the decimal separator. It should be fixed in 4.5.5.