Could not see Phoca Gallery as normal visitor

Phoca Gallery - image gallery extension
New-Bee
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 05 Jun 2016, 20:38

Could not see Phoca Gallery as normal visitor

Post by New-Bee »

Hello comunity,
first of all i hope that my englisch is not so bad and someone can help me.
I worked with Joomla 2.5 and Phoca Gallery and after support is run out now i tried Joomla 3.5.1 with Phoca Gallery 4.3.0 on my own pc with xampp.
Everything works fine while installing phoca gallery. I created one user for loading up Images on Login-Front-Panel.
Logged in, created Category named "Bilder" and created subcategory for example 2016-brunch; 2016-football.....and so on.
Uploaded the images in these categories and everything looks good while the user named "pictureuploading" is logged in.
I can also see the list of categories by clicking this with the menu button.
When i log out and looking the website as a normal visitor i cannot see the categories by using the link from the menu button.
Tried some things to fix it and looked up for right configuration on my Joomla and Phocagallery Backend. Everything looks good.

Found by myself now a workaround, but not happy with it because it`s complicated for me.

1. create subcategory and upload images from login-frontpanel by user "pictureuploading" is loged in.
2. Logout from frontpanel and login as superuser in backend.
3. Goto Component - PhocaGallery - Categories
4. pick up the subcategorie for example 2016-football and change the Option "higher category" Bilder into "choose category"
5. click save
6. error occured 3 times with following notice :
Notice: Array to string conversion in C:\xampp\htdocs\joomla351\administrator\components\com_phocagallery\models\fields\phocausers.php on line 23
7. change back the higher category option "choose category" back to category Bilder and save
8. And unbelieveble >> I can see the category 2016-football in frontend as normal user ( no login ) by clicking the Phocagallery category link in menu.

The only thing i did was updating the \components\com_phocagallery\phocagallery.php with the line
phocagalleryimport('phocagallery.image.image');
that i found here in this forum as a workaroung for could not create categories.

So i checked the line 23 from phocausers.php and found the line :
$userId = (string) $this->form->getValue($this->element['name']);
but i didn`t know this because i do not programming.
Searched different posts about this error notice, but didn`d find anything that can help me to solve this problem.
Maybe someone can help me.
Thank you.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Could not see Phoca Gallery as normal visitor

Post by Jan »

Hi, thank you for the info. I am planning to add new parameters to the Phoca Gallery in next version where you will be able to select which "access rights" should the uploaded image/category have (when upload in frontend).

The error, try to download this file:
https://www.phoca.cz/forumfiles/phocausers.zip

and copy it to folder:
administrator\components\com_phocagallery\models\fields\
so it overwrites the phocausers.php file.

This should fix the problem.

Jan
If you find Phoca extensions useful, please support the project
New-Bee
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 05 Jun 2016, 20:38

Re: Could not see Phoca Gallery as normal visitor

Post by New-Bee »

Hello Jan,
thanks for the fast support.
i override the phocauser.php file with the one that you posted here but now i can´t see the
subcategory anyway. Also my own "decided" workaround doens`t work anymore and i can`t see
the pictures at normal user anyway. When i try my own workaround now i get the following notice.


Fehler
Speichern fehlgeschlagen! Fehler:
Ausgewählte Benutzer (Inhaber) kann nur einer Hauptkategorie zugeordnet werden
Benutzer ist zugeordnet zu: Bilder

Can i install another Joomla with Pocagallery and take the old phocauser.php again and override yours ?
I didn`t make a copy of original before i updated the file.

Greetings New-Bee
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Could not see Phoca Gallery as normal visitor

Post by Jan »

Hi, the error: yes, the user can be assigned as owner to only one category (main category), if he is assigned to "Bilder" he cannot be assigned to another category.
Yes, in the ZIP installation file, there is the old phocauser.php file, so you can use it.

Jan
If you find Phoca extensions useful, please support the project
New-Bee
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 05 Jun 2016, 20:38

Re: Could not see Phoca Gallery as normal visitor

Post by New-Bee »

Hi again,
ok i try to fix it back to my old "workaround". With this one it work not good, but it works.
Well, the organisation is really the same as in old version of Phoca gallery with joomla 2.5.xx.
The user is asigned to category "Bilder" and for example subcategory "2016-football" is filled with 20 pictures.
As a normal visitor in old ( and active ) version on server with joomla 2.5.xx it works.
On my home pc with offline installation xampp and joomla 3.5.1 it didn`t work.
Maybe there is a problem with different PHP version ?
I also tried to remove Phoca Gallery and install it new, but didn`t fix the problem.
Is there a way to "clean up" Phoca Gallery installation completly to my joomla installation and try to start a new install ?
I found here in board something like this but it is for older version.

Greetings, :( and thanks for help and support.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Could not see Phoca Gallery as normal visitor

Post by Jan »

If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Could not see Phoca Gallery as normal visitor

Post by Jan »

If you find Phoca extensions useful, please support the project
Post Reply