phpony Posted December 28, 2020 Posted December 28, 2020 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.
bfarber Posted December 28, 2020 Posted December 28, 2020 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).
phpony Posted December 28, 2020 Author Posted December 28, 2020 (edited) 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, 2020 by phpony
Stuart Silvester Posted December 28, 2020 Posted December 28, 2020 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.
Recommended Posts