Skip to Content Skip to Menu

[SOLVED] Fatal error: Cannot redeclare class CBProfileView_html_default

  • carin
  • carin
  • OFFLINE
  • Posts: 417
  • Thanks: 18
  • Karma: 0
9 years 10 months ago - 9 years 10 months ago #255039 by carin
As usual when applying a non default value CB collapses in great fashion ...

I made a copy of the default profile template, installed it via the plugins and set it in the config. Now accessing a users profile gives the ultimate failure.

I couldn't find any tutorial on google for doing my own template so I guess there is none.

CB 2.0
Last edit: 9 years 10 months ago by krileon.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48495
  • Thanks: 8284
  • Karma: 1443
9 years 10 months ago #255094 by krileon

As usual when applying a non default value CB collapses in great fashion ...

You do not need to include such a negative reply in every post of yours. Being so quick to be negative is detrimental to the community and the morale of those involved. Please stop being so quick to judge. We're here to help; that's the purpose of support. Your issue has nothing to do with CB doing anything wrong. Your issue is just standard PHP (you have 2 classes with the same name).

I made a copy of the default profile template, installed it via the plugins and set it in the config. Now accessing a users profile gives the ultimate failure.

Copying and installing the default does not work as you end up with duplicate classes, plugin elements, and plugin files. The XML filename as well as the name and element in the XML file must be changed. Once done the class names need to be changed in the PHP file. So you'd have the following for example.

XML Filename: example.xml
XML Name: <name>Example</name>
XML Element: <filename plugin="example">example.php</filename>
PHP Filename: example.php
PHP Classname: class CBProfileView_html_example extends cbProfileView

The PHP class names all need to be adjusted in your new example.php as exampled above.

I couldn't find any tutorial on google for doing my own template so I guess there is none.

Nick has provided a template override tutorial. Video and example installable template plugin included. I do not recommend using a template that is not override usage as your PHP file could quickly go out of date with new releases of CB. Using the override template you can override the default templates CSS with your own styling, but still allow everything to inherit correctly so you don't risk your template going out of date and missing fixes/features.

www.joomlapolis.com/forum/6-news-and-publicity/227459-cb-203-template-css-overrides


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: beat, carin

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

  • carin
  • carin
  • OFFLINE
  • Posts: 417
  • Thanks: 18
  • Karma: 0
9 years 10 months ago - 9 years 10 months ago #255108 by carin

You do not need to include such a negative reply in every post of yours.

ur right, I try ;) but it is not that easy when that thing explodes after every turn, but I try to keep it to myself ...

I thought I renamed all those files but obviously I messed one.

Thanks for the link, strange that this didnt come up on google. Now the overrides make sense, thanks.

CB 2.0
Last edit: 9 years 10 months ago by carin.
The following user(s) said Thank You: beat, krileon

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

Moderators: beatnantkrileon
Powered by Kunena Forum