バージョン選択

フォーラム

メニュー

オンライン状況

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

サイト内検索

質問 > 管理機能 > 商品CSVダウンロードでエラーが発生

管理機能

新規スレッドを追加する

スレッド表示 | 新しいものから 前のトピック | 次のトピック | 下へ
投稿者 スレッド
K.M
投稿日時: 2019/10/3 17:05
対応状況: −−−
新米
登録日: 2019/10/3
居住地:
投稿: 2
商品CSVダウンロードでエラーが発生
[EC-CUBE] 2.13.5
[OS] Linux riplus.jp 2.6.32-042stab108.1 #1 SMP Thu Apr 23 19:17:11 MSK 2015 i686
[DB] PostgreSQL 7.4.30
[WEBサーバ] Apache/2.0.64 (Unix)
[PHP] 5.3.28 (Core, date, ereg, libxml, pcre, filter, Reflection, SPL, hash, apache2handler, SimpleXML, xml, session, iconv, sqlite3, ctype, curl, dom, ftp, gd, gettext, standard, json, mbstring, mcrypt, mysql, mysqli, openssl, PDO, pdo_mysql, pgsql, sockets, zip, zlib, mhash)
[GD] 有効 (GD Version => bundled (2.1.0 compatible), FreeType Support => 1, FreeType Linkage => with freetype, T1Lib Support => 1, GIF Read Support => 1, GIF Create Support => 1, JPEG Support => 1, PNG Support => 1, WBMP Support => 1, XPM Support => 1, XBM Support => 1, JIS-mapped Japanese Font Support => 1)

初めて相談致します。
表題の通り、商品CSVを一括ダウンロードしようとすると、エラーが発生します。
商品管理
→商品マスター
→条件入力なしで「この条件で検索する」
→検索結果一覧からCSVダウンロード
→以下のエラー発生
となります。
前任開発者が急にいなくなり、知識がある人間がおらず困っております。
どうかご教示願いします。

エラー内容↓

▼▼▼ デバッグ情報ここから ▼▼▼
http://shop-******.com/admin/products/?

SERVER_ADDR: 153.122.134.233
REMOTE_ADDR: 221.113.236.106
USER_AGENT: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36

