On 2.2.0RC3, using Community plugin 2.2.d 'Upload Photos' link doesn't appear if I set permissions for 'a specific user' or for 'all registered users'. In my case it only appears when I set permissions for 'any visitor'.
Last edited by saber (2011-03-05 10:22:03)
Offline
I don't reproduce this bug :-/
Offline
I can reproduce the bug.
1º Clean installation of piwigo-2.2.0RC3.zip
2º Install & activate Community plugin from administration panel. (2.2.d)
3º Register an user.
4º Login as Administrator and create a rule to Registered users can upload photos.
5º Go to gallery and link appear and you can upload photos.
6º Logout and login as administrator and link does not appear and if you try to go this link http://localhost/piwigo/index.php?/add_photos you get this error:
Piwigo encountered a non recoverable error
[mysql error 1064] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 3
SELECT id,name,uppercats,global_rank
FROM piwigo_categories
WHERE id IN ()
;
#1 my_error /var/www/localhost/htdocs/dolomia/piwigo/include/dblayer/functions_mysql.inc.php(88)
#2 pwg_query /var/www/localhost/htdocs/dolomia/piwigo/include/functions_category.inc.php(347)
#3 display_select_cat_wrapper /var/www/localhost/htdocs/dolomia/piwigo/plugins/community/add_photos.php(258)
#4 include /var/www/localhost/htdocs/dolomia/piwigo/plugins/community/main.inc.php(116)
#5 community_index ()
#6 call_user_func_array /var/www/localhost/htdocs/dolomia/piwigo/include/functions_plugins.inc.php(161)
#7 trigger_action /var/www/localhost/htdocs/dolomia/piwigo/index.php(300)
7º You go to administrative panel and delete the rule created and go to the gallery another time and upload link appears and works fine.
8º Sorry my english.
T4d3o wrote:
I can reproduce the bug.
This is not the same bug I think.
If there is no album in the gallery, you can only see the link if you have set the permission to "the whole gallery". This is a bug, I will fix it.
Offline
I had forgotten to comment on that, there is an album with a picture inside, plus also I have a user with all privileges enabled and does not see the link, if I try to go through the link that I posted before I get the same error.
Please test new version 2.2.e, I have made several changes on conditions to display the "Upload your photos" link.
Offline
Same error.
I tried all the permission options with the same result. What most intrigues me is the fact that the administrator user only see the link to upload photos when you add or delete a rule, if you log off and log on the link does not appear.
It only works with the rule for any visitor.
Offline
You can't have the "same error" with Community 2.2.e. I mean the "WHERE id IN ()" error. I've modified this code so that it never happens :-/
Offline
At the same mistake I meant that the link still does not appear, indeed if I try to go directly to me http://localhost/piwigo/index.php?/add_photos redirected to the home page.
Last edited by T4d3o (2011-03-07 22:49:00)
Offline
There is a problem with the cache I implemented I suppose. Can you make the following test? modify plugins/community/include/functions_community.inc.php, line 33, replace:
if (isset($_SESSION['community_user_permissions']))
by
if (false)
and tell me if it work any better.
I confirm I reproduce the "admin don't see the upload link" just after the update from Community 2.2.d to 2.2.e
Offline
Hi!
I had the same problem, I couldn't see the "upload photos" link for any "who?" besides "all visitors".
Actually I posted a question about it earlier on the Extensions section, but now I found this post.
I made the change you suggested and now it works. Is this a secure solution, or you are going to do some changes?
Paul
ps: this application rocks!
Paul wrote:
I made the change you suggested and now it works. Is this a secure solution, or you are going to do some changes?
I've been working on the problem the past hours. The problem is real : there are several issues with the cache system. I make the last tests and I publish a new version of the Community plugin.
Offline
I just released Community version 2.2.f, I hope it fixes the missing upload link!
Offline
Works perfect thank you very much.
Offline
T4d3o wrote:
Works perfect thank you very much.
Great to read that, fixing the bug was a bit tricky, thank you for your feedback, I would never have found it by myself.
Offline