Fatal error: Cannot redeclare class ContentHelper

More
12 years 3 months ago - 12 years 3 months ago #287 by pclg
Hello,

I use CP 1.98 since months and it work perfectly.
I just bought CP 2.0 and install it without problems... on my Joomla 1.5

And when i try to access to a list of articles, by the search module or by cliking on a properties (e.g in the cloud)... I have this error :

Fatal error: Cannot redeclare class ContentHelperRoute in ....../components/com_content/helpers/route.php on line 30

Can you help me ?
Thanks.
Last edit: 12 years 3 months ago by pclg.

Please Log in or Create an account to join the conversation.

More
12 years 3 months ago #290 by pclg
I have removed "JLoader::import('components.com_content.helpers.route',JPATH_BASE);"
in components/com_customproperties/views/show/view.html.php
and it's working.

But i'm not sure that solution is good... ?

Please Log in or Create an account to join the conversation.

More
12 years 3 months ago - 12 years 3 months ago #291 by andrea_4g
Good job!
You had us in trouble trying to figure out where the strange error your reported came from.

That particular line of code you removed has been there for quite a long time(2+ years, at least). As you discovered, the component works just as fine without it - I guess because such a common joomla helper (route) gets loaded somewhere else.

My opinion is that that line of code has become redundant. We are carrying out several tests under different conditions to make sure we can safely remove that line for good.
Last edit: 12 years 3 months ago by andrea_4g. Reason: spelling

Please Log in or Create an account to join the conversation.

More
12 years 3 months ago #321 by andrea_4g
Apparently removing such line is not a good idea. You can get away with it, if the route helper has been already loaded or if SEF is disabled, thou.

Anyway 'JLoader::import' should take care not to load the same library twice, but for some reasons in your installation it fails to do so. Could you please let us know PHP and Joomla version you are using?

Thanks

Please Log in or Create an account to join the conversation.

More
12 years 3 months ago #327 by pclg
I use Joomla 1.5.23 and PHP 5.2.17

And, I have also disabled SEF for Custom Properties... because it not work correctly with CB Subs (Joomlapolis)...
On my website, introduction of the articles are free but a paid subscription is required to read full article (after the 'read more' separation of Joomla) and, with SEF, CP uses a wrong url and allows full access for all articles...

Please Log in or Create an account to join the conversation.

More
12 years 3 months ago #331 by andrea_4g
Thanks for the reply.

About Cp + CB subs.
I believe something is not configured properly. I don't know about CB subs, but if typing url can retrieve the supposedly protected article, well, you recognize that there's a problem. The article should not be readable unless an authorized user is positively recognized.

On a related note: you can configure Custom Properties to search and return intros for non public articles (see Search result access: param).

Please Log in or Create an account to join the conversation.

Time to create page: 0.173 seconds