Announcement

  •  » Beta testing
  •  » 2.2.0RC3: Community plugin 2.2.d (upload link not available)

#1 2011-03-05 10:21:10

saber
Member
2011-02-15
32

2.2.0RC3: Community plugin 2.2.d (upload link not available)

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

 

#2 2011-03-05 21:32:34

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13786

Re: 2.2.0RC3: Community plugin 2.2.d (upload link not available)

I don't reproduce this bug :-/

Offline

 

#3 2011-03-06 17:14:59

T4d3o
Guest

Re: 2.2.0RC3: Community plugin 2.2.d (upload link not available)

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.

 

#4 2011-03-07 15:13:54

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13786

Re: 2.2.0RC3: Community plugin 2.2.d (upload link not available)

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

 

#5 2011-03-07 15:57:25

T4d3o
Guest

Re: 2.2.0RC3: Community plugin 2.2.d (upload link not available)

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.

 

#6 2011-03-07 20:50:44

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13786

Re: 2.2.0RC3: Community plugin 2.2.d (upload link not available)

Please test new version 2.2.e, I have made several changes on conditions to display the "Upload your photos" link.

Offline

 

#7 2011-03-07 22:29:13

T4d3o
Member
2011-03-07
3

Re: 2.2.0RC3: Community plugin 2.2.d (upload link not available)

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

 

#8 2011-03-07 22:31:14

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13786

Re: 2.2.0RC3: Community plugin 2.2.d (upload link not available)

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

 

#9 2011-03-07 22:48:30

T4d3o
Member
2011-03-07
3

Re: 2.2.0RC3: Community plugin 2.2.d (upload link not available)

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

 

#10 2011-03-09 11:07:53

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13786

Re: 2.2.0RC3: Community plugin 2.2.d (upload link not available)

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:

Code:

  if (isset($_SESSION['community_user_permissions']))

by

Code:

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

 

#11 2011-03-09 13:47:51

Paul
Guest

Re: 2.2.0RC3: Community plugin 2.2.d (upload link not available)

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!

 

#12 2011-03-09 13:49:48

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13786

Re: 2.2.0RC3: Community plugin 2.2.d (upload link not available)

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

 

#13 2011-03-09 14:26:32

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13786

Re: 2.2.0RC3: Community plugin 2.2.d (upload link not available)

I just released Community version 2.2.f, I hope it fixes the missing upload link!

Offline

 

#14 2011-03-09 15:58:23

T4d3o
Member
2011-03-07
3

Re: 2.2.0RC3: Community plugin 2.2.d (upload link not available)

Works perfect thank you very much.

Offline

 

#15 2011-03-09 18:07:08

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13786

Re: 2.2.0RC3: Community plugin 2.2.d (upload link not available)

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

 
  •  » Beta testing
  •  » 2.2.0RC3: Community plugin 2.2.d (upload link not available)

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact