バージョン選択

フォーラム

メニュー

オンライン状況

48 人のユーザが現在オンラインです。 (39 人のユーザが フォーラム を参照しています。)
登録ユーザ: 0
ゲスト: 48
もっと...

サイト内検索

プラグイン > バグ報告・利用に関する質問 > WebAPI(コード:Api42)プラグインのクエリ引数limit,sorttype,sortkey,が同時に利用できない

バグ報告・利用に関する質問

新規スレッドを追加する

スレッド表示 | 新しいものから 前のトピック | 次のトピック | 下へ
投稿者 スレッド
nose
投稿日時: 2023/9/26 19:27
対応状況: −−−
新米
登録日: 2023/9/26
居住地:
投稿: 4
WebAPI(コード:Api42)プラグインのクエリ引数limit,sorttype,sortkey,が同時に利用できない
▼テンプレート
[EC-CUBE] 4.2 新規インストール
[VirtualBox] 7.0
[OS] Rocky Linux9
[PHP] 8.2
[データベース] mysql Ver 15.1 Distrib 10.5.16-MariaDB,
[WEBサーバ] 開発中の為symfony-cliのビルトインサーバ
[ブラウザ] Google Chrome バージョン: 116.0.5845.188(Official Build)(64 ビット)
[導入プラグインの有無] WebAPI(コード:Api42)
[カスタマイズの有無] 無し
[現象] WebAPIを有効化すると管理画面から利用できる「GraphiQL」でクエリのテストをしたところ以下の結果となります。
limitとorderを同時に処理できないようですがこれは仕様なのでしょうか。
もし仕様の場合は、この修正プラグインなどありましたら教えてください。
よろしくお願いいたします。


***クエリ***

