Link to home
Create AccountLog in
Avatar of Rowby Goren
Rowby GorenFlag for United States of America

asked on

Any way to fix "Cannot redeclare class" fatal error?

Hi

I am using a third party tempate and for one of the supporting php files I get an error that I am hoping has an easy fix.

I have contacted the developer of the template but thought I'd try experts exchange in the meantime.

Here's the page that will give the fatal error:

http://www.christopherhillsalon.com/blog

Click on just about any link in the blog, such as "Continue reading" in the bottom right area.

You'll go to a page that has this error:

Fatal error: Cannot redeclare class JView in /home/public_html/plugins/system/jat3/core/joomla/view.php on line 694

Attached is a copy of view.php that is referenced in the above error.

Any thoughts to fix this issue?

Thanks

Rowby
view.php
ASKER CERTIFIED SOLUTION
Avatar of CyberGhost
CyberGhost
Flag of Czechia image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Rowby Goren

ASKER

Hi All

I am following this thread and am sending the various comments to the developer(s).  


HI 10023,

I was hoping adding that ending php tag would do the trick :)

But it didn't do it.  

Here's how I added it -- snippet from the end.

		default :
				$filename = strtolower($parts['name']).'.php';
				break;
		}
		return $filename;
	}
}
?>

Open in new window

Avatar of 10023
10023

:).....Before you run the script again make sure you clear your browser cache...you could be seeing
the same page before the edit...depending on how your cache is configured.
Hi 10023

I cleared the cache and also tried another browser, unfortunately still resulting with the error.

I have left the closing php tag in the file for now.  

For what it's worth, here are some links I found.

A thread on the joomla forum that may or may not be about this specific issue:
http://forum.joomla.org/viewtopic.php?p=1383283

And also this about the joomla view api
http://api.joomla.org/Joomla-Framework/Application/JView.html

I also found another thread by doing a google search on jview -- but it was a link to this Experts-exchange question.   Google sure indexes fast when it comes to experts exchange!

I don't expect (but cross my fingers) that a solution will appear on this thread.  It's probably up to the developers of joomla's K2 component / or JoomlaArt who created the template.  I have this question there too, along with snippets from all of the comments on this thread.

I'll give this a couple more days and then I'll be splitting the points.

Rowby
Thanks all,

I sent all your comments to the developer of the script and he was able to fix it.

Rowby