Fatal error(E_USER_ERROR): DB処理でエラーが発生しました。
SQL: [SELECT product_id, product_class_id, parent_classcategory_id, classcategory_id, parent_classcategory_name, classcategory_name, maker_id, (SELECT name as maker_name FROM dtb_maker WHERE prdcls.maker_id = dtb_maker.maker_id) as maker_name, name, status, comment1, comment2, comment3, comment4, comment5, comment6, note, main_list_comment, main_list_image, main_comment, main_image, main_large_image, sub_title1, sub_comment1, sub_image1, sub_large_image1, sub_title2, sub_comment2, sub_image2, sub_large_image2, sub_title3, sub_comment3, sub_image3, sub_large_image3, sub_title4, sub_comment4, sub_image4, sub_large_image4, sub_title5, sub_comment5, sub_image5, sub_large_image5, deliv_date_id, del_flg, product_type_id, product_code, stock, stock_unlimited, sale_limit, price01, price02, deliv_fee, point_rate, down_filename, down_realfilename, (SELECT recommend_product_id FROM dtb_recommend_products WHERE prdcls.product_id = dtb_recommend_products.product_id ORDER BY rank DESC, recommend_product_id DESC limit 1 offset 0) AS recommend_product_id1, (SELECT comment FROM dtb_recommend_products WHERE prdcls.product_id = dtb_recommend_products.product_id ORDER BY rank DESC, recommend_product_id DESC limit 1 offset 0) AS recommend_comment1, (SELECT recommend_product_id FROM dtb_recommend_products WHERE prdcls.product_id = dtb_recommend_products.product_id ORDER BY rank DESC, recommend_product_id DESC limit 1 offset 1) AS recommend_product_id2, (SELECT comment FROM dtb_recommend_products WHERE prdcls.product_id = dtb_recommend_products.product_id ORDER BY rank DESC, recommend_product_id DESC limit 1 offset 1) AS recommend_comment2, (SELECT recommend_product_id FROM dtb_recommend_products WHERE prdcls.product_id = dtb_recommend_products.product_id ORDER BY rank DESC, recommend_product_id DESC limit 1 offset 2) AS recommend_product_id3, (SELECT comment FROM dtb_recommend_products WHERE prdcls.product_id = dtb_recommend_products.product_id ORDER BY rank DESC, recommend_product_id DESC limit 1 offset 2) AS recommend_comment3, (SELECT recommend_product_id FROM dtb_recommend_products WHERE prdcls.product_id = dtb_recommend_products.product_id ORDER BY rank DESC, recommend_product_id DESC limit 1 offset 3) AS recommend_product_id4, (SELECT comment FROM dtb_recommend_products WHERE prdcls.product_id = dtb_recommend_products.product_id ORDER BY rank DESC, recommend_product_id DESC limit 1 offset 3) AS recommend_comment4, (SELECT recommend_product_id FROM dtb_recommend_products WHERE prdcls.product_id = dtb_recommend_products.product_id ORDER BY rank DESC, recommend_product_id DESC limit 1 offset 4) AS recommend_product_id5, (SELECT comment FROM dtb_recommend_products WHERE prdcls.product_id = dtb_recommend_products.product_id ORDER BY rank DESC, recommend_product_id DESC limit 1 offset 4) AS recommend_comment5, (SELECT recommend_product_id FROM dtb_recommend_products WHERE prdcls.product_id = dtb_recommend_products.product_id ORDER BY rank DESC, recommend_product_id DESC limit 1 offset 5) AS recommend_product_id6, (SELECT comment FROM dtb_recommend_products WHERE prdcls.product_id = dtb_recommend_products.product_id ORDER BY rank DESC, recommend_product_id DESC limit 1 offset 5) AS recommend_comment6, (SELECT ARRAY_TO_STRING(ARRAY(SELECT product_status_id FROM dtb_product_status WHERE dtb_product_status.product_id = prdcls.product_id and del_flg = 0 ORDER BY dtb_product_status.product_status_id), ',')) as product_statuses, (SELECT ARRAY_TO_STRING(ARRAY(SELECT name FROM dtb_product_status LEFT JOIN mtb_status ON dtb_product_status.product_status_id = mtb_status.id WHERE dtb_product_status.product_id = prdcls.product_id and del_flg = 0 ORDER BY dtb_product_status.product_status_id), ',')) as product_status_names, (SELECT ARRAY_TO_STRING(ARRAY(SELECT category_id FROM dtb_product_categories WHERE dtb_product_categories.product_id = prdcls.product_id ORDER BY dtb_product_categories.rank), ',')) as category_ids, (SELECT ARRAY_TO_STRING(ARRAY(SELECT category_name FROM dtb_product_categories LEFT JOIN dtb_category ON dtb_product_categories.category_id = dtb_category.category_id WHERE dtb_product_categories.product_id = prdcls.product_id ORDER BY dtb_product_categories.rank), ',')) as category_names FROM (
SELECT dtb_products.*,
dtb_products_class.product_class_id,
dtb_products_class.product_type_id,
dtb_products_class.product_code,
dtb_products_class.stock,
dtb_products_class.stock_unlimited,
dtb_products_class.sale_limit,
dtb_products_class.price01,
dtb_products_class.price02,
dtb_products_class.deliv_fee,
dtb_products_class.point_rate,
dtb_products_class.down_filename,
dtb_products_class.down_realfilename,
dtb_products_class.classcategory_id1 AS classcategory_id, /* 削除 */
dtb_products_class.classcategory_id1,
dtb_products_class.classcategory_id2 AS parent_classcategory_id, /* 削除 */
dtb_products_class.classcategory_id2,
Tcc1.class_id as class_id,
Tcc1.name as classcategory_name,
Tcc2.class_id as parent_class_id,
Tcc2.name as parent_classcategory_name
FROM dtb_products
LEFT JOIN dtb_products_class
ON dtb_products.product_id = dtb_products_class.product_id
LEFT JOIN dtb_classcategory as Tcc1
ON dtb_products_class.classcategory_id1 = Tcc1.classcategory_id
LEFT JOIN dtb_classcategory as Tcc2
ON dtb_products_class.classcategory_id2 = Tcc2.classcategory_id
WHERE dtb_products_class.del_flg = 0
) as prdcls WHERE del_flg = 0 ORDER BY update_date DESC ]
MDB2 Error: syntax error
prepare: [Error message: Unable to create prepared statement handle]
[Last executed query: DEALLOCATE PREPARE mdb2_statement_pgsql_3fe5abbf554b5c2221f9a302929d31c9de16c7d23]
[Native message: ERROR: column reference "sale_limit" is ambiguous]
on [/home/s-******admin/www/data/class/SC_Query.php(1095)]
/home/s-******admin/www/shop-******.com/admin/products/index.php(29): LC_Page_Admin_Products_Ex->process
/home/s-******admin/www/data/class_extends/page_extends/admin/products/LC_Page_Admin_Products_Ex.php(54): LC_Page_Admin_Products->process
/home/s-******admin/www/data/class/pages/admin/products/LC_Page_Admin_Products.php(78): LC_Page_Admin_Products->action
/home/s-******admin/www/data/class/pages/admin/products/LC_Page_Admin_Products.php(139): SC_Helper_CSV->sfDownloadCsv
/home/s-******admin/www/data/class/helper/SC_Helper_CSV.php(102): SC_Helper_CSV->sfDownloadCsvFromSql
/home/s-******admin/www/data/class/helper/SC_Helper_CSV.php(249): SC_Query->doCallbackAll
/home/s-******admin/www/data/class/SC_Query.php(271): SC_Query->prepare
/home/s-******admin/www/data/class/SC_Query.php(1024): SC_Query->error
/home/s-******admin/www/data/class/SC_Query.php(1095): trigger_error
▲▲▲ デバッグ情報ここまで ▲▲▲
red
投稿日時: 2019/10/4 8:46
対応状況: −−−
登録日: 2010/2/15
居住地: 東京都
投稿: 1353
Re: 商品CSVダウンロードでエラーが発生
[Native message: ERROR: column reference "sale_limit" is ambiguous]
on [/home/s-orimatsuadmin/www/data/class/SC_Query.php(1095)]