query {
products(limit:1,page:1,sorttype:"d",sortkey:"product_code"){
nodes{
id
name
}
}
************

***レスポンス***
{
"errors": [
{
"debugMessage": "Cannot select distinct identifiers from query with LIMIT and ORDER BY on a column from a fetch joined to-many association. Use output walkers.",
"message": "Internal server error",
"extensions": {
"category": "internal"
},
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"products"
],
"trace": [
{
"file": "/home/webmaster/public_html/ec-cube/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/LimitSubqueryWalker.php",
"line": 46,
"call": "Doctrine\\ORM\\Tools\\Pagination\\LimitSubqueryWalker::validate()"
},
{
"file": "/home/webmaster/public_html/ec-cube/vendor/doctrine/orm/lib/Doctrine/ORM/Query/TreeWalkerChain.php",
"line": 97,
"call": "Doctrine\\ORM\\Tools\\Pagination\\LimitSubqueryWalker::walkSelectStatement()"
},
{
"file": "/home/webmaster/public_html/ec-cube/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php",
"line": 387,
"call": "Doctrine\\ORM\\Query\\TreeWalkerChain::walkSelectStatement()"
},
{
"file": "/home/webmaster/public_html/ec-cube/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/Paginator.php",
"line": 254,
"call": "Doctrine\\ORM\\Query\\Parser::parse()"
},
{
"file": "/home/webmaster/public_html/ec-cube/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/Paginator.php",
"line": 145,
"call": "Doctrine\\ORM\\Tools\\Pagination\\Paginator::unbindUnusedQueryParams()"
},
{
"call": "Doctrine\\ORM\\Tools\\Pagination\\Paginator::getIterator()"
},
{
"file": "/home/webmaster/public_html/ec-cube/vendor/knplabs/knp-components/src/Knp/Component/Pager/Event/Subscriber/Paginate/Doctrine/ORM/QuerySubscriber.php",
"line": 48,
"function": "iterator_to_array()"
},
{
"file": "/home/webmaster/public_html/ec-cube/vendor/symfony/event-dispatcher/Debug/WrappedListener.php",
"line": 117,
"call": "Knp\\Component\\Pager\\Event\\Subscriber\\Paginate\\Doctrine\\ORM\\QuerySubscriber::items()"
},
{
"file": "/home/webmaster/public_html/ec-cube/vendor/symfony/event-dispatcher/EventDispatcher.php",
"line": 230,
"call": "Symfony\\Component\\EventDispatcher\\Debug\\WrappedListener::__invoke()"
},
{
"file": "/home/webmaster/public_html/ec-cube/vendor/symfony/event-dispatcher/EventDispatcher.php",
"line": 59,
"call": "Symfony\\Component\\EventDispatcher\\EventDispatcher::callListeners()"
},
{
"file": "/home/webmaster/public_html/ec-cube/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php",
"line": 154,
"call": "Symfony\\Component\\EventDispatcher\\EventDispatcher::dispatch()"
},
{
"file": "/home/webmaster/public_html/ec-cube/vendor/knplabs/knp-components/src/Knp/Component/Pager/Paginator.php",
"line": 93,
"call": "Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcher::dispatch()"
},
{
"file": "/home/webmaster/public_html/ec-cube/var/cache/dev/Container3AvcL5m/PaginatorInterface_82dac15.php",
"line": 30,
"call": "Knp\\Component\\Pager\\Paginator::paginate()"
},
{
"file": "/home/webmaster/public_html/ec-cube/app/Plugin/Api42/GraphQL/Query/SearchFormQuery.php",
"line": 151,
"call": "Container3AvcL5m\\PaginatorInterface_82dac15::paginate()"
},
{
"file": "/home/webmaster/public_html/ec-cube/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
"line": 623,
"call": "Plugin\\Api42\\GraphQL\\Query\\SearchFormQuery::Plugin\\Api42\\GraphQL\\Query\\{closure}()"
},
{
"file": "/home/webmaster/public_html/ec-cube/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
"line": 550,
"call": "GraphQL\\Executor\\ReferenceExecutor::resolveFieldValueOrError()"
},
{
"file": "/home/webmaster/public_html/ec-cube/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
"line": 1195,
"call": "GraphQL\\Executor\\ReferenceExecutor::resolveField()"
},
{
"file": "/home/webmaster/public_html/ec-cube/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
"line": 264,
"call": "GraphQL\\Executor\\ReferenceExecutor::executeFields()"
},
{
"file": "/home/webmaster/public_html/ec-cube/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
"line": 215,
"call": "GraphQL\\Executor\\ReferenceExecutor::executeOperation()"
},
{
"file": "/home/webmaster/public_html/ec-cube/vendor/webonyx/graphql-php/src/Executor/Executor.php",
"line": 156,
"call": "GraphQL\\Executor\\ReferenceExecutor::doExecute()"
},
{
"file": "/home/webmaster/public_html/ec-cube/vendor/webonyx/graphql-php/src/GraphQL.php",
"line": 162,
"call": "GraphQL\\Executor\\Executor::promiseToExecute()"
},
{
"file": "/home/webmaster/public_html/ec-cube/vendor/webonyx/graphql-php/src/GraphQL.php",
"line": 94,
"call": "GraphQL\\GraphQL::promiseToExecute()"
},
{
"file": "/home/webmaster/public_html/ec-cube/app/Plugin/Api42/Controller/Admin/GraphiQLController.php",
"line": 85,
"call": "GraphQL\\GraphQL::executeQuery()"
},
{
"file": "/home/webmaster/public_html/ec-cube/vendor/symfony/http-kernel/HttpKernel.php",
"line": 163,
"call": "Plugin\\Api42\\Controller\\Admin\\GraphiQLController::index()"
},
{
"file": "/home/webmaster/public_html/ec-cube/vendor/symfony/http-kernel/HttpKernel.php",
"line": 75,
"call": "Symfony\\Component\\HttpKernel\\HttpKernel::handleRaw()"
},
{
"file": "/home/webmaster/public_html/ec-cube/vendor/symfony/http-kernel/Kernel.php",
"line": 202,
"call": "Symfony\\Component\\HttpKernel\\HttpKernel::handle()"
},
{
"file": "/home/webmaster/public_html/ec-cube/index.php",
"line": 83,
"call": "Symfony\\Component\\HttpKernel\\Kernel::handle()"
}
]
}
],
"data": {
"products": null
}
}
************

