On Joomla 1.7.x with gantry I just tried to add a Gallery Tree module in a sidebox Module position.
As soon as it is enable, I get the following errors and a blank page :
Debug Strict (PHP 5): /solstice/modules/mod_phocagallery_tree/mod_phocagallery_tree.php line 134 - Non-static method JSite::getMenu() should not be called statically
Debug Strict (PHP 5): /solstice/modules/mod_phocagallery_tree/mod_phocagallery_tree.php line 134 - Only variables should be assigned by reference
Compile Error: /solstice/modules/mod_phocadownload_tree/mod_phocadownload_tree.php line 124 - Cannot redeclare categorytree() (previously declared in /my_path/modules/mod_phocagallery_tree/mod_phocagallery_tree.php:121)
I have downloaded and installed version 3.1.1 but strangely when I checked for updates I notice that the version for 1.6/1.7 is 3.1.0 ??
https://www.phoca.cz/version/index.php?p ... lery=3.1.1
Any suggestions gratefully appreciated
B. Rgds
John
Cannot redeclare categorytree
- Jan
- Phoca Hero

- Posts: 49149
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Cannot redeclare categorytree
Hi, you should disable displaying of strict warnings in php settings (search this forum to get information why it is not possible to make all features of Joomla! or Phoca Code to fit strict warnings)
Jan
Jan
If you find Phoca extensions useful, please support the project
-
reetp
- Phoca Newbie

- Posts: 8
- Joined: 24 Aug 2010, 15:28
Re: Cannot redeclare categorytree
Hi Jan,
thanks for the reply.
The odd thing is that php.ini is set as follows :
error_reporting = E_WARNING & ~E_NOTICE
display_errors = On
So strict is disabled as far as I can see.....
Any thoughts ?
B. Rgds
John
thanks for the reply.
The odd thing is that php.ini is set as follows :
error_reporting = E_WARNING & ~E_NOTICE
display_errors = On
So strict is disabled as far as I can see.....
Any thoughts ?
B. Rgds
John
-
reetp
- Phoca Newbie

- Posts: 8
- Joined: 24 Aug 2010, 15:28
Re: Cannot redeclare categorytree
Sorry - I think I misled you about the module - it should mod_phocagallery_tree_v3.0.1.zip
It should display a tree of the categories in a block.
Have tried setting display_errors = off but that makes no difference.
I'd be grateful for any other suggestions !
B. Rgds
John
PS - Phoca Download tree works fine.......
It should display a tree of the categories in a block.
Have tried setting display_errors = off but that makes no difference.
I'd be grateful for any other suggestions !
B. Rgds
John
PS - Phoca Download tree works fine.......
-
reetp
- Phoca Newbie

- Posts: 8
- Joined: 24 Aug 2010, 15:28
Re: Cannot redeclare categorytree
Just tried disabling Downloads and enabling Gallery and it then works fine.
it would seem that you cannot run them both in a side box at the same time.
This is the giveaway when I thought about it.
Compile Error: /solstice/modules/mod_phocadownload_tree/mod_phocadownload_tree.php line 124 - Cannot redeclare categorytree() (previously declared in /my_path/modules/mod_phocagallery_tree/mod_phocagallery_tree.php:121)
This function is duplicated :
Not sure what the answer is, but this is the problem.
B. Rgds
John
it would seem that you cannot run them both in a side box at the same time.
This is the giveaway when I thought about it.
Compile Error: /solstice/modules/mod_phocadownload_tree/mod_phocadownload_tree.php line 124 - Cannot redeclare categorytree() (previously declared in /my_path/modules/mod_phocagallery_tree/mod_phocagallery_tree.php:121)
This function is duplicated :
Code: Select all
// Create category tree
function categoryTree( $data, $tree, $id=0, $text='', $treeId ) {
foreach ( $data as $value ) {
if ($value->parentid == $id) {
$link = JRoute::_(PhocaGalleryRoute::getCategoryRoute($value->id, $value->alias));
$showText = $text . ''.$treeId.'.add('.$value->id.','.$value->parentid.',\''.addslashes($value->text).'\',\''.$link.'\');'."\n";
$tree[$value->id] = $showText;
$tree = categoryTree($data, $tree, $value->id, '', $treeId);
}
}
return($tree);
}B. Rgds
John
- Jan
- Phoca Hero

- Posts: 49149
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Cannot redeclare categorytree
Hi, I will take a look at it.
Jan
Jan
If you find Phoca extensions useful, please support the project
- Jan
- Phoca Hero

- Posts: 49149
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Cannot redeclare categorytree
Fixed in 3.1.2
https://www.phoca.cz/download/category/9 ... ree-module
https://www.phoca.cz/download/category/9 ... ree-module
If you find Phoca extensions useful, please support the project
-
francesco.r
- Phoca Newbie

- Posts: 1
- Joined: 16 Feb 2013, 01:37
Re: Cannot redeclare categorytree
Hi, I'm having a similar error using the vm category module. (version 1.0.0)
If I publish two instances I get the following error and the page stops processing
Any help? Thank you
If I publish two instances I get the following error and the page stops processing
Code: Select all
Fatal error: Cannot redeclare PhocaVmCategoryTree() (previously declared in /web/htdocs/www.[website].com/home/modules/mod_phoca_vm_category/mod_phoca_vm_category.php:34) in /web/htdocs/www.[website].com/home/modules/mod_phoca_vm_category/mod_phoca_vm_category.php on line 155- Jan
- Phoca Hero

- Posts: 49149
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Cannot redeclare categorytree
Hi, this is only one instance module.
Jan
Jan
If you find Phoca extensions useful, please support the project