MySQL error 1054: Unknown column 'config.deleted' in 'where clause'

I’m running 8.1.2 and have noticed the Suitecrm.log is full of this same error;

Thu Sep 22 03:29:50 2022 [2212005][1][FATAL] Mysqli_query failed.
Thu Sep 22 03:29:50 2022 [2212005][1][FATAL] Query Failed: SELECT favorites.*
FROM favorites
JOIN config ON ( config.id = favorites.parent_id )
WHERE favorites.assigned_user_id = ‘1’
AND favorites.parent_type = ‘Administration’
AND favorites.deleted = 0
AND config.deleted = 0
ORDER BY favorites.date_entered DESC LIMIT 0,10: MySQL error 1054: Unknown column ‘config.deleted’ in ‘where clause’

It appears that the ‘config’ table does not have an ‘id’ field nor a ‘deleted’ field.

On further investigation, this appears to come from the getModuleFavorites(string $module) function in ;
include/portability/Services/Favorites/FavoritesManagerPort.php

Does anyone know what’s going on here?
Is there a fix for this please?

Thanks
Terry

We are experiencing the same thing with the same version installed on shared hosting via Softaculus.

That looks like a bug, I would check if it is already reported on GitHub, if not, then please add an Issue there.

I’m working on creating a Github issue for this.

It would be great if one of you could get us a full stack trace of that FATAL… @TerryL @Davlet

Hi pgr

My suiteCRM is on a public hosting site and so I don’t have access to the php error logs. Unless there is a way in cpanel to get what you want, what I have previously posted is all I have.

Sun Sep 25 19:54:52 2022 [14598][1][FATAL]  Query Failed: SELECT favorites.*
                  FROM favorites
                  JOIN config ON ( config.id = favorites.parent_id )
                  WHERE favorites.assigned_user_id = '1'
                    AND favorites.parent_type = 'Administration'
                    AND favorites.deleted = 0
                    AND config.deleted = 0
                  ORDER BY favorites.date_entered DESC LIMIT 0,10: MySQL error 1054: Unknown column 'config.deleted' in 'where clause'

@pjdm thanks but if you can get a stack trace that’s what would really help, to know which function calls led to that query being generated.

I think SuiteCRM has that option in Admin / Settings, but I’m not sure, and I can’t check now. If it doesn’t mention stack traces, maybe it’s called “developer mode” or something.

I do know there is a config.php option that can be set to true, it’s called show_log_trace

Thanks!

There is nothing more than what @pjdm posted with both stack trace and dev mode enabled

The post you edited and deleted had stack traces, but of the previous errors, not of this one.

The trace I need should come immediately after the MySQL FATAL error, with a bunch of lines numbered #0, #1, #2, etc

Yeah that’s why I deleted them, they weren’t relevant. This here has no stack trace

I’m sure it’s possible to get them, I’m not sure why you’re not seeing it, maybe there is some other way.

So many problems would be solved in a much quicker and easier way if this PR I made more than two years ago had been merged… sigh…

Hello
I have same error on 8.2.3
Did you find a solution?

Are you guys using supported PHP versions?

→ V7: Compatibility Matrix :: SuiteCRM Documentation

→ V8: Compatibility Matrix :: SuiteCRM Documentation

PHP 7.4

Post must be at least 20 characters

Is that the effective version, as seen in Admin / Diagnostics / phpinfo?

If so, please open a bug for this on Github, if it’s not already there. if you manage to include a stack trace, I can take a look at it.

SuiteCRM 8.2.3

PHP Version 7.4.33
MySQLi Version: mysqlnd 7.4.33
MySQLi Host Info: Localhost via UNIX socket
MySQLi Server Info: 5.7.21-20-beget-5.7.21-20-1-log
MySQLi Client Encoding: utf8

enabling Display Stack Trace Of Errors generates many other errors

Fri Feb 3 16:50:38 2023 [4203][1][FATAL] Catch an error: [Warning] session_id(): Cannot change session id when headers already sent occurred in //vendor/symfony/http-foundation/Session/Storage/Proxy/AbstractProxy.php on line 92 [2023-02-03 16:50:38]
Trace info:
[L:](:StackTraceErrorHandler)
/
/vendor/symfony/http-foundation/Session/Storage/Proxy/AbstractProxy.php[L:92](:session_id)
//vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php[L:185](Symfony\Component\HttpFoundation\Session\Storage\Proxy\AbstractProxy:setId)
/
/vendor/symfony/http-foundation/Session/Session.php[L:211](Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage:setId)
//core/backend/Engine/LegacyHandler/LegacyHandler.php[L:305](Symfony\Component\HttpFoundation\Session\Session:setId)
/
/core/backend/Engine/LegacyHandler/LegacyHandler.php[L:272](App\Engine\LegacyHandler\LegacyHandler:startSymfonySession)
//core/backend/ViewDefinitions/LegacyHandler/ViewDefinitionsHandler.php[L:246](App\Engine\LegacyHandler\LegacyHandler:close)
/
/core/backend/Metadata/Service/ModuleMetadataProvider.php[L:90](App\ViewDefinitions\LegacyHandler\ViewDefinitionsHandler:getViewDefs)
//core/backend/Metadata/Service/AppMetadataProvider.php[L:421](App\Metadata\Service\ModuleMetadataProvider:getMetadata)
/
/core/backend/Metadata/Service/AppMetadataProvider.php[L:402](App\Metadata\Service\AppMetadataProvider:loadModuleMetadata)
//core/backend/Metadata/Service/AppMetadataProvider.php[L:201](App\Metadata\Service\AppMetadataProvider:getModuleMetadata)
/
/core/backend/Metadata/Service/AppMetadataProvider.php[L:153](App\Metadata\Service\AppMetadataProvider:getUserMetadata)
//core/backend/Metadata/DataProvider/AppMetadataItemDataProvider.php[L:87](App\Metadata\Service\AppMetadataProvider:getMetadata)
/
/vendor/api-platform/core/src/DataProvider/ChainItemDataProvider.php[L:62](App\Metadata\DataProvider\AppMetadataItemDataProvider:getItem)
//vendor/api-platform/core/src/DataProvider/OperationDataProviderTrait.php[L:64](ApiPlatform\Core\DataProvider\ChainItemDataProvider:getItem)
/
/vendor/api-platform/core/src/Bridge/Symfony/Routing/IriConverter.php[L:108](ApiPlatform\Core\Bridge\Symfony\Routing\IriConverter:getItemData)
//vendor/api-platform/core/src/GraphQl/Resolver/Stage/ReadStage.php[L:122](ApiPlatform\Core\Bridge\Symfony\Routing\IriConverter:getItemFromIri)
/
/vendor/api-platform/core/src/GraphQl/Resolver/Stage/ReadStage.php[L:74](ApiPlatform\Core\GraphQl\Resolver\Stage\ReadStage:getItem)
//vendor/api-platform/core/src/GraphQl/Resolver/Factory/ItemResolverFactory.php[L:69](ApiPlatform\Core\GraphQl\Resolver\Stage\ReadStage:__invoke)
/
/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php[L:632](ApiPlatform\Core\GraphQl\Resolver\Factory\ItemResolverFactory:ApiPlatform\Core\GraphQl\Resolver\Factory{closure})
//vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php[L:555](GraphQL\Executor\ReferenceExecutor:resolveOrError)
/
/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php[L:1247](GraphQL\Executor\ReferenceExecutor:resolveField)
//vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php[L:257](GraphQL\Executor\ReferenceExecutor:executeFields)
/
/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php[L:208](GraphQL\Executor\ReferenceExecutor:executeOperation)
//vendor/webonyx/graphql-php/src/Executor/Executor.php[L:155](GraphQL\Executor\ReferenceExecutor:doExecute)
/
/vendor/webonyx/graphql-php/src/GraphQL.php[L:158](GraphQL\Executor\Executor:promiseToExecute)
//vendor/webonyx/graphql-php/src/GraphQL.php[L:90](GraphQL\GraphQL:promiseToExecute)
/
/vendor/api-platform/core/src/GraphQl/Executor.php[L:34](GraphQL\GraphQL:executeQuery)
//vendor/api-platform/core/src/GraphQl/Action/EntrypointAction.php[L:86](ApiPlatform\Core\GraphQl\Executor:executeQuery)
/
/vendor/symfony/http-kernel/HttpKernel.php[L:157](ApiPlatform\Core\GraphQl\Action\EntrypointAction:__invoke)
//vendor/symfony/http-kernel/HttpKernel.php[L:79](Symfony\Component\HttpKernel\HttpKernel:handleRaw)
/
/vendor/symfony/http-kernel/Kernel.php[L:195](Symfony\Component\HttpKernel\HttpKernel:handle)
//public/index.php[L:62](Symfony\Component\HttpKernel\Kernel:handle)

