그누보드 기본 소스, 추천·비추천 시 빈화면(페이지)로 이동..

안녕하세요. 아래 소스는 그누보드 기본 소스입니다.(추천·비추천)

추천·비추천 버튼 클릭 후 '크롬→콘솔' 에서 확인해보니, 'Uncaught TypeError: Cannot read property 'error' of null' 라고 나옵니다.

어떤 게시판은 정상 작동하고, 어떤 게시판은 상기 오류와 같은 메세지가 출력됩니다.

추천 및 비추천 수는 정상적으로 올라가나, '이 글을 추천하셨습니다' · '이 글을 비추천하셨습니다' 메세지는 출력되지 않고, 빈페이지로 화면이 이동됩니다.

Copy
<script>$(function() {    $("a.view_image").click(function() {        window.open(this.href, "large_image", "location=yes,links=no,toolbar=no,top=10,left=10,width=10,height=10,resizable=yes,scrollbars=no,status=no");        return false;    });     // 추천, 비추천    $("#good_button, #nogood_button").click(function() {        var $tx;        if(this.id == "good_button")            $tx = $("#bo_v_act_good");        else            $tx = $("#bo_v_act_nogood");         excute_good(this.href, $(this), $tx);        return false;    });     // 이미지 리사이즈    $("#bo_v_atc").viewimageresize();}); function excute_good(href, $el, $tx){    $.post(        href,        { js: "on" },        function(data) {            if(data.error) {                alert(data.error);                return false;            }             if(data.count) {                $el.find("strong").text(number_format(String(data.count)));                if($tx.attr("id").search("nogood") > -1) {                    $tx.text("이 글을 비추천하셨습니다.");                    $tx.fadeIn(200).delay(2500).fadeOut(200);                } else {                    $tx.text("이 글을 추천하셨습니다.");                    $tx.fadeIn(200).delay(2500).fadeOut(200);                }            }        }, "json"    );}</script>
|

답변 1개

어떤 게시판은 정상 작동하고, 어떤 게시판은 오류가 난다고 하시는 것을 보니.. 

스킨에 따라서 되는 것도 있고 안되는 것도 있는 것 같습니다. 

이런 현상은,

그누보드 기본 소스가 업데이트가 되었으나, 스킨이 같이 업데이트가 안된 경우에 많이 발생을 합니다.

되는 스킨과 안되는 스킨의 소스를 한번 비교해 보세요. 

답변을 작성하려면 로그인이 필요합니다.