Title: [gallery]での画像表示でエラー
Last modified: 2008年4月6日

---

# [gallery]での画像表示でエラー

 *  解決済 [wp25user](https://ja.wordpress.org/support/users/wp25user/)
 * (@wp25user)
 * [18年、 7ヶ月前](https://ja.wordpress.org/support/topic/gallery%e3%81%a7%e3%81%ae%e7%94%bb%e5%83%8f%e8%a1%a8%e7%a4%ba%e3%81%a7%e3%82%a8%e3%83%a9%e3%83%bc/)
 * wp2.5 からの機能と思いますが、ギャラリーでの画像挿入時に以下のエラーが発生してい
   ます。原因と回避方法についてどなたかご存知無いでしょうか？
 * 画像のアップロード, サムネイルの生成はうまくいっているようです。またデータベース
   についても一見正しそうなデータは格納されています。
 * *apache のログ：
    [Sun Apr 06 18:27:11 2008] [error] [client *.*.*.*] WordPress
   database error 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 ‘\\”menu_order 
   ASC, ID ASC\\” DESC’ at line 1 for query SELECT DISTINCT * FROM wp_posts WHERE
   1=1 AND post_type = ‘attachment’ AND wp_posts.post_parent = 160 AND (post_mime_type
   LIKE ‘image/%’) GROUP BY wp_posts.ID ORDER BY \\”menu_order ASC, ID ASC\\” DESC
   made by get_posts, referer: [http://****.com/****/wp-admin/post.php?action=edit&post=160](http://****.com/****/wp-admin/post.php?action=edit&post=160)
 * *dbより抜粋
    INSERT INTO `wp_posts` (`ID`, `post_author`, `post_date`, `post_date_gmt`,`
   post_content`, `post_title`, `post_category`, `post_excerpt`, `post_status`, `
   comment_status`, `ping_status`, `post_password`, `post_name`, `to_ping`, `pinged`,`
   post_modified`, `post_modified_gmt`, `post_content_filtered`, `post_parent`, `
   guid`, `menu_order`, `post_type`, `post_mime_type`, `comment_count`) VALUES (
   160, 1, ‘****-**-** **:**:**’, ‘****-**-** **:**:**’, ‘test[gallery][gallery]‘,‘
   test’, 0, ”, ‘publish’, ‘open’, ‘open’, ”, ‘test’, ”, ”, ‘****-*-* **:**:**’,‘****-**-****:**:**’,”,
   0, ‘[http://*.com/*/?p=160&#8217](http://*.com/*/?p=160&#8217);, 0, ‘post’, ”,
   1), (161, 1, ‘****-**-** **:**:**’, ‘****-**-** **:**:**’, ”, ‘test2’, 0, ”, ‘
   inherit’, ‘open’, ‘open’, ”, ‘test2’, ”, ”, ‘****-**-** **:**:**’, ‘****-*-* **:
   1:**’, ”, 160, ‘[http://*.com/*/wp-content/uploads/2008/04/test2.gif&#8217](http://*.com/*/wp-content/uploads/2008/04/test2.gif&#8217);,
   0, ‘attachment’, ‘image/gif’, 0), (162, 1, ‘****-**-** **:**:**’, ‘****-**-****:**:**’,”,‘
   test’, 0, ”, ‘inherit’, ‘open’, ‘open’, ”, ‘test’, ”, ”, ‘****-**-** **:**:**’,‘****-*-***:**:**’,”,
   160, ‘[http://*.com/*/wp-content/uploads/2008/04/test.gif&#8217](http://*.com/*/wp-content/uploads/2008/04/test.gif&#8217);,
   0, ‘attachment’, ‘image/gif’, 0);

4件の返信を表示中 - 1 - 4件目 (全4件中)

 *  [jyoshida](https://ja.wordpress.org/support/users/jyoshida/)
 * (@jyoshida)
 * [18年、 7ヶ月前](https://ja.wordpress.org/support/topic/gallery%e3%81%a7%e3%81%ae%e7%94%bb%e5%83%8f%e8%a1%a8%e7%a4%ba%e3%81%a7%e3%82%a8%e3%83%a9%e3%83%bc/#post-110639)
 * magic_quotes_gpc が on になっていませんか？
 * 本体の実装も怪しいですが…
 *  [jyoshida](https://ja.wordpress.org/support/users/jyoshida/)
 * (@jyoshida)
 * [18年、 7ヶ月前](https://ja.wordpress.org/support/topic/gallery%e3%81%a7%e3%81%ae%e7%94%bb%e5%83%8f%e8%a1%a8%e7%a4%ba%e3%81%a7%e3%82%a8%e3%83%a9%e3%83%bc/#post-110640)
 * 他にも色々と修正があがっていました。
 * [http://trac.wordpress.org/search?q=gallery+orderby&wiki=on&changeset=on&ticket=on](http://trac.wordpress.org/search?q=gallery+orderby&wiki=on&changeset=on&ticket=on)
 *  [Yuriko IKEDA](https://ja.wordpress.org/support/users/lilyfan/)
 * (@lilyfan)
 * [18年、 7ヶ月前](https://ja.wordpress.org/support/topic/gallery%e3%81%a7%e3%81%ae%e7%94%bb%e5%83%8f%e8%a1%a8%e7%a4%ba%e3%81%a7%e3%82%a8%e3%83%a9%e3%83%bc/#post-110644)
 * 確かに gallery ショートコードは実装が変ですね。img 要素に alt 属性がつかないという
   XHTML 違反もありますし、写真の下に出る文字列は「キャプション」じゃなくて「説明」
   の方が適切じゃないかと思いますし。
 *  トピック投稿者 [wp25user](https://ja.wordpress.org/support/users/wp25user/)
 * (@wp25user)
 * [18年、 7ヶ月前](https://ja.wordpress.org/support/topic/gallery%e3%81%a7%e3%81%ae%e7%94%bb%e5%83%8f%e8%a1%a8%e7%a4%ba%e3%81%a7%e3%82%a8%e3%83%a9%e3%83%bc/#post-110681)
 * >magic_quotes_gpc が on になっていませんか？
    そのとおりでした…。 ありがとうご
   ざいましたm(__)m

4件の返信を表示中 - 1 - 4件目 (全4件中)

 トピック「[gallery]での画像表示でエラー」には新たに返信することはできません。

## タグ

 * [gallery](https://ja.wordpress.org/support/topic-tag/gallery/)

 * フォーラム: [使い方全般](https://ja.wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4件の返信
 * 3人の参加者
 * 最後の返信者: [wp25user](https://ja.wordpress.org/support/users/wp25user/)
 * 最後の活動: [18年、 7ヶ月前](https://ja.wordpress.org/support/topic/gallery%e3%81%a7%e3%81%ae%e7%94%bb%e5%83%8f%e8%a1%a8%e7%a4%ba%e3%81%a7%e3%82%a8%e3%83%a9%e3%83%bc/#post-110681)
 * 状態: 解決済

## トピック

### 人気のトピック

### 返信がないトピック

### サポート関連ではないトピック

### 解決済みのトピック

### 未解決のトピック

### すべてのトピック
