Announcement

Collapse
No announcement yet.

Help with a critical error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help with a critical error

    [2024-10-31 16:42:18] DEBUG: API (42S22) SQLSTATE[42S22]: Column not found: 1054 Unknown column 'contact.id' in 'where clause'; GET /669fb972c32728a78/CMarocmission; Route pattern: /{portalId}/{controller}; Route params: Array ( [controller] => CMarocmission [action] => index [portalId] => 669fb972c32728a78 )
    [2024-10-31 16:42:18] CRITICAL: (42S22) SQLSTATE[42S22]: Column not found: 1054 Unknown column 'contact.id' in 'where clause' :: GET /669fb972c32728a78/CMarocmission :: /var/www/html/dev/application/Espo/ORM/Executor/DefaultSqlExecutor.php(77)

  • #2

    Too little information to understand:

    - Which version of EspoCRM is used?
    - Under what circumstances does this error occur?
    ​- What actions in the settings through the UI or in the Espo files preceded this error?​
    - Did you try Rebuild or Hard Rebuild before creating this theme?​​

    Click image for larger version

Name:	image.png
Views:	76
Size:	44.4 KB
ID:	111937

    Comment


    • #3
      Espo 8.4.1,
      This issue occurs only when accessing the custom entity called CMarocmission via the portal and not through the standard interface. I also noticed that this problem appears when I assign the role for this entity to Contact. However, when I change the role to All, the issue disappears. I think it’s a relationship problem.


      Comment


      • victor
        victor commented
        Editing a comment
        Did you try to make Rebuild or Hard Rebuild?

    • #4
      I've already tried this command, but I still get the same error. Here is the browser console
      Click image for larger version

Name:	image.png
Views:	61
Size:	7.5 KB
ID:	111960​​

      Comment


      • victor
        victor commented
        Editing a comment
        It seems that when you enter the Portal as a user with "contact" rights, you get an error because you do not have a relationship between Contact and CMarocmission entities. Or that a similar relation once existed, and then it was deleted.

        That is, you should check the presence of a relay and create it (if there is none) between the above-mentioned entities or not use "contact" rights.
        Last edited by victor; 11-01-2024, 01:34 PM.

    • #5
      victor Hello, the relationship between the two entities already exists. Additionally, it is essential to access with contact rights, as this is a portal user, and I want them to be able to view only their own records.

      Comment


    • #6
      PHP Code:

      [2024-11-12 11:25:42ERRORSlim Application Error TypeError Code0 MessageCall to undefined method Espo\Core\Select\Helpers\FieldHelper::getRelationDefs() File: /var/www/html/dev/application/Espo/Core/Select/AccessControl/Filters/PortalOnlyContact.php Line62 Trace#0 /var/www/html/dev/application/Espo/Core/Select/AccessControl/Applier.php(89): Espo\Core\Select\AccessControl\Filters\PortalOnlyContact->apply() #1 /var/www/html/dev/application/Espo/Core/Select/SelectBuilder.php(381): Espo\Core\Select\AccessControl\Applier->apply() #2 /var/www/html/dev/application/Espo/Core/Select/SelectBuilder.php(168): Espo\Core\Select\SelectBuilder->applyAccessControlFilter() #3 /var/www/html/dev/application/Espo/Core/Select/SelectBuilder.php(121): Espo\Core\Select\SelectBuilder->buildQueryBuilder() #4 /var/www/html/dev/application/Espo/Core/Record/Service.php(1050): Espo\Core\Select\SelectBuilder->build() #5 /var/www/html/dev/application/Espo/Core/Controllers/RecordBase.php(247): Espo\Core\Record\Service->find() #6 /var/www/html/dev/application/Espo/Core/Api/ControllerActionProcessor.php(87): Espo\Core\Controllers\RecordBase->getActionList() #7 /var/www/html/dev/application/Espo/Core/Api/ControllerActionHandler.php(65): Espo\Core\Api\ControllerActionProcessor->process() #8 /var/www/html/dev/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Espo\Core\Api\ControllerActionHandler->handle() #9 /var/www/html/dev/application/Espo/Core/Api/RouteProcessor.php(222): Slim\MiddlewareDispatcher->handle() #10 /var/www/html/dev/application/Espo/Core/Api/RouteProcessor.php(149): Espo\Core\Api\RouteProcessor->processControllerAction() #11 /var/www/html/dev/application/Espo/Core/Api/RouteProcessor.php(127): Espo\Core\Api\RouteProcessor->processAfterAuth() #12 /var/www/html/dev/application/Espo/Core/Api/RouteProcessor.php(78): Espo\Core\Api\RouteProcessor->processInternal() #13 /var/www/html/dev/application/Espo/Core/Api/Starter.php(109): Espo\Core\Api\RouteProcessor->process() #14 /var/www/html/dev/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(38): Espo\Core\Api\Starter->Espo\Core\Api\{closure}() #15 /var/www/html/dev/vendor/slim/slim/Slim/Routing/Route.php(358): Slim\Handlers\Strategies\RequestResponse->__invoke() #16 /var/www/html/dev/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Slim\Routing\Route->handle() #17 /var/www/html/dev/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Slim\MiddlewareDispatcher->handle() #18 /var/www/html/dev/vendor/slim/slim/Slim/Routing/Route.php(315): Slim\MiddlewareDispatcher->handle() #19 /var/www/html/dev/vendor/slim/slim/Slim/Routing/RouteRunner.php(68): Slim\Routing\Route->run() #20 /var/www/html/dev/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php(45): Slim\Routing\RouteRunner->handle() #21 /var/www/html/dev/vendor/slim/slim/Slim/MiddlewareDispatcher.php(121): Slim\Middleware\RoutingMiddleware->process() #22 /var/www/html/dev/vendor/slim/slim/Slim/Middleware/ErrorMiddleware.php(76): Psr\Http\Server\RequestHandlerInterface@anonymous->handle() #23 /var/www/html/dev/vendor/slim/slim/Slim/MiddlewareDispatcher.php(121): Slim\Middleware\ErrorMiddleware->process() #24 /var/www/html/dev/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Psr\Http\Server\RequestHandlerInterface@anonymous->handle() #25 /var/www/html/dev/vendor/slim/slim/Slim/App.php(199): Slim\MiddlewareDispatcher->handle() #26 /var/www/html/dev/vendor/slim/slim/Slim/App.php(183): Slim\App->handle() #27 /var/www/html/dev/application/Espo/Core/Api/Starter.php(76): Slim\App->run() #28 /var/www/html/dev/application/Espo/Core/Portal/ApplicationRunners/Api.php(42): Espo\Core\Api\Starter->start() #29 /var/www/html/dev/application/Espo/Core/Application/RunnerRunner.php(84): Espo\Core\Portal\ApplicationRunners\Api->run() #30 /var/www/html/dev/application/Espo/Core/Application.php(78): Espo\Core\Application\RunnerRunner->run() #31 /var/www/html/dev/public/api/v1/portal-access/index.php(44): Espo\Core\Application->run() #32 {main} Tips: To display error details in HTTP response set "displayErrorDetails" to true in the ErrorHandler constructor.
      [2024-11-12 11:26:13CRITICAL: (42S22SQLSTATE[42S22]: Column not found1054 Unknown column 'contact.id' in 'where clause' :: GET /669fb972c32728a78/CMarocmission :: /var/www/html/dev/application/Espo/ORM/Executor/DefaultSqlExecutor.php(77)​ 

      Comment


      • victor
        victor commented
        Editing a comment
        Just an error code is not enough to understand what you did / plan to do / don't know how to do. Need more details.
    Working...
    X