管理画面でのパースエラー  【解決済み】

質問全般・改善要望
返信する
tadashi
メンバー
メンバー
記事: 9
登録日時: 2010年8月04日(水) 11:13

管理画面でのパースエラー  【解決済み】

投稿記事 by tadashi »

-----
ご利用のサーバ:さくらのレンタルサーバ スタンダード
MODXのバージョン:1.06J-r4
PHPのバージョン:5.2.17
MySQLのバージョン:5.5.15-log
ブラウザ:firefox12
-----
MODXのバージョンを1.06に上げたあたりから、管理画面でリソースを編集し、保存するときにパースエラーが出ます。
[保存]+[閉じる]の場合だけエラーになります。
[保存]+[編集を続ける]だとエラーは出ないので、これでだましだまし使っています。
エレメントの編集ではエラーは出ません。
エラーメッセージは下記のとおりです。

« MODX Parse Error »
MODX encountered the following error while attempting to parse the requested resource:
« Execution of a query to the database failed - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BY k.keyword ASC' at line 1 »
SQL:SELECT k.keyword FROM `DBUSER`.`modx_site_keywords` AS k, `DBUSER`.`modx_keyword_xref` AS x WHERE k.id = x.keyword_id AND x.content_id = '1' ORDER BY BY k.keyword ASC
Basic info
REQUEST_URI: /manager/index.php?a=3&id=1&r=1
ID:
Referer: http://www.example.com/manager/index.php?a=27&id=1
User Agent: Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20100101 Firefox/12.0
Parser timing
MySQL: 0.0810 s (5 Requests)
PHP: 0.0595 s
Total: 0.1406 s

# call path
1 messageQuit() manager/includes/extenders/dbapi.mysql.class.inc.php on line 197
2 query() manager/includes/extenders/dbapi.mysql.class.inc.php on line 242
3 select() manager/actions/document_data.static.php on line 80
4 include_once() manager/index.php on line 232

-----

PHPは全くわからないのですが、お手数ですが、お力を貸していただければ幸いです。
よろしくお願いいたします。
アバター
yama
管理人
記事: 3236
登録日時: 2009年7月29日(水) 02:50

Re: 管理画面でのパースエラー

投稿記事 by yama »

METAタグ管理機能をお使いですよね。

$orderby = 'BY k.keyword ASC';
manager/actions/document_data.static.phpの79行目あたりに上記のような記述があると思います

$orderby = 'k.keyword ASC';
上記のように書き換えてみてください。BYを削除します
tadashi
メンバー
メンバー
記事: 9
登録日時: 2010年8月04日(水) 11:13

Re: 管理画面でのパースエラー

投稿記事 by tadashi »

yama様

早速のご返信ありがとうございました。
おっしゃるとおり、METAタグ管理機能を使っています。
上記のとおり書き換えたところ、あっさり解決しました :o
ありがとうございました。
返信する