Fatal error: Cannot redeclare class ContentHelper

  • pclg
  • Autore della discussione
  • Offline
  • Nuovo Utente
  • Nuovo Utente
Di più
12 Anni 11 Mesi fa - 12 Anni 11 Mesi fa #287 da 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.
Ultima Modifica 12 Anni 11 Mesi fa da pclg.

Si prega Accesso o Crea un account a partecipare alla conversazione.

  • pclg
  • Autore della discussione
  • Offline
  • Nuovo Utente
  • Nuovo Utente
Di più
12 Anni 11 Mesi fa #290 da 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... ?

Si prega Accesso o Crea un account a partecipare alla conversazione.

Di più
12 Anni 11 Mesi fa - 12 Anni 11 Mesi fa #291 da 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.
Ultima Modifica 12 Anni 11 Mesi fa da andrea_4g. Motivo: spelling

Si prega Accesso o Crea un account a partecipare alla conversazione.

Di più
12 Anni 11 Mesi fa #321 da 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

Si prega Accesso o Crea un account a partecipare alla conversazione.

  • pclg
  • Autore della discussione
  • Offline
  • Nuovo Utente
  • Nuovo Utente
Di più
12 Anni 11 Mesi fa #327 da 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...

Si prega Accesso o Crea un account a partecipare alla conversazione.

Di più
12 Anni 11 Mesi fa #331 da 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).

Si prega Accesso o Crea un account a partecipare alla conversazione.

Tempo creazione pagina: 0.172 secondi