- 2008-05-02 (金) 0:00
- WordPress
WordPress のタイトルに日本語を使用した場合、同一タイトルが存在すると新しく投稿(保存)が出来ないようです。
2.5.1 にバージョンアップしたら直っているかなと期待してましたが未だでした。
詳細は WordPress フォーラムをご参照ください。
以下は引用です。
# 行番号は 2.5.1 用に変更しています。
wp-includes/post.phpの1284行辺りにurlencode、urldecodeを追加・変更することで解消しました。
if ($post_name_check || in_array($post_name, $wp_rewrite->feeds) ) {
$suffix = 2;
do {
$alt_post_name = substr($post_name, 0, 200-(strlen($suffix)+1)). “-$suffix”;
$alt_post_name = urldecode ($alt_post_name); //★追加
// expected_slashed ($alt_post_name, $post_name, $post_type)
$post_name_check = $wpdb->get_var($wpdb->prepare(“SELECT post_name FROM $wpdb->posts WHERE post_name = ‘$alt_post_name’ AND post_type = ‘$post_type’ AND ID != %d AND post_parent = %d LIMIT 1″, $post_ID, $post_parent));
$suffix++;
} while ($post_name_check);
$post_name =urlencode($alt_post_name); //★変更
}
だそうです。
- Newer: ThinkPad Fan Control
- Older: Vistered Little 1.7.7
コメント:0
トラックバック:0
- このエントリーのトラックバックURL
- http://x31.yoshi-1968.com/2008/05/02/%e5%90%8c%e4%b8%80%e6%8a%95%e7%a8%bf%e5%90%8d/trackback/
- Listed below are links to weblogs that reference
- 同一投稿名 from ThinkPad X31 with Xubuntu