Fri Feb 3 17:01:18 2023 [26642][1][FATAL] Mysqli_query failed.
Fri Feb 3 17:01:18 2023 [26642][1][FATAL] Query Failed: SELECT favorites.

FROM favorites
JOIN config ON ( config.id = favorites.parent_id )
WHERE favorites.assigned_user_id = ‘1’
AND favorites.parent_type = ‘Administration’
AND favorites.deleted = 0
AND config.deleted = 0
ORDER BY favorites.date_entered DESC LIMIT 0,10: MySQL error 1054: Unknown column ‘config.deleted’ in ‘where clause’
Fri Feb 3 17:01:19 2023 [26642][1][FATAL] Catch an error: [Notice] Undefined index: action occurred in /
/public/legacy/cache/smarty/templates_c/%%E4^E42^E42C6C55%%header.tpl.php on line 37 [2023-02-03 17:01:19]
Trace info:
/
/public/legacy/cache/smarty/templates_c/%%E4^E42^E42C6C55%%header.tpl.php[L:37](:StackTraceErrorHandler)
/
/vendor/smarty/smarty/libs/Smarty.class.php[L:1262](:include)
/
/public/legacy/include/Sugar_Smarty.php[L:145](Smarty:fetch)
/
/vendor/smarty/smarty/libs/Smarty.class.php[L:1112](Sugar_Smarty:fetch)
/
/public/legacy/include/MVC/View/SugarView.php[L:759](Smarty:display)
/
/public/legacy/include/MVC/View/SugarView.php[L:202](SugarView:displayHeader)
/
/public/legacy/include/MVC/Controller/SugarController.php[L:432](SugarView:process)
/
/public/legacy/include/MVC/Controller/SugarController.php[L:363](SugarController:processView)
/
/public/legacy/include/MVC/SugarApplication.php[L:101](SugarController:execute)
/
/public/legacy/index.php[L:52](SugarApplication:execute)