nose
投稿日時: 2023/9/27 18:39
対応状況: −−−
新米
登録日: 2023/9/26
居住地:
投稿: 4
Re: WebAPI(コード:Api42)プラグインのクエリ引数limit,sorttype,sortkey,が同時に利用できない
投稿主による追伸です。

私以外の方々の投稿は返信をすぐいただけているようですが
この投稿へは返信がつきません。

失礼や非常識な部分があり返信を避けられているのでしょうか。
または、情報が不足して返信しようがないのでしょうか。

初めての投稿で返信がない理由に見当がつきませんので
失礼な部分や不足している部分などありましたら
指摘いただけますと幸いです。
mcontact
投稿日時: 2023/9/27 19:21
対応状況: −−−
登録日: 2022/1/22
居住地:
投稿: 1296
Re: WebAPI(コード:Api42)プラグインのクエリ引数limit,sorttype,sortkey,が同時に利用できない
本コミュニティーは、必ず新しいスレッドに対して返信や回答をしなくてはならないという強制されるものではありません。
回答して頂けている方々は、ぞれぞれ時間を割いて、調査や回答をして頂いている事を考えましょう。
そして下記のサイトをよく読み投稿致しましょう。
https://www.hyuki.com/writing/techask.html
https://xoops.ec-cube.net/modules/newbb/viewtopic.php?topic_id=27741&forum=4&post_id=110027#forumpost110027

回答が確実に欲しいのであれば、EC-CUBEインテグレートパートナーなどに相談・依頼をする事をオススメ致します。


----------------
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
EC-CUBEインテグレートパートナー【ゴールド】ランク
M&I Works
URL: https://miworks.biz/
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

nose
投稿日時: 2023/9/28 17:20
対応状況: 解決済
新米
登録日: 2023/9/26
居住地:
投稿: 4
Re: WebAPI(コード:Api42)プラグインのクエリ引数limit,sorttype,sortkey,が同時に利用できない
自分でプラグインをカスタムして自己解決しました。


公式が提供しているプラグインのうえ、基本的な機能の質問にもかかわらず、答えてくれるのが自治厨の方だけで残念でした。
コミュニティの質が...
eccube_admin
投稿日時: 2023/9/29 9:42
対応状況: −−−
管理人
登録日: 2006/9/6
居住地:
投稿: 157
Re: WebAPI(コード:Api42)プラグインのクエリ引数limit,sorttype,sortkey,が同時に利用できない
【注意】
EC-CUBE開発コミュニティは、有志の方が集まり、助け合いの精神で成り立っています。

ご回答された方は、ご自分の貴重な時間を割いて回答していただいています。
コミュニティに投稿される場合は相手を尊重し、誹謗中傷や相手が不快に思われるような表現を記載しないよう、お願いいたします。

スレッドへの回答に関しては、タイミングや質問により調査に時間がかかる場合や、環境の違い等で再現性がない場合等で回答が難しい場合もあると思います。
残念ながら回答がつかないスレッドが出てくると思いますが、ご了承いただきたく存じます。

より良いコミュニティを一緒に作っていくためにも、気持ちの良いコミュニケーションを心掛けていただくよう、よろしくお願いいたします。
スレッド表示 | 新しいものから 前のトピック | 次のトピック | トップ


 



ログイン


EC-CUBE公式 Amazon Payプラグイン

統計情報

総メンバー数は89,031名です
総投稿数は110,020件です

投稿数ランキング

1
seasoft
7367
2
468
3217
3
AMUAMU
2712
4
nanasess
2314
5
umebius
2085
6
yuh
1819
7
h_tanaka
1646
8
red
1570
9
mcontact
1296
10
tsuji
958
11
fukap
907
12
shutta
835
13
tao_s
799
14 ramrun 789
15 karin 689
16 sumida 641
17
homan
633
18 DELIGHT 572
19
patapata
502
20
flealog
485


ネットショップの壺

EC-CUBEインテグレートパートナー

Copyright© EC-CUBE CO.,LTD. All Rights Reserved.