Support

Support is part of Event Gallery Extended.

Please get a subscription if you need support. Feel free to use the ticket system or the contact form for reporting defects or pre-sale questions. Make sure you're logged in in order to be able to create a new ticket.

For general information you can also jump to the manual.

Subscribe now!

#959 Fatal error: Cannot redeclare class JLayout in home/administrator/components/com_eventgallery/helpers/legacy_layout.php on line 20

Posted in ‘Event Gallery - General’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by sbluege on Wednesday, 27 August 2014 18:30 UTC

nick2011
hi
I just downloaded your nice component, and I tried to install it on a J 2.5.24 website.
However if I click on Components - EventGallery , I receive the following error

Fatal error: Cannot redeclare class JLayout in home/administrator/components/com_eventgallery/helpers/legacy_layout.php on line 20

I googled before writing but found no help

Any suggestion?

Thanks

sbluege
Joomla 2.5 does not declare JLayout itself. Event Gallery defines it in order to prevent code duplication for supporting J3 and j2.5. So the question is where the initial declaration is coming from. Please do a full text search over all PHP files for JLayout in your webroot folder. This should solve this riddle.

nick2011
Hi
Yes, indeed, the Fabrik component declares this class as well.

sbluege
Can you imagine why this component is active while Event Gallery is getting displayed? Where exactly did you found this other file?

sbluege
Not sure where this conflict is coming from. But to shortcut this you can try to patch the Event Gallery files.

  1. Open the folder /administrator/components/com_eventgallery/helpers
  2. empty the file legacy_base.php
  3. if you get the next error message, check the other 4 files prefixed with 'legacy_' and empty it too.


Keep in mind that this patch will stop working if you uninstall Fabrik.

nick2011
Hi
I have already tried that before seeing your reply.
Emptying the files solves the problem.
However, I would put an "IF" clause in EG, to see if that method is already instanced.


Having said that, it works but it slows down the whole site.
I love your component, but I need to have more time to check all this details with you.

Thanks for your help so far.

sbluege
Adding an "IF" is not necessary. But however you're solving this, it will not have any influence on the sites performance. Especially in case of this particular file since it's only active in the back end and only if Event Gallery shows up. It will not "slows down the whole site".

I suggest to check the active plugins. I suspect some magic class loading plugins there...

Since this is a public ticket: plugins which are unrelated to Event Gallery! ;-)

nick2011
I 'll certainly try your wonderful component on another website.
I will install it first. On a standard template.
Thanks

sbluege
Sounds good :)