Fri Feb 3 17:01:23 2023 [26828][1][FATAL] Catch an error: [Notice] Undefined index: aos occurred in /
/public/legacy/modules/AOS_Products_Quotes/Line_Items.php on line 29 [2023-02-03 17:01:23]
Trace info:
/
/public/legacy/modules/AOS_Products_Quotes/Line_Items.php[L:29](:StackTraceErrorHandler)
[L:](:display_lines)
/
/public/legacy/include/SearchForm/SearchForm2.php[L:700](:call_user_func)
/
/public/legacy/include/SearchForm/SearchForm2.php[L:139](SearchForm:_build_field_defs)
/
/public/legacy/include/SubPanel/SubPanelDefinitions.php[L:193](SearchForm:setup)
/
/public/legacy/include/SubPanel/SubPanelDefinitions.php[L:111](aSubPanel:buildSearchQuery)
/
/public/legacy/include/SubPanel/SubPanelDefinitions.php[L:716](aSubPanel:__construct)
/
/core/backend/ViewDefinitions/LegacyHandler/SubPanelDefinitionHandler.php[L:189](SubPanelDefinitions:load_subpanel)
/
/core/backend/ViewDefinitions/LegacyHandler/SubPanelDefinitionHandler.php[L:139](App\ViewDefinitions\LegacyHandler\SubPanelDefinitionHandler:getModuleSubpanels)
/
/core/backend/ViewDefinitions/LegacyHandler/ViewDefinitionsHandler.php[L:231](App\ViewDefinitions\LegacyHandler\SubPanelDefinitionHandler:getSubPanelDef)
/
/core/backend/Metadata/Service/ModuleMetadataProvider.php[L:90](App\ViewDefinitions\LegacyHandler\ViewDefinitionsHandler:getViewDefs)
/
/core/backend/Metadata/Service/AppMetadataProvider.php[L:421](App\Metadata\Service\ModuleMetadataProvider:getMetadata)
/
/core/backend/Metadata/Service/AppMetadataProvider.php[L:402](App\Metadata\Service\AppMetadataProvider:loadModuleMetadata)
/
/core/backend/Metadata/Service/AppMetadataProvider.php[L:201](App\Metadata\Service\AppMetadataProvider:getModuleMetadata)
/
/core/backend/Metadata/Service/AppMetadataProvider.php[L:153](App\Metadata\Service\AppMetadataProvider:getUserMetadata)
/
/core/backend/Metadata/DataProvider/AppMetadataItemDataProvider.php[L:87](App\Metadata\Service\AppMetadataProvider:getMetadata)
/
/vendor/api-platform/core/src/DataProvider/ChainItemDataProvider.php[L:62](App\Metadata\DataProvider\AppMetadataItemDataProvider:getItem)
/
/vendor/api-platform/core/src/DataProvider/OperationDataProviderTrait.php[L:64](ApiPlatform\Core\DataProvider\ChainItemDataProvider:getItem)
/
/vendor/api-platform/core/src/Bridge/Symfony/Routing/IriConverter.php[L:108](ApiPlatform\Core\Bridge\Symfony\Routing\IriConverter:getItemData)
/
/vendor/api-platform/core/src/GraphQl/Resolver/Stage/ReadStage.php[L:122](ApiPlatform\Core\Bridge\Symfony\Routing\IriConverter:getItemFromIri)
/
/vendor/api-platform/core/src/GraphQl/Resolver/Stage/ReadStage.php[L:74](ApiPlatform\Core\GraphQl\Resolver\Stage\ReadStage:getItem)
/
/vendor/api-platform/core/src/GraphQl/Resolver/Factory/ItemResolverFactory.php[L:69](ApiPlatform\Core\GraphQl\Resolver\Stage\ReadStage:__invoke)
/
/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php[L:632](ApiPlatform\Core\GraphQl\Resolver\Factory\ItemResolverFactory:ApiPlatform\Core\GraphQl\Resolver\Factory{closure})
/
/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php[L:555](GraphQL\Executor\ReferenceExecutor:resolveOrError)
/
/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php[L:1247](GraphQL\Executor\ReferenceExecutor:resolveField)
/
/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php[L:257](GraphQL\Executor\ReferenceExecutor:executeFields)
/
/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php[L:208](GraphQL\Executor\ReferenceExecutor:executeOperation)
/
/vendor/webonyx/graphql-php/src/Executor/Executor.php[L:155](GraphQL\Executor\ReferenceExecutor:doExecute)
/
/vendor/webonyx/graphql-php/src/GraphQL.php[L:158](GraphQL\Executor\Executor:promiseToExecute)
/
/vendor/webonyx/graphql-php/src/GraphQL.php[L:90](GraphQL\GraphQL:promiseToExecute)
/
/vendor/api-platform/core/src/GraphQl/Executor.php[L:34](GraphQL\GraphQL:executeQuery)
/
/vendor/api-platform/core/src/GraphQl/Action/EntrypointAction.php[L:86](ApiPlatform\Core\GraphQl\Executor:executeQuery)
/
/vendor/symfony/http-kernel/HttpKernel.php[L:157](ApiPlatform\Core\GraphQl\Action\EntrypointAction:__invoke)
/
/vendor/symfony/http-kernel/HttpKernel.php[L:79](Symfony\Component\HttpKernel\HttpKernel:handleRaw)
/
/vendor/symfony/http-kernel/Kernel.php[L:195](Symfony\Component\HttpKernel\HttpKernel:handle)
/
/public/index.php[L:62](Symfony\Component\HttpKernel\Kernel:handle)

