ファイルブラウザが起動しない

質問全般・改善要望
返信する
yasu
メンバー
メンバー
記事: 103
登録日時: 2009年9月09日(水) 17:54

ファイルブラウザが起動しない

投稿記事 by yasu »

-----
ご利用のサーバ: xserver/さくらインターネット
MODXのバージョン: 1.0.6J-r8/1.0.8J
PHPのバージョン: 5.1.6/5.2.17
MySQLのバージョン: 5.0.95/5.5.28
ブラウザ:
-----


お世話になります。

TinyMCEの画像挿入ボタンから、ファイルブラウザが起動しなくなりました。
サイトを制作しながらバージョンアップをしていたため、どのバージョンから症状が出はじめたかは定かではありませんが、1.0.6-r7以前では動作していたと思います。

テンプレート変数からは起動しますが、TinyMCEの”閲覧”のボタンからは起動しません。
公式サイトのデモで確認すると問題ないので、こちら側の問題だとは思うのですが、何が原因なのか見当がつきません。

どこか影響している可能性があることなど、考えられる事があればご教授いただけないでしょうか?
各プラグインは、一度停止して確認してみましたが改善されませんでした。

よろしくお願いします。

=====================================================================
追記です。

KCfinderを導入していて、KCfinderだと「画像の横幅の最大値」が効かないことから、KCfinderを停止してみたところ、この事態が発覚しました。
KCfinderは関係ないとは思いますが、念のため情報として。
アバター
yama
管理人
記事: 3251
登録日時: 2009年7月29日(水) 02:50

Re: ファイルブラウザが起動しない

投稿記事 by yama »

投稿画面のHTMLソースを開いて、「 tinyMCE.init({ 」から次の 「 </script> 」までがどうなってるか教えていただけますでしょうか。
(document_base_urlなどサイトのURLが入る箇所がありますが、そのへんの情報は不要です)
yasu
メンバー
メンバー
記事: 103
登録日時: 2009年9月09日(水) 17:54

Re: ファイルブラウザが起動しない

投稿記事 by yasu »

いつもお世話になります。

編集部分フレーム内のソースですよね。
tinyMCE.init({
theme : 'advanced',
skin : 'default',
skin_variant : '',
mode : 'exact',
elements : 'ta',
width : '95%',
height : '500',
language : 'ja',
element_format : 'xhtml',
schema : 'html4',
paste_text_use_dialog : true,
document_base_url : 'http://×××.com/',
relative_urls : true,
remove_script_host : true,
convert_urls : true,
force_br_newlines : false,
force_p_newlines : true,
forced_root_block : 'p',
valid_elements : mce_valid_elements,
extended_valid_elements : mce_extended_valid_elements,
invalid_elements : mce_invalid_elements,
popup_css_add : '/assets/plugins/tinymce/style/popup_add.css',
theme_advanced_source_editor_height : 400,
accessibility_warnings : false,
theme_advanced_toolbar_location : 'top',
theme_advanced_statusbar_location: 'bottom',
theme_advanced_toolbar_align : '',
theme_advanced_font_sizes : '80%,90%,100%,120%,140%,160%,180%,220%,260%,320%,400%,500%,700%',
content_css : '/assets/plugins/tinymce/style/content.css,http://×××.com/css/import.css',
formats : {
alignleft : {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes : 'justifyleft'},
alignright : {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes : 'justifyright'},
alignfull : {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes : 'justifyfull'}
},
apply_source_formatting : true,
remove_linebreaks : false,
convert_fonts_to_spans : true,
plugins : 'template,visualblocks,autolink,inlinepopups,autosave,save,advlist,style,fullscreen,advimage,paste,advlink,media,contextmenu,table',
theme_advanced_buttons1 : 'undo,redo,|,bold,forecolor,backcolor,strikethrough,formatselect,fontsizeselect,pastetext,pasteword,code,template,|,fullscreen,help',
theme_advanced_buttons2 : 'image,media,link,unlink,anchor,|,justifyleft,justifycenter,justifyright,|,bullist,numlist,|,blockquote,outdent,indent,|,table,hr,|,visualblocks,styleprops,removeformat',
theme_advanced_buttons3 : '',
theme_advanced_buttons4 : '',
theme_advanced_resize_horizontal : false,
external_link_list_url : '/assets/plugins/tinymce/js/tinymce.linklist.php',
template_external_list_url : '/assets/plugins/tinymce/js/get_template.php',
template_popup_width : 550,
template_popup_height : 350,
theme_advanced_blockformats : 'p,h1,h2,h3,h4,h5,h6,div,blockquote,code,pre',
theme_advanced_styles : '左寄せ=justifyleft;右寄せ=justifyright',
theme_advanced_disable : '',
theme_advanced_resizing : true,
fullscreen_settings : {
theme_advanced_buttons1_add_before : 'save'
},
plugin_insertdate_dateFormat : '%Y/%m/%d',
plugin_insertdate_timeFormat : '%H:%M:%S',
entity_encoding : 'named',
file_browser_callback : 'mceOpenServerBrowser',
paste_text_sticky : true,
setup : function(ed)
{
ed.onPostProcess.add(function(ed, o)
{
// State get is set when contents is extracted from editor
if (o.get)
{
o.content = o.content.replace('<p>{{', '{{');
o.content = o.content.replace('}}</p>', '}}');
o.content = o.content.replace(/<p>\[([\[\!\~\^])/g, '[$1');
o.content = o.content.replace(/([\]\!\~\^])\]<\/p>/g, '$1]');
}
});
},
onchange_callback : false,
body_id:"main",
valid_elements : "*[*]",
//template_external_list_url: "assets/plugins/tinymce/template_list.js",
file_browser_callback: 'openKCFinder'
})
</script>
ソースを見ると、最後が「openKCFinder」になっていますね・・・
アバター
yama
管理人
記事: 3251
登録日時: 2009年7月29日(水) 02:50

Re: ファイルブラウザが起動しない

投稿記事 by yama »

なるほど。TinyMCEプラグインの設定画面のCustom Parametersのところですね。
yasu
メンバー
メンバー
記事: 103
登録日時: 2009年9月09日(水) 17:54

Re: ファイルブラウザが起動しない

投稿記事 by yasu »

KCFinderを使うと、Custom Parametersに「file_browser_callback: 'openKCFinder',」が入るんですね。
よくみるとKCFinderのプラグインコードに「/* Add line tinymce plugin property custom config "file_browser_callback: 'openKCFinder'" */」が書いてますね…。
失礼いたしました。
デフォルトのファイルブラウザーに戻したときに、削除されるようになれば良いのですが。

削除して解決しました。
ありがとうございます。
返信する