plegall/Piwigo-community

Revision 2.9.a-beta (2017-06-26) does not allow upload from non-admin user

Closed this issue · 12 comments

Users can no longer upload photos using the community plugin following update of Piwigo and community plugin to latest version (2.9.1).  I have copied all the files from the distribution zip to the server using ftp, and deactivated all other plugins to no avail.  I have cleared the browser caches - tried Chrome, Firefox and Edge from windows 10, and from safari under el capitan on mac and ios10 - all the same result.

The user is left with the "Your browser doesn't have HTML5 support" text from the community javascript.

If I allow a user to be an administrator, the community plugin upload shows the html5 uploader after a short interval, overwriting the "Your browser doesn't have HTML5 support".

Piwigo version: 2.9.1
PHP version: 5.4.16
MySQL version: 5.5.52-MariaDB
Centos 7

Indeed, non-admin users are left with the "Your browser doesn't have HTML5 support" text.

OK, and another report (with slightly more details) on http://piwigo.org/forum/viewtopic.php?id=28187

I'm working on this issue, but I can't reproduce it :-/ I have installed a fresh Piwigo 2.9.1 + Community 2.9.a-beta but I have no problem to see the upload form and upload some photos with a non admin user.

Can you give me more details? What is the status of the user? Do you see anything in the web browser console (like a javascript error)?

When logged as non-admin, an error is indeed raised in the browser.
In the index.php file, I get this code in lines 532-534:

var sizeLimit = Math.round(62914560 / 1024); /* in KBytes */
var sumQueueFilesize = 0;
varr limit_storage = 52428800;     <<==== ERROR

When logged as admin, there is no error and the code does not contain the 3rd line :

var sizeLimit = Math.round(62914560 / 1024); /* in KBytes */
var sumQueueFilesize = 0;

Hope this helps.

I have the same invalid varr statement. I have done experiments and find it is caused by having a maximum byte limit on the user. Removing the limit removes the problem. I suppose administrators have no limit by definition, sort of.

I look forward to a fix.

Thanks,
Phil

Removing the limit removes the problem

Confirmed. I was getting the same "doesn't have HTML5 support" error for non-Admins and tried removing the limit too, after reading above. Now everyone can upload.

Not the ideal solution, but it's a solution I can at least move forward with for the time being! Thanks @Cadencia

Charlie

Is there any fix for this forthcoming? The problem is that line 183 of add_photos.tpl has a typo, what should be "var" is spelled "varr".

I've hacked my copy, but it would be nice to have it official.

Regards
Phil

Same issue with:

  • Piwigo 2.9.2 on Linux Debian 8
  • PHP: 5.6.30-0+deb8u1
  • MySQL: 5.5.57-0+deb8u1
  • ImageMagick 6.8.9-9

@Cadencia, which version of Piwigo do you use? Where is the add_photos.tpl file?

My site details on first item this thread, updated to 2.9.2 just now.

The file in error is .../piwigo/plugins/community/add_photos.tpl

(... is , on my system, /home/mydomainname/public_html)

Whoops. Didn't mean to close!

Thanks @Cadencia. I've fixed the typo in my Piwigo and that works well 👍
I realise that this issue has already been fixed in the master, see 9fb48fa.

@plegall , would it be possible to release an update of v2.9.a-beta?

Fixed by 9fb48fa