Error 500 on categtories view
-
Drexel
- Phoca Newbie

- Posts: 7
- Joined: 16 Jun 2013, 11:27
Error 500 on categtories view
Hello everybody,
I have a problem with the categories view. When i configure a menu item with the categories view I get the following error: 500 - Layout „default_noimg“ not found!.
The URL looks like index.php?option=com_phocagallery&view=categories&Itemid=193
The category view with an URL like index.php?option=com_phocagallery&view=category&id=1&Itemid=193 works fine.
Do you have any idea where the problem might be?
Thank you in advance!
I have a problem with the categories view. When i configure a menu item with the categories view I get the following error: 500 - Layout „default_noimg“ not found!.
The URL looks like index.php?option=com_phocagallery&view=categories&Itemid=193
The category view with an URL like index.php?option=com_phocagallery&view=category&id=1&Itemid=193 works fine.
Do you have any idea where the problem might be?
Thank you in advance!
- Jan
- Phoca Hero

- Posts: 49144
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Error 500 on categtories view
Hi, try to check the Options of Phoca Gallery, see the "Categories View" part and try to set the options to default - check the legacy options too.
Does anybody do modifications to the code?
Jan
Does anybody do modifications to the code?
Jan
If you find Phoca extensions useful, please support the project
-
Drexel
- Phoca Newbie

- Posts: 7
- Joined: 16 Jun 2013, 11:27
Re: Error 500 on categtories view
Hi.
Sorry I haven't noticed your answer yet, because I didn't find the time yet to solve the problem, but now I did. I checked and tried also your mentioned options, but I never changed something there. And it also made no difference.
I debugged the problem and found 2 errors. I wonder that these errors are so obvious. If these really exist in that way, I can't imagine no one else has the problems. I suspected some kind of version mismatch due to a failed update, but I checked the files from the installer package, they seem to be correct.
So first problem:
File templates\my_template\html\com_phocagallery\categories\default.php
Original code line 35+
The code checks for a property $this->tmpl['displayimagecategories'] but in the object the property name is $this->tmpl['display_image_categories']
So i corrected the code
Sorry I haven't noticed your answer yet, because I didn't find the time yet to solve the problem, but now I did. I checked and tried also your mentioned options, but I never changed something there. And it also made no difference.
I debugged the problem and found 2 errors. I wonder that these errors are so obvious. If these really exist in that way, I can't imagine no one else has the problems. I suspected some kind of version mismatch due to a failed update, but I checked the files from the installer package, they seem to be correct.
So first problem:
File templates\my_template\html\com_phocagallery\categories\default.php
Original code line 35+
Code: Select all
if ($this->tmpl['displayimagecategories'] == 1) {
echo $this->loadTemplate('catimg');// TABLE LAYOUT - Categories and Images
} else if ($this->tmpl['displayimagecategories'] == 2){
echo $this->loadTemplate('catimgdetail');// DETAIL LAYOUT 2 (with columns)
} else if ($this->tmpl['displayimagecategories'] == 3){
echo $this->loadTemplate('catimgdetailfloat');// DETAIL LAYOUT 3 - FLOAT - Every categoy will float Categories, images and detail information (Float)
} else if ($this->tmpl['displayimagecategories'] == 4){
echo $this->loadTemplate('catimgdesc');// LAYOUT 4 (with columns) (easy categories, images and description)
} else if ($this->tmpl['displayimagecategories'] == 5){
echo $this->loadTemplate('custom');// LAYOUT 5 Custom - float
} else {
echo $this->loadTemplate('noimg');// UL LAYOUT - Categories Without Images
}
So i corrected the code
Code: Select all
if ($this->tmpl['display_image_categories'] == 1) {
echo $this->loadTemplate('catimg');// TABLE LAYOUT - Categories and Images
} else if ($this->tmpl['display_image_categories'] == 2){
echo $this->loadTemplate('catimgdetail');// DETAIL LAYOUT 2 (with columns)
} else if ($this->tmpl['display_image_categories'] == 3){
echo $this->loadTemplate('catimgdetailfloat');// DETAIL LAYOUT 3 - FLOAT - Every categoy will float Categories, images and detail information (Float)
} else if ($this->tmpl['display_image_categories'] == 4){
echo $this->loadTemplate('catimgdesc');// LAYOUT 4 (with columns) (easy categories, images and description)
} else if ($this->tmpl['display_image_categories'] == 5){
echo $this->loadTemplate('custom');// LAYOUT 5 Custom - float
} else {
echo $this->loadTemplate('noimg');// UL LAYOUT - Categories Without Images
}
-
Drexel
- Phoca Newbie

