Ticket #1168 (closed バグ指摘: 修正済)

Opened 10 years ago

Last modified 10 years ago

[管理画面]デザイン管理(レイアウト設定):プレビューボタンクリックでDBエラー

Reported by: kotani Owned by: coelacanth
Priority: Milestone: EC-CUBE2.11.0
Component: 管理画面 Version: 2.11.0 β2
Keywords: Cc:
修正済み:

Description (last modified by kotani) (diff)

発現環境
OS Windows NT WIN-3C0FRSGNJ0N 6.0 build 6002 (Windows Server 2008 Web Server Edition Service Pack 2) i586
DBサーバ PostgreSQL 8.3.11
WEBサーバ Microsoft-IIS/7.0
PHP 5.3.5

▼▼ デバッグ情報ここから ▼▼▼

http://version211.iis.local/admin/design/index.php??

SERVER_ADDR: 
REMOTE_ADDR: 192.168.26.153
USER_AGENT: Mozilla/5.0 (Windows; U; Windows NT 6.1; ja; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15

C:\inetpub\wwwroot\version-2_5-dev\html\admin\design\index.php 34:LC_Page_Admin_Design_Ex->process
C:\inetpub\wwwroot\version-2_5-dev\data\class_extends\page_extends\admin\design\LC_Page_Admin_Design_Ex.php 56:LC_Page_Admin_Design->process
C:\inetpub\wwwroot\version-2_5-dev\data\class\pages\admin\design\LC_Page_Admin_Design.php 63:LC_Page_Admin_Design->action
C:\inetpub\wwwroot\version-2_5-dev\data\class\pages\admin\design\LC_Page_Admin_Design.php 206:LC_Page_Admin_Design->lfSetPreData
C:\inetpub\wwwroot\version-2_5-dev\data\class\pages\admin\design\LC_Page_Admin_Design.php 395:SC_Query->getAll
C:\inetpub\wwwroot\version-2_5-dev\data\class\SC_Query.php 270:SC_Query->execute
C:\inetpub\wwwroot\version-2_5-dev\data\class\SC_Query.php 904:trigger_error
▼▼▼ エラーメッセージ ▼▼▼
https://version211.iis.local/admin/design/index.php?

SERVER_ADDR: 
REMOTE_ADDR: 192.168.26.153
USER_AGENT: Mozilla/5.0 (Windows; U; Windows NT 6.1; ja; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15

SQL: select page_id,page_name, header_chk, footer_chk from dtb_pagelayout where page_id = $1 OR page_id = (SELECT page_id FROM dtb_blocposition WHERE anywhere = 1)

MDB2 Error: unknown error

_doQuery: [Error message: Could not execute statement]
[Last executed query: EXECUTE mdb2_statement_pgsql_264eb23e43140014e00997981bbdb88ba3a701f4f7 ('1')]
[Native message: ERROR:  more than one row returned by a subquery used as an expression]


C:\inetpub\wwwroot\version-2_5-dev\html\admin\design\index.php 34:LC_Page_Admin_Design_Ex->process
C:\inetpub\wwwroot\version-2_5-dev\data\class_extends\page_extends\admin\design\LC_Page_Admin_Design_Ex.php 56:LC_Page_Admin_Design->process
C:\inetpub\wwwroot\version-2_5-dev\data\class\pages\admin\design\LC_Page_Admin_Design.php 63:LC_Page_Admin_Design->action
C:\inetpub\wwwroot\version-2_5-dev\data\class\pages\admin\design\LC_Page_Admin_Design.php 206:LC_Page_Admin_Design->lfSetPreData
C:\inetpub\wwwroot\version-2_5-dev\data\class\pages\admin\design\LC_Page_Admin_Design.php 395:SC_Query->getAll
C:\inetpub\wwwroot\version-2_5-dev\data\class\SC_Query.php 270:SC_Query->execute
C:\inetpub\wwwroot\version-2_5-dev\data\class\SC_Query.php 888:MDB2_Statement_Common->execute
C:\inetpub\wwwroot\version-2_5-dev\data\module\MDB2.php 4152:MDB2_Statement_pgsql->_execute
C:\inetpub\wwwroot\version-2_5-dev\data\module\MDB2\Driver\pgsql.php 1474:MDB2_Driver_pgsql->_doQuery
C:\inetpub\wwwroot\version-2_5-dev\data\module\MDB2\Driver\pgsql.php 673:MDB2_Driver_Common->raiseError
C:\inetpub\wwwroot\version-2_5-dev\data\module\MDB2.php 1497:PEAR->raiseError
C:\inetpub\wwwroot\version-2_5-dev\data\module\PEAR.php 557:MDB2_Error->MDB2_Error
C:\inetpub\wwwroot\version-2_5-dev\data\module\MDB2.php 1009:PEAR_Error->PEAR_Error
▲▲▲ エラーメッセージ ▲▲▲


▲▲▲ デバッグ情報ここまで ▲▲▲

Change History

comment:1 Changed 10 years ago by kotani

  • Description modified (diff)

comment:2 Changed 10 years ago by coelacanth

  • Owner changed from somebody to coelacanth
  • Status changed from new to assigned

comment:3 Changed 10 years ago by coelacanth

別チケット対応中に見つけて原因追っていたのでこっちも対応。

comment:4 Changed 10 years ago by coelacanth

select page_id,page_name, header_chk, footer_chk from dtb_pagelayout where page_id = 1 OR page_id = (SELECT page_id FROM dtb_blocposition WHERE anywhere = 1);

のサブクエリ部分に複数件ヒットする場合にDBエラーになることが判明

comment:5 Changed 10 years ago by coelacanth

ERROR 1242 (21000): Subquery returns more than 1 row

comment:6 Changed 10 years ago by coelacanth

  • Status changed from assigned to closed
  • Resolution set to 修正済

r20679 page_id = ANY (SELECT page_id FROM dtb_blocposition WHERE anywhere = 1); に変更。

仕様の理解が不十分だけど、これであってるかな?

Note: See TracTickets for help on using tickets.