Shape 5

General Category => General Talk/Questions/Comments => : Actlas January 18, 2013, 04:17:40 AM



: Only "head" part of template loaded - Joomfish
: Actlas January 18, 2013, 04:17:40 AM
Everything is fine but once I install joomfish 2.5 only the part <jdoc:include type="head"> is loaded of shape5 templates such as "construction" and "corporate response" which results in only one a piece of the top of the site being loaded.

Any ideas? The Photofolio siteshaper template on the other hand seems to work ok.


: Re: Only "head" part of template loaded - Joomfish
: mikek January 18, 2013, 08:30:14 AM
Hello,

That would be an issue with the Joomfish component, it sounds like it's altering the default layout of the template. A template can't control the functions of another extension.


: Re: Only "head" part of template loaded - Joomfish
: Actlas January 19, 2013, 07:09:26 AM
I understand it could be due to joomfish but it works with the photofolio template and joomfish should be pretty stable now.

The error I get is:
Fatal error: Cannot redeclare class JMenuSite in C:\xampp\htdocs\construction-ss\includes\menu.php on line 136


: Re: Only "head" part of template loaded - Joomfish
: Actlas January 19, 2013, 07:38:10 AM
https://github.com/JoomFish/jf-future/issues/101  -->

I found out this is an error that can only be fixed on shape5 side, they have hardcoded file includes everywhere (joomla has a loader for this purpose).

Actuall error is in templates/corporate_response/vertex/s5flex_menu/helpers.php, line 41 >

change

$path = $info->path.'/includes/menu.php';
if (file_exists($path)) {
require_once $path;
// Create a JPathway object
$classname  = 'JMenu'.ucfirst($client);

to

$path = $info->path.'/includes/menu.php';
$classname  = 'JMenu'.ucfirst($client);
if (file_exists($path)) {
if (!class_exists($classname)){
     require_once $path;
}
// Create a JPathway object

Could you please check your coding? This change fixes it indeed.


: Re: Only "head" part of template loaded - Joomfish
: mikek January 19, 2013, 08:56:26 AM
Hello,

The re-written function isn't doing anything different other than an extra if statement, which isn't necessary. The statement is simply calling menu.php a very common practice in Joomlal extensions. This is not a bug in our product, we have no other members reporting any other issues of this kind. As a suggestion if you are using Joomla 1.7 or higher I would simply use the default language manager that comes with Joomla, it does the same thing as Joomfish and it's native to he CMS.


: Re: Only "head" part of template loaded - Joomfish
: Actlas January 19, 2013, 01:31:06 PM
I already posted that someone reports the same error here: https://github.com/JoomFish/jf-future/issues/101
We are using Joomla 2.5.8 but Joomfish is much easier to maintain in our opinion and others think so too.

It seems the added statement fixes the template.
A different ambiguous error still shows up with the shape5 templates after that change though.
-->
https://github.com/JoomFish/jf-future/issues/126#issuecomment-12457012

It doesn't occur with the default beez2 template...

Perhaps you would know how one can fix this?


: Re: Only "head" part of template loaded - Joomfish
: Actlas January 20, 2013, 06:57:11 AM
I would suggest shape5 moderators take a look at the issue.

The JoomFish people already helped me out and I modified the shape5 code a little bit.

You can find the topic here: https://github.com/JoomFish/jf-future/issues/126