User tests: Successful: Unsuccessful:
Code in MVCFactory to set database to model is not working at the moment because BaseDatabaseModel
do not implement DatabaseAwareInterface
joomla-cms/libraries/src/MVC/Factory/MVCFactory.php
Lines 170 to 177 in 2e81829
Deprecate DatabaseModelInterface
and should removed together with libraries/src/MVC/Model/DatabaseAwareTrait.php
so is J6.0 ok or should both removed with J7.0?
disable following code and open backend
joomla-cms/libraries/src/MVC/Model/BaseDatabaseModel.php
Lines 100 to 113 in 2e81829
no 500 error when visit backend or frontend
Please select:
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries Front End Plugins |
Labels |
Added:
PR-5.3-dev
|
@heelc29 - I have done this 3 times too be sure I wasn't reporting incorrectly... but I can't replicate the BEFORE condition..
I have debug mode on, cleared cache every time to be sure etc etc after having deleted lines 100-113 in [joomla-cms/libraries/src/MVC/Model/BaseDatabaseModel.php and the backend loads fine...
On 5.3.0 ßeta 2, PHP 8.3.19, MariaDB 10.6.15 if that matters.
So, what am I doing wrong?
@exlemor I don't now. I just tried again
Category | Libraries Front End Plugins | ⇒ | Administration com_workflow Libraries Front End Plugins |
@heelc29 - it appears that the code has evolved and is no longer as the same so I can't test this PR ;(
joomla-cms/libraries/src/MVC/Factory/MVCFactory.php
Lines 170 to 177
if ($model instanceof DatabaseAwareInterface) {
try {
$model->setDatabase($this->getDatabase());
} catch (DatabaseNotFoundException $e) {
@trigger_error(\sprintf('Database must be set, this will not be caught anymore in 5.0.'), E_USER_DEPRECATED);
$model->setDatabase(Factory::getContainer()->get(DatabaseInterface::class));
}
}
is not what I have in my file :/
if ($model instanceof DatabaseAwareInterface) {
try {
$model->setDatabase($this->getDatabase());
} catch (DatabaseNotFoundException) {
@trigger_error('Database must be set, this will not be caught anymore in 5.0.', E_USER_DEPRECATED);
$model->setDatabase(Factory::getContainer()->get(DatabaseInterface::class));
}
}
(I'm on Joomla_5.3.4-dev - built on 23 August 2025 00:29:58 UTC)
it appears that the code has evolved and is no longer as the same so I can't test this PR ;(
@exlemor Sorry, I don't follow. The code from MVCFactory
is for informational purposes only and is not part of the test. The differences you describe are also very minor (missing variable in catch, unnecessary sprintf removed). The relevant code for this pull request is in BaseDatabaseModel
.
@heelc29 - I have done this 3 times too be sure I wasn't reporting incorrectly... but I can't replicate the BEFORE condition..
I have debug mode on, cleared cache every time to be sure etc etc after having deleted lines 100-113 in [joomla-cms/libraries/src/MVC/Model/BaseDatabaseModel.php and the backend loads fine...
On 5.3.0 ßeta 2, PHP 8.3.19, MariaDB 10.6.15 if that matters.
So, what am I doing wrong?