Fri Feb 3 17:01:23 2023 [26828][1][FATAL] Catch an error: [Notice] Trying to access array offset on value of type null occurred in /
/public/legacy/modules/AOS_Products_Quotes/Line_Items.php on line 29 [2023-02-03 17:01:23]
Trace info:
/
/public/legacy/modules/AOS_Products_Quotes/Line_Items.php[L:29](:StackTraceErrorHandler)
[L:](:display_lines)
/
/public/legacy/include/SearchForm/SearchForm2.php[L:700](:call_user_func)
/
/public/legacy/include/SearchForm/SearchForm2.php[L:139](SearchForm:_build_field_defs)
/
/public/legacy/include/SubPanel/SubPanelDefinitions.php[L:193](SearchForm:setup)
/
/public/legacy/include/SubPanel/SubPanelDefinitions.php[L:111](aSubPanel:buildSearchQuery)
/
/public/legacy/include/SubPanel/SubPanelDefinitions.php[L:716](aSubPanel:__construct)
/
/core/backend/ViewDefinitions/LegacyHandler/SubPanelDefinitionHandler.php[L:189](SubPanelDefinitions:load_subpanel)
/
/core/backend/ViewDefinitions/LegacyHandler/SubPanelDefinitionHandler.php[L:139](App\ViewDefinitions\LegacyHandler\SubPanelDefinitionHandler:getModuleSubpanels)
/
/core/backend/ViewDefinitions/LegacyHandler/ViewDefinitionsHandler.php[L:231](App\ViewDefinitions\LegacyHandler\SubPanelDefinitionHandler:getSubPanelDef)
/
/core/backend/Metadata/Service/ModuleMetadataProvider.php[L:90](App\ViewDefinitions\LegacyHandler\ViewDefinitionsHandler:getViewDefs)
/
/core/backend/Metadata/Service/AppMetadataProvider.php[L:421](App\Metadata\Service\ModuleMetadataProvider:getMetadata)
/
/core/backend/Metadata/Service/AppMetadataProvider.php[L:402](App\Metadata\Service\AppMetadataProvider:loadModuleMetadata)
/
/core/backend/Metadata/Service/AppMetadataProvider.php[L:201](App\Metadata\Service\AppMetadataProvider:getModuleMetadata)
/
/core/backend/Metadata/Service/AppMetadataProvider.php[L:153](App\Metadata\Service\AppMetadataProvider:getUserMetadata)
/
/core/backend/Metadata/DataProvider/AppMetadataItemDataProvider.php[L:87](App\Metadata\Service\AppMetadataProvider:getMetadata)
/
/vendor/api-platform/core/src/DataProvider/ChainItemDataProvider.php[L:62](App\Metadata\DataProvider\AppMetadataItemDataProvider:getItem)
/
/vendor/api-platform/core/src/DataProvider/OperationDataProviderTrait.php[L:64](ApiPlatform\Core\DataProvider\ChainItemDataProvider:getItem)
/
/vendor/api-platform/core/src/Bridge/Symfony/Routing/IriConverter.php[L:108](ApiPlatform\Core\Bridge\Symfony\Routing\IriConverter:getItemData)
/
/vendor/api-platform/core/src/GraphQl/Resolver/Stage/ReadStage.php[L:122](ApiPlatform\Core\Bridge\Symfony\Routing\IriConverter:getItemFromIri)
/
/vendor/api-platform/core/src/GraphQl/Resolver/Stage/ReadStage.php[L:74](ApiPlatform\Core\GraphQl\Resolver\Stage\ReadStage:getItem)
/
/vendor/api-platform/core/src/GraphQl/Resolver/Factory/ItemResolverFactory.php[L:69](ApiPlatform\Core\GraphQl\Resolver\Stage\ReadStage:__invoke)
/
/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php[L:632](ApiPlatform\Core\GraphQl\Resolver\Factory\ItemResolverFactory:ApiPlatform\Core\GraphQl\Resolver\Factory{closure})
/
/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php[L:555](GraphQL\Executor\ReferenceExecutor:resolveOrError)
/
/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php[L:1247](GraphQL\Executor\ReferenceExecutor:resolveField)
/
/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php[L:257](GraphQL\Executor\ReferenceExecutor:executeFields)
/
/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php[L:208](GraphQL\Executor\ReferenceExecutor:executeOperation)
/
/vendor/webonyx/graphql-php/src/Executor/Executor.php[L:155](GraphQL\Executor\ReferenceExecutor:doExecute)
/
/vendor/webonyx/graphql-php/src/GraphQL.php[L:158](GraphQL\Executor\Executor:promiseToExecute)
/
/vendor/webonyx/graphql-php/src/GraphQL.php[L:90](GraphQL\GraphQL:promiseToExecute)
/
/vendor/api-platform/core/src/GraphQl/Executor.php[L:34](GraphQL\GraphQL:executeQuery)
/
/vendor/api-platform/core/src/GraphQl/Action/EntrypointAction.php[L:86](ApiPlatform\Core\GraphQl\Executor:executeQuery)
/
/vendor/symfony/http-kernel/HttpKernel.php[L:157](ApiPlatform\Core\GraphQl\Action\EntrypointAction:__invoke)
/
/vendor/symfony/http-kernel/HttpKernel.php[L:79](Symfony\Component\HttpKernel\HttpKernel:handleRaw)
/
/vendor/symfony/http-kernel/Kernel.php[L:195](Symfony\Component\HttpKernel\HttpKernel:handle)
/
/public/index.php[L:62](Symfony\Component\HttpKernel\Kernel:handle)

