0 Joomla\CMS\Table\Table::getDatabase(): Return Value Must Be Of Type Joomla\Database\DatabaseInterface, EasyBlogDbJoomla Returned - Question | JoomShaper
SP Page Builder 6 is Here! Learn More →

0 Joomla\CMS\Table\Table::getDatabase(): Return Value Must Be Of Type Joomla\Database\DatabaseInterface, EasyBlogDbJoomla Returned

RL

Rami Louke

General 6 days ago

Hi. I am having issues with my business site, as I am getting this error message in the administrator default view: 0 Joomla\CMS\Table\Table::getDatabase(): Return value must be of type Joomla\Database\DatabaseInterface, EasyBlogDbJoomla returned

I see it is mentioning EasyBlog, but there was some kind of related issue (?) with SP Page builder when googling? Any help or ideas? I just updated to Joomla 5.4.0 and problems started. I can not navigate in the administration area, and site is not working properly.

0
16 Answers
Toufiq
Toufiq
Accepted Answer
Senior Staff 6 days ago #206958

Hi there,

Thank you for reaching out. To check the issue from our end, please create a staging site and share its login credentials with us. Make sure you provide only the staging site details, not the live site access. This is important because if any issue occurs while we’re working, it will affect only the staging site, not the live one. We want to maintain full transparency between the user and our support team.

Note: Disable Easyblog extension then check again and make sure you are using latest version of Page builder.

Best regards,

Toufiqur Rahman (Team Lead, Support)

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 6 days ago #206965

Maybe you're using outdated EasyBlog, they don't make updates so often.

As @Toufiq said, disable EasyBlog (component and all plugins) and recheck site.

If the error will gone, please contact with Stack Ideas Support. It's a premium product.


If you cannot got into admin area, you have to disable EasyBlog extension by file folder rename or by PHPMyAdmin database manager.

as I see error message is directly from EasyBlog table.

0
RL
Rami Louke
Accepted Answer
6 days ago #206967

Hi guys. I can't get to the administration at all, so I can not disable anything at the moment. Trying to create a staging site. Basically everything has been up-to-date with this site, meaning Joomla was the only thing I had to update today.

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 6 days ago #206970

So you have two options:

  1. Recover site from backup. If you don't have it, your Hosting provider has it.
  2. Hire Expert who you can deal with EasyBlog problem, or at least tell you exactly what is wrong, if your EasyBlog subscription already ended.
0
RL
Rami Louke
Accepted Answer
6 days ago #206974

Yes, thanks Paul. Trying to get ftp-credentials from the hosting provider as I don't have those at the moment. Also contacted EasyBlog-dudes, but they are offline at the moment. Maybe we will get there like solution-wise.

I can get to PhpMyadmin, but I have no idea what to do there. There are so many easyblog_ tables.

0
R
Richard
Accepted Answer
5 days ago #207068

I have exactly the same error, i did have admin access though and disabled Easyblog totally but it made no difference, updated all extensions, still the same error so restored to backup. Awaiting a result here hopefully!

0
CF
Carlos Fdez
Accepted Answer
5 days ago #207069

I have exactly the same error, and it occurred right after updating Joomla to version 5.4.0. It seems that a new update from StackIdeas is missing or not yet released.

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 5 days ago #207070

What EasyBlog support responed, have you created a ticket there? If not, please create here >> stackideas.com/forums

as I saw their forum is active now. We are not EB support.

0
R
Richard
Accepted Answer
5 days ago #207071

yep im on it

0
CF
Carlos Fdez
Accepted Answer
5 days ago #207076

I’ve just created a new ticket on StackIdeas: https://stackideas.com/forums/page-broken-after-updating-to-joomla-5-4-0

Maybe if more people comment there, they will hurry up with the solution.

0
RL
Rami Louke
Accepted Answer
5 days ago #207087

Hey! I made a staging site and using ftp I renamed easyblog-folders from ../components and ..administrator/components to something else. Now my site works, but I can not use EasyBlog. Or if I try to install it again, it goes into neverending loop. I haven't heard anything from StackIdeas, left a ticket yesterday.

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 5 days ago #207090

Installing old/current version of EB will not help.

Guys, focus you attention on stackideas forum.

0
RL
Rami Louke
Accepted Answer
5 days ago #207104

Yes, just made a comment, that others can find usefull. Gonna continue with StackIdeas forum.

0
CF
Carlos Fdez
Accepted Answer
5 days ago #207162

I’ve finally repaired my website, including EB (with ChatGPT). It was using a lot of code that’s no longer allowed in Joomla 5. Here’s a step-by-step guide I’ve put together. 🧩 Fixing EasyBlog on Joomla 5 — Complete Technical Guide

Problem: After upgrading Joomla 4 → 5, the EasyBlog component throws fatal errors such as:

Compile Error: Cannot redeclare EasyBlogDbCompat::query() TypeError: Table::getDatabase() must return DatabaseInterface, EasyBlogDbCompat returned Call to undefined method Joomla\Database\Mysqli\MysqliDriver::nameQuote() Call to undefined method Joomla\Database\Mysqli\MysqliDriver::getErrorNum() A query must be a string or QueryInterface, array given

