Message
  • EU e-Privacy Directive

    This website uses cookies to manage authentication, navigation, and other functions. By using our website, you agree that we can place these types of cookies on your device.

    View Privacy Policy

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Fatal error: Cannot redeclare class ContentHelper

Fatal error: Cannot redeclare class ContentHelper 10 years 5 months ago #287

  • pclg
  • pclg's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
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: 10 years 5 months ago by pclg.
The administrator has disabled public write access.

Re: Fatal error: Cannot redeclare class ContentHelper 10 years 5 months ago #290

  • pclg
  • pclg's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
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... ?
The administrator has disabled public write access.

Re: Fatal error: Cannot redeclare class ContentHelper 10 years 5 months ago #291

  • andrea_4g
  • andrea_4g's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1122
  • Thank you received: 163
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: 10 years 5 months ago by andrea_4g. Reason: spelling
The administrator has disabled public write access.

Re: Fatal error: Cannot redeclare class ContentHelper 10 years 5 months ago #321

  • andrea_4g
  • andrea_4g's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1122
  • Thank you received: 163
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
The administrator has disabled public write access.

Re: Fatal error: Cannot redeclare class ContentHelper 10 years 5 months ago #327

  • pclg
  • pclg's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
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...
The administrator has disabled public write access.

Re: Fatal error: Cannot redeclare class ContentHelper 10 years 5 months ago #331

  • andrea_4g
  • andrea_4g's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1122
  • Thank you received: 163
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).
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 0.049 seconds