-
AuthorPosts
-
March 14, 2013 at 2:10 pm #185843
I see others are reporting this problem also, but here is my specific issue.
On a clean install of JA Mero quickstart, I added Akeeba Subscriptions to restrict access to paid content. When attempting to view subscriptions on the front end, I immediately got a ‘ Fatal error – cannot redeclare class JViewLegacy’.
After sending the error to Akeeba, Nick responded with
Most likely a third party extension developer does something completely stupid, like using JLoader::load() instead of JLoader::import() which ends up “poisoning the well” for everyone else. … I would suggest isolating the affected third party extension which is badly written and contact its developer for an immediate fix. Do note that MANY extensions will be affected in the not-so-distant future. Any extension which is trying to be compatible with both Joomla! 2.5 and 3.0 will be affected by this issue as the only way to achieve such single-package compatibility with both major Joomla! versions is using the J*Legacy classes (JControllerLegacy, JModelLegacy, JViewLegacy).
Digging around in the T3V3 I see that in ‘pluginssystemt3includesjoomla30viewlegacy.php’ the JViewLegacy code is completely rewritten (not overridden and imported) so that is what is probably causing this issue.
I’ve attached a screenshot of the stack trace.
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
March 15, 2013 at 10:07 am #486606I would need to take a closer look at your site. Please pm me url, admin access and ftp account, I shall check it for you
March 16, 2013 at 2:59 pm #486696lol.. that is the typical answer from JA. How about writing Joomla standard code?? Clearly if you create a class with the same name as a Joomla core class, it will create a conflict if it is used without the Joomla framework import.
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
March 18, 2013 at 6:47 am #486809:(( yes, we have been overridden JViewLegacy class on JAT3 framework but we could not face error on your mention that for reason i would like to check this problem on your site and help you out of it.
If you see i can help you fix this problem on your site please don’t hesitate contacting to us.
March 18, 2013 at 1:21 pm #486882There is nothing to see on my site. I had to hack the code in the Akeeba Subscriptions component to check to see if the JViewLegacy class was already loaded. That is the only way I was able to get my site functioning.
Nick of course didn’t like that idea as anytime he updates his framework code, my hack will be overwritten. He is using the framework in the documented way, the problem is that T3 overrides the core Joomla class so any other component that uses the framework in the documented way will have the same problem.
Its silly to have to go and hack any other components to have them compatible with the T3 framework.
If you want to test this on your own, then get Akeeba Subscriptions (its free) install it and configure a subscription for a user. Go to the front end of the website and you will get the Fatal Error.
AuthorPostsViewing 5 posts - 1 through 5 (of 5 total)This topic contains 5 replies, has 2 voices, and was last updated by mrroyce 11 years, 8 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Fatal error – cannot redeclare class JViewLegacy
Viewing 5 posts - 1 through 5 (of 5 total)