Fri Feb 3 17:01:23 2023 [26828][1][FATAL] Catch an error: [Notice] Trying to access array offset on value of type null occurred in /
**/public/legacy/modules/AOS_Products_Quotes/Line_Items.php on line 29 [2023-02-03 17:01:23]
Trace info:

Thanks. I’m sorry, I can’t find anything useful from the stack traces. We’ll have to wait for the Github Issue to get some attention from developers…

1 Like

If anyone is looking for trace capability here is the way to add it from the ADMIN panel. I did that and my container (bitnami) failed immediately after but it does work well. I was using PHP 8.1 so I will try 8.0 if possible and then we might have traces that will help.

Looks like the config.deleted problem still exists in v8.3.0 (sadly). The github fix proposed by @pgr is not applied in 8.3.0 that looks for modules that are empty. PHP7.4, v8.3.0 fresh ubuntu 20.04 lts dedicated server.

Fri May 19 19:00:20 2023 [103303][1][FATAL]  Query Failed: SELECT favorites.*
                  FROM favorites
                  JOIN config ON ( config.id = favorites.parent_id )
                  WHERE favorites.assigned_user_id = '1'
                    AND favorites.parent_type = 'Administration'
                    AND favorites.deleted = 0
                    AND config.deleted = 0
                  ORDER BY favorites.date_entered DESC LIMIT 0,10: MySQL error 1054: Unknown column 'config.deleted' in 'where clause'