Extra Form
PHP PHP 7.4
CMS Rhymix 2.1

후하니님의 스티커모듈을 evergreen님이 포크한 버전 을 사용중입니다.

언제부터인지는 잘 모르겠는데(지금 라이믹스 버전은 2.1.9 Develop) 스티커모듈에서 스티커 등록시 아무 반응이 나타나질 않습니다.

등록후 게시판글을 리로드하면 스티커 등록은 되어져 있습니다.

 

아무래도 sticker.js 파일에서 문제가 생긴 것 같은데 해결 방법을 모르겠네요.

var tmp_url = default_url+'index.php';
jQuery.ajax({
headers: {'Content-Type': 'text/plain'},
type: 'POST',
dataType: "text",
url: tmp_url,
data: '<?xml version="1.0" encoding="utf-8" ?><methodCall><params><_filter><![CDATA[insert_comment]]></_filter><error_return_url><![CDATA['+window.location.pathname+']]></error_return_url><mid><![CDATA['+mid+']]></mid><document_srl><![CDATA['+document_srl+']]></document_srl>'+(comment_srl ? ('<comment_srl><![CDATA['+comment_srl+']]></comment_srl>') : '')+'<parent_srl><![CDATA['+parent_srl+']]></parent_srl><content><![CDATA['+content+']]></content>'+ anon +'<use_html><![CDATA[Y]]></use_html><module><![CDATA[board]]></module><act><![CDATA[procBoardInsertComment]]></act></params></methodCall>',

beforeSend : function() {
},
success : function(ret_xml) {
var parseXML = jQuery.parseXML(ret_xml);
var xml = jQuery(parseXML);

var error = xml.find('error').text();
var message = xml.find('message').text();
var mid = xml.find('mid').text();
var document_srl = xml.find('document_srl').text();
var comment_srl = xml.find('comment_srl').text();
if(!parseInt(error)){
/******** 스티커 등록 성공 후 실행할 부분********/
location.reload();
} else {
alert(message);
}
},
error : function(request, status, error) {
},
complete : function() {
}
});

 

  • profile

    서버 요청은 정상적으로 들어가는데, 응답 데이터 맨 앞에 빈 줄이 들어가서 브라우저가 제대로 해석하지 못하는 문제가 있습니다. 불필요한 빈 줄이나 공백 문자, UTF-8 BOM 등을 출력하는 자료가 있는 것 같으니 최근 업데이트 과정에서 수정한 파일들을 집중 점검해 보세요. (일반 HTML 파일도 모두 맨 앞에 불필요한 빈 줄이 들어가고 있습니다. HTML에서는 빈 줄이 들어가도 에러가 나지 않기 때문에 눈치채지 못할 뿐입니다.)

     

    error1.png

    error2.png

     

  • profile ?
    감사합니다.
    애드온 중에서 끝 줄에 빈 줄이 있어서 삭제하니 잘 작동합니다.
    근데 보통 끝 줄에 빈 줄이 있을 수 있지 않나요.
  • ? profile

    맨 끝에 ?> 태그를 닫지 않으면 빈 줄이 100개 있더라도 상관없습니다.
    ?> 태그를 닫은 후에 따로 출력할 내용이 더 있다면 몰라도,

    일반적인 php 파일에서는 ?> 태그를 닫지 않는 것이 표준입니다.

  • profile ?
    맨 끝에 ?> 태그를 닫아놓고 빈줄이 있네요.
    참고로 Alt 태그 변경 애드온 입니다.