と書いてあります


----------------
EC-CUBEのカスタマイズ、トラブル解決承ります
お気軽にお問い合わせ下さい
https://www.ec-cube.net/integrate/partner/partner.php?partner_id=690

EC-CUBE4のプラグイントラブル、調査します

K.M
投稿日時: 2019/10/4 9:47
対応状況: 解決済
新米
登録日: 2019/10/3
居住地:
投稿: 2
Re: 商品CSVダウンロードでエラーが発生
早速のご返信、ありがとうございます。
この場合、PHP上から"sale_limit"という項目を削除すればよいのでしょうか?

追記
DB内にsale_limitのカラムが2つ見つかりました。
片方をsale_limit_1に変更したところ、無事にDLできるようになりました。
ありがとうございました。
スレッド表示 | 新しいものから 前のトピック | 次のトピック | トップ


 



ログイン


EC-CUBEペイメント

ec-cube.co

統計情報

総メンバー数は51,015名です
総投稿数は93,520件です

投稿数ランキング

1
seasoft
7332
2
AMUAMU
2712
3
nanasess
1984
4
468
1860
5
yuh
1604
6
red
1353
7
umebius
1296
8
h_tanaka
924
9
fukap
907
10
tsuji
856
11
shutta
835
12 ramrun 789
13
tao_s
774
14 karin 656
15 sumida 641
16
homan
633
17 DELIGHT 571
18
patapata
502
19
flealog
483
20 tonton 436


ネットショップの壺

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

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