- Posts: 7
- Joined: 16 Jun 2013, 11:27
Re: Error 500 on categtories view
Second problem:
In file libraries\legacy\view\legacy.php the template engine searches for a file 'default_catimg.php' on line 647/650 in the template folder and in the component folder. I guess it shall be located in the component folder under components\com_phocagallery\views\categories\tmpl, but there is no such file, there is only a file 'default_obscatimg.php'. When I rename the file to 'default_catimg.php' it works.
Hope this helps for further analysis, if this is a common problem.
In file libraries\legacy\view\legacy.php the template engine searches for a file 'default_catimg.php' on line 647/650 in the template folder and in the component folder. I guess it shall be located in the component folder under components\com_phocagallery\views\categories\tmpl, but there is no such file, there is only a file 'default_obscatimg.php'. When I rename the file to 'default_catimg.php' it works.
Hope this helps for further analysis, if this is a common problem.
- Jan
- Phoca Hero

- Posts: 49144
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Error 500 on categtories view
Hi, the "default_obscatimg.php" is called when it is set in options.
The libraries\legacy\view\legacy.php is helper class, not ouput so it is located in libraries folder.
Jan
The libraries\legacy\view\legacy.php is helper class, not ouput so it is located in libraries folder.
Jan
If you find Phoca extensions useful, please support the project
-
Drexel
- Phoca Newbie

- Posts: 7
- Joined: 16 Jun 2013, 11:27
Re: Error 500 on categtories view
Hi!
Which option do you mean? Categories View - Legacy Settings->Displaying Style? No matter what I set up there, it is always looking for the files without 'obs' in the name... And when I set it to 'Not used' it looks for default_catimg.php....
Which option do you mean? Categories View - Legacy Settings->Displaying Style? No matter what I set up there, it is always looking for the files without 'obs' in the name... And when I set it to 'Not used' it looks for default_catimg.php....
- Jan
- Phoca Hero

- Posts: 49144
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Error 500 on categtories view
Hi, see the code in default.php:
This means that methods:
0,2,3,4,5 load "obs" views.
The parameter is called:
Displaying Style
EDIT:
But looking at your code, seems like we are speaking about different versions of Phoca Gallery? Are you using the latest version 4.1.2?
Code: Select all
switch($this->tmpl['display_image_categories']) {
case 0:
echo $this->loadTemplate('obs_catimgdetailtitleonly');
break;
case 2:
echo $this->loadTemplate('obs_catimgdetail');
break;
case 3:
echo $this->loadTemplate('obs_catimgdetailfloat');
break;
case 4:
echo $this->loadTemplate('obs_catimgdesc');
break;
case 5:
echo $this->loadTemplate('obs_custom');
break;
case 1:
default:
echo $this->loadTemplate('categories');
break;
}Code: Select all
<field name="display_image_categories" type="list" default="1" label="COM_PHOCAGALLERY_FIELD_DISPLAY_CATEGORIES_STYLE_LABEL" description="COM_PHOCAGALLERY_FIELD_DISPLAY_CATEGORIES_STYLE_DESC">
<option value="1">COM_PHOCAGALLERY_CATEGORIES_NOT_USED</option>
<option value="0">COM_PHOCAGALLERY_CATEGORIES_WITHOUT_IMAGES</option>
<option value="2">COM_PHOCAGALLERY_CATEGORIES_IMAGES_AND_DETAIL_INFORMATION</option>
<option value="3">COM_PHOCAGALLERY_CATEGORIES_IMAGES_AND_DETAIL_INFORMATION_FLOAT</option>
<option value="4">COM_PHOCAGALLERY_CATEGORIES_IMAGES_AND_DESCRIPTION_FLOAT</option>
<option value="5">COM_PHOCAGALLERY_CATEGORIES_CUSTOM</option>
</field>The parameter is called:
Displaying Style
Code: Select all
COM_PHOCAGALLERY_FIELD_DISPLAY_CATEGORIES_STYLE_DESC="Set style of displaying list of categories"
COM_PHOCAGALLERY_FIELD_DISPLAY_CATEGORIES_STYLE_LABEL="Displaying Style"EDIT:
But looking at your code, seems like we are speaking about different versions of Phoca Gallery? Are you using the latest version 4.1.2?
If you find Phoca extensions useful, please support the project
-
Drexel
- Phoca Newbie

- Posts: 7
- Joined: 16 Jun 2013, 11:27
Re: Error 500 on categtories view
Yes, it's definitley 4.1.2, I checked it.
And I tried these options, they don't load the obs files. I wonder why I have the wrong code.
And I tried these options, they don't load the obs files. I wonder why I have the wrong code.
- Jan
- Phoca Hero

- Posts: 49144
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Error 500 on categtories view
Hmm, really no idea, did you try to reinstall the gallery?
Jan
Jan
If you find Phoca extensions useful, please support the project
-
vanaveno
- Phoca Member

- Posts: 10
- Joined: 30 Jan 2012, 15:06
Re: Error 500 on categtories view
I have a same problem 500 - Layout default_noimg not found. I'am using joomla 3.4.1 and PG 4.1.2. How to fix this issues?
Thanks Vana
Thanks Vana