Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

CBQuery field cbDatabase error

8 years 9 months ago #276139 by soportemarketing
CBQuery field cbDatabase error was created by soportemarketing
Hello:

We've just installed CBPro in Joomla 3.4.8 and CBQueryField. Trying to connect to a external DB, we get this message:

Fatal error: Class 'cbDatabase' not found in /home/XXX/XXX/components/com_comprofiler/plugin/user/plug_cbqueryfield/cbqueryfield.php on line 70

We first thought that it was because something in the query text, but have tried everything and can not solve it.

Thanks.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48464
  • Thanks: 8280
  • Karma: 1443
8 years 9 months ago #276166 by krileon
Replied by krileon on topic CBQuery field cbDatabase error
Seams to be working fine in all my tests.

We've just installed CBPro

What do you mean by CB Pro? Did you install the CB Quickstart Pro package? As it is out of date and is not CB 2.x. Please ensure you're site is running CB 2.x and if not please upgrade as needed. If you are using CB 2.x then please ensure you've latest nightly found below.

www.joomlapolis.com/downloads/doc_details/640-community-builder-nightly-build

If still not working try making the below change.

IN: components/com_comprofiler/plugin/user/plug_cbqueryfield/cbqueryfield.php
ON: Line 70
FROM:
Code:
$_SQL_database = new cbDatabase( $_J_database );
TO:
Code:
cbimport( 'cb.database' ); $_SQL_database = new cbDatabase( $_J_database );


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.

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

8 years 9 months ago #276171 by soportemarketing
Replied by soportemarketing on topic CBQuery field cbDatabase error
Hello Kyle:

I have installed CB 2.0.12 Latest nigthly Dec,24th 2015, and cbQueryfield plugin 4.0.5. Now I've changed the line 70 in cbqueryfield.php as you say, but I get the same error.

Fatal error: Class 'cbDatabase' not found in /home/centrosnmf/pruebascursosfemxaesnueva/components/com_comprofiler/plugin/user/plug_cbqueryfield/cbqueryfield.php on line 70

Internal Joomla DB SQL query Works, I only get the error trying to connect to External DB.

Thanks.

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

8 years 9 months ago #276182 by soportemarketing
Replied by soportemarketing on topic CBQuery field cbDatabase error
I'm trying to connect to a external MSSQL DB. I've analyzed the cbQueryField and default driver is mysqli. I don'n know whether I can configure the driver as 'mssql'. I've modified it in cbqueryfield.php to try, and then error changes to:

Catchable fatal error: Object of
class CB\Database\Table\FieldTable could not be converted to string in /home/xxxx/xxx/components/com_comprofiler/plugin/user/plug_cbqueryfield/cbqueryfield.php on line 306

is it possible to configure cbQueryfield to get data from MSSQL?

Thanks again.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48464
  • Thanks: 8280
  • Karma: 1443
8 years 9 months ago #276187 by krileon
Replied by krileon on topic CBQuery field cbDatabase error
It uses the driver that Joomla is configured with. Your issue is it's not finding the class cbDatabase, which is used to construct a custom database object. I've no idea why this isn't working for you. The import placed above it with my above reply forces the file to load. Try the below import usage.

FROM:
Code:
cbimport( 'cb.database' );
TO:
Code:
cbimport( 'cb.html' );


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.

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

Moderators: beatnantkrileon
Powered by Kunena Forum