Skip to content
This repository has been archived by the owner on Dec 19, 2019. It is now read-only.

Wrong category table name resolving #116

Closed
naydav opened this issue Jul 3, 2018 · 1 comment
Closed

Wrong category table name resolving #116

naydav opened this issue Jul 3, 2018 · 1 comment
Labels
bug Something isn't working Component: CatalogGraphQl

Comments

@naydav
Copy link
Contributor

naydav commented Jul 3, 2018

Manual testing scenarios

  1. Create a category
  2. Execute the following request (where [category_id] is id of created category from step one):
{
  category(id: [category_id]) {
    id
    name
   
  }
}

Expected result:

{
  "data": {
    "category": {
      "id": 3,
      "name": "Cat-1"
    }
  }
}

Actual result

{
  "errors": [
    {
      "debugMessage": "SQLSTATE[42S02]: Base table or view not found: 1146 Table 'graphql.catalog_category_entity' doesn't exist, query was: SELECT `catalog_category_entity`.`level` FROM `catalog_category_entity` WHERE (entity_id = 3)",
      "message": "Internal server error",
      "category": "internal",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "category"
      ],
      "trace": [
        {
          "file": "/var/www/graphql.local/docs/ce/lib/internal/Magento/Framework/DB/Statement/Pdo/Mysql.php",
          "line": 93,
          "call": "Zend_Db_Statement_Pdo::_execute(array(0))"
        },
        {
          "file": "/var/www/graphql.local/docs/ce/vendor/magento/zendframework1/library/Zend/Db/Statement.php",
          "line": 303,
          "call": "Magento\\Framework\\DB\\Statement\\Pdo\\Mysql::_execute(array(0))"
        },
        {
          "file": "/var/www/graphql.local/docs/ce/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php",
          "line": 480,
          "call": "Zend_Db_Statement::execute(array(0))"
        },
        {
          "file": "/var/www/graphql.local/docs/ce/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php",
          "line": 238,
          "call": "Zend_Db_Adapter_Abstract::query('SELECT `catalog_category_entity`.`level` FROM `catalog_category_entity` WHERE (entity_id = 3)', array(0))"
        },
        {
          "file": "/var/www/graphql.local/docs/ce/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php",
          "line": 540,
          "call": "Zend_Db_Adapter_Pdo_Abstract::query('SELECT `catalog_category_entity`.`level` FROM `catalog_category_entity` WHERE (entity_id = 3)', array(0))"
        },
        {
          "file": "/var/www/graphql.local/docs/ce/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php",
          "line": 614,
          "call": "Magento\\Framework\\DB\\Adapter\\Pdo\\Mysql::_query('SELECT `catalog_category_entity`.`level` FROM `catalog_category_entity` WHERE (entity_id = 3)', array(0))"
        },
        {
          "file": "/var/www/graphql.local/docs/ce/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php",
          "line": 828,
          "call": "Magento\\Framework\\DB\\Adapter\\Pdo\\Mysql::query(instance of Magento\\Framework\\DB\\Select, array(0))"
        },
        {
          "file": "/var/www/graphql.local/docs/ce/app/code/Magento/CatalogGraphQl/Model/Category/LevelCalculator.php",
          "line": 42,
          "call": "Zend_Db_Adapter_Abstract::fetchOne(instance of Magento\\Framework\\DB\\Select)"
        },
        {
          "file": "/var/www/graphql.local/docs/ce/app/code/Magento/CatalogGraphQl/Model/Resolver/Products/DataProvider/CategoryTree.php",
          "line": 96,
          "call": "Magento\\CatalogGraphQl\\Model\\Category\\LevelCalculator::calculate(3)"
        },
        {
          "file": "/var/www/graphql.local/docs/ce/app/code/Magento/CatalogGraphQl/Model/Resolver/CategoryTree.php",
          "line": 76,
          "call": "Magento\\CatalogGraphQl\\Model\\Resolver\\Products\\DataProvider\\CategoryTree::getTree(instance of Magento\\Framework\\GraphQl\\Schema\\Type\\ResolveInfo, 3)"
        },
        {
          "file": "/var/www/graphql.local/docs/ce/vendor/webonyx/graphql-php/src/Deferred.php",
          "line": 54,
          "call": "Magento\\CatalogGraphQl\\Model\\Resolver\\CategoryTree::Magento\\CatalogGraphQl\\Model\\Resolver\\{closure}()"
        },
        {
          "file": "/var/www/graphql.local/docs/ce/vendor/webonyx/graphql-php/src/Deferred.php",
          "line": 34,
          "call": "GraphQL\\Deferred::run()"
        },
        {
          "file": "/var/www/graphql.local/docs/ce/vendor/webonyx/graphql-php/src/Executor/Promise/Adapter/SyncPromiseAdapter.php",
          "line": 139,
          "call": "GraphQL\\Deferred::runQueue()"
        },
        {
          "file": "/var/www/graphql.local/docs/ce/vendor/webonyx/graphql-php/src/GraphQL.php",
          "line": 88,
          "call": "GraphQL\\Executor\\Promise\\Adapter\\SyncPromiseAdapter::wait(instance of GraphQL\\Executor\\Promise\\Promise)"
        },
        {
          "file": "/var/www/graphql.local/docs/ce/lib/internal/Magento/Framework/GraphQl/Query/QueryProcessor.php",
          "line": 63,
          "call": "GraphQL\\GraphQL::executeQuery(instance of Magento\\Framework\\GraphQl\\Schema, '{\n  category(id: 3) {\n    id\n    name\n   \n  }\n}', null, instance of Magento\\GraphQl\\Model\\Query\\Resolver\\Context, array(0), null)"
        },
        {
          "file": "/var/www/graphql.local/docs/ce/app/code/Magento/GraphQl/Controller/GraphQl.php",
          "line": 108,
          "call": "Magento\\Framework\\GraphQl\\Query\\QueryProcessor::process(instance of Magento\\Framework\\GraphQl\\Schema, '{\n  category(id: 3) {\n    id\n    name\n   \n  }\n}', instance of Magento\\GraphQl\\Model\\Query\\Resolver\\Context, array(0))"
        },
        {
          "file": "/var/www/graphql.local/docs/ce/lib/internal/Magento/Framework/Interception/Interceptor.php",
          "line": 58,
          "call": "Magento\\GraphQl\\Controller\\GraphQl::dispatch(instance of Magento\\Framework\\App\\Request\\Http)"
        },
        {
          "file": "/var/www/graphql.local/docs/ce/lib/internal/Magento/Framework/Interception/Interceptor.php",
          "line": 138,
          "call": "Magento\\GraphQl\\Controller\\GraphQl\\Interceptor::___callParent('dispatch', array(1))"
        },
        {
          "file": "/var/www/graphql.local/docs/ce/lib/internal/Magento/Framework/Interception/Interceptor.php",
          "line": 153,
          "call": "Magento\\GraphQl\\Controller\\GraphQl\\Interceptor::Magento\\Framework\\Interception\\{closure}(instance of Magento\\Framework\\App\\Request\\Http)"
        },
        {
          "file": "/var/www/graphql.local/docs/ce/generated/code/Magento/GraphQl/Controller/GraphQl/Interceptor.php",
          "line": 26,
          "call": "Magento\\GraphQl\\Controller\\GraphQl\\Interceptor::___callPlugins('dispatch', array(1), array(1))"
        },
        {
          "file": "/var/www/graphql.local/docs/ce/lib/internal/Magento/Framework/App/Http.php",
          "line": 135,
          "call": "Magento\\GraphQl\\Controller\\GraphQl\\Interceptor::dispatch(instance of Magento\\Framework\\App\\Request\\Http)"
        },
        {
          "file": "/var/www/graphql.local/docs/ce/generated/code/Magento/Framework/App/Http/Interceptor.php",
          "line": 24,
          "call": "Magento\\Framework\\App\\Http::launch()"
        },
        {
          "file": "/var/www/graphql.local/docs/ce/lib/internal/Magento/Framework/App/Bootstrap.php",
          "line": 256,
          "call": "Magento\\Framework\\App\\Http\\Interceptor::launch()"
        },
        {
          "file": "/var/www/graphql.local/docs/ce/pub/index.php",
          "line": 37,
          "call": "Magento\\Framework\\App\\Bootstrap::run(instance of Magento\\Framework\\App\\Http\\Interceptor)"
        }
      ]
    }
  ],
  "data": {
    "category": null
  }
}
@naydav naydav added the bug Something isn't working label Jul 3, 2018
@naydav
Copy link
Contributor Author

naydav commented Jul 4, 2018

#117

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working Component: CatalogGraphQl
Projects
None yet
Development

No branches or pull requests

2 participants