These happen because EasyBlog versions prior to Joomla 5 compatibility still use legacy database helpers that are no longer supported in J5.

🧰 Environment

Joomla 5.x

EasyBlog ≤ 6.0.x

PHP 8.1–8.3

Linux host with SSH or file access (PuTTY / Visual Studio Code)

🧾 1. Identify the root cause Why it breaks

Joomla 5 completely removed its old JDatabase layer. EasyBlog still calls methods such as:

$db = new EasyBlogDbJoomla(); $db->query(); $db->getErrorNum(); $db->getErrorMsg(); $db->stderr(); $db->nameQuote();

Those no longer exist under the new Joomla\Database namespace.

🧩 2. Fix the EasyBlog database driver

File: administrator/components/com_easyblog/includes/easyblog.php

Before: $db = new EasyBlogDbJoomla();

After: use Joomla\CMS\Factory; use Joomla\Database\DatabaseInterface;

if (version_compare(JVERSION, '5.0', '>=')) { // Use Joomla 5 native database driver $db = Factory::getContainer()->get(DatabaseInterface::class); } else { // Fallback for older Joomla versions $db = new EasyBlogDbJoomla(); }

This ensures EasyBlog retrieves the native J5 database connection.

🧮 3. Replace removed database methods

Search recursively inside EasyBlog:

cd /path/to/joomla/root grep -Rni -- "getErrorNum" administrator/components/com_easyblog components/com_easyblog grep -Rni -- "getErrorMsg" administrator/components/com_easyblog components/com_easyblog grep -Rni -- "stderr" administrator/components/com_easyblog components/com_easyblog grep -Rni -- "nameQuote" administrator/components/com_easyblog components/com_easyblog grep -Rni -- "loadResultArray" administrator/components/com_easyblog components/com_easyblog

Replace each legacy call as follows:

Legacy call (old) Modern replacement (Joomla 5) $db->query(); $db->setQuery($sql)->execute(); $db->nameQuote($col); $db->quoteName($col); $rows = $db->loadResultArray(); $rows = $db->loadColumn(); if ($db->getErrorNum() > 0) use a try { ... } catch (\RuntimeException $e) block $db->stderr() / $db->getErrorMsg() $e->getMessage() inside catch

Example fix:

try { $db->setQuery($query); $result = $db->loadObjectList(); } catch (\RuntimeException $e) { throw EB::exception($e->getMessage(), $e->getCode() ?: 500); }

🧠 4. Remove or rename duplicated methods

If you see:

Cannot redeclare EasyBlogDbCompat::query()

open administrator/components/com_easyblog/includes/easyblog.php and delete or comment out the duplicate public function query($sql) definition.

Joomla 5 drivers already provide query() via the native API.

⚙️ 5. Fix array queries

Some old code built queries as arrays:

$query = []; $query[] = 'SELECT * FROM ...'; $query[] = 'WHERE ...'; $db->setQuery($query); // ❌ Fatal in J5

Fix:

if (is_array($query)) { $query = implode(' ', $query); } $db->setQuery($query); $rows = $db->loadObjectList();

🧼 6. Clear Joomla caches

After every change:

rm -rf administrator/cache/ rm -rf cache/

Then reload the front-end and admin side.

🧪 7. Verify component and plugins

Re-enable all EasyBlog plugins (System → Manage → Plugins → EasyBlog *).

Check blog front-end (index.php?option=com_easyblog).

Check back-end dashboard.

Review browser console & PHP error logs — they should be clean.

✅ 8. Summary of modern Joomla 5 equivalents Joomla 3/4 Legacy Joomla 5 Modern API $db->query() $db->setQuery($sql)->execute() $db->loadResultArray() $db->loadColumn() $db->nameQuote('col') $db->quoteName('col') $db->getErrorNum() / $db->getErrorMsg() try { ... } catch (RuntimeException $e) $db = new EasyBlogDbJoomla() $db = Factory::getContainer()->get(DatabaseInterface::class) $query = [] arrays $query = implode(' ', $query) 💡 Tips for debugging use Joomla\CMS\Factory; $db = Factory::getContainer()->get(\Joomla\Database\DatabaseInterface::class);

Factory::getApplication()->enqueueMessage('SQL: ' . $db->replacePrefix($query));

or enable Joomla debug mode (Global Configuration → System → Debug System).

🚀 Result

After these adjustments:

No more EasyBlogDbCompat redeclarations

No missing nameQuote(), getErrorNum(), or query() methods

Front-end & back-end fully functional under Joomla 5

0
RL
Rami Louke
Accepted Answer
5 days ago #207165

Holy smokes! I got also a message from StackIdeas team, that they are pushing soon new/updated version of EasyBlog because the conflict it pushes with Joomla 5.4.0. Maybe I should link this to them.

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 5 days ago #207171

@Carolos, we are not EB forum please do not share here issues / errors etc. but thanks for the tip.

As summary, all webmasters need to wait for new EB offcial version update, and that's all.

0