이전 포스트에서 설명드린 K보드의 설치과정이나 숏코드를 활용한 최신글 리스트 설정에 아무런 문제가 없었고 또 글쓰기 테스트도 정상적으로 잘 이뤄졌습니다.
따라서 아무런 문제가 없다고 판단했지만 사실 심각한 문제가 있었습니다.
글쓰기 에디터 로딩이 안되서 글쓰기 자체가 안되는 문제가 있었던 것입니다.
처음부터 글쓰기 에디터에 대한 문제를 파악하지 못한 것은 관리자 로그인 상태로 세팅 작업을 진행했기 때문이였습니다.
그래서 꼼꼼하게 여러상황을 가정해서 확인할 필요가 있는것 같습니다.
즉 문제는 로그인한 상태에서는 모든 기능이 정상작동했지만 비로그인 상태 즉 게스트(guest)상태에서 게시판을 사용하고자 할 때는 글쓰기 에디터가 로딩되지 않는 문제가 있었던 것입니다.
왜 이러한 문제가 나타났을까요? (* 이글은 Kboard 플러그인 4.5 , Kboard comments 플러그인 3.7 버전을 기준으로 작성되었습니다. )
K보드 스팸방지 보안문자(Captcha) 생성문제 발생!
K보드는 호환성이 우수한 플러그인이기는 하지만 수많은 워드프레스 테마에 모두 최적화되어 있지 않고 워드프레스 기본테마를 베이스로 제작되었기 때문에 특정테마에서는 이러한 문제가 발생한 것입니다.
처음에는 익스플로러의 호환성 문제로 판단하여 테마 Header.php 소스를 이리저리 수정해 보았지만 결국 문제는 스팸방지 보안문자(Captcha) 문제라는 것을 확인했습니다.
K보드의 데모사이트의 이미지인 상단 이미지 스팸방지 문자 입력부분(적색박스) 부분의 문제였던 것입니다.
스팸방지 보안문자(Captcha)오류로 인한 편집기 에러원인은?
먼저 정상적인 상태와 에러가 발생한 K보드 게시판의 비정상적인 상태를 아래의 이미지를 통해서 확인해주시면 되겠습니다.
[pe2-image src=”http://lh4.ggpht.com/-afgWyxU4JH4/U5bOYtgDxjI/AAAAAAAAEKw/NLh4XxJSe5Y/s144-c-o/%2525EC%2525A0%252595%2525EC%252583%252581%2525ED%252599%252594%2525EB%2525A9%2525B4.jpg” href=”https://picasaweb.google.com/102394476629197694908/201406#6023228475580859954″ caption=”” type=”image” alt=”정상화면.jpg” ]
정상적인 상태에서는 모든 버튼과 테이블들이 잘 보여지게 됩니다.
[pe2-image src=”http://lh6.ggpht.com/-69xWexovUAE/U5bOVjGVQ6I/AAAAAAAAEKU/3aKgtozkez8/s144-c-o/%2525EB%2525B9%252584%2525EC%2525A0%252595%2525EC%252583%252581%2525ED%252599%252594%2525EB%2525A9%2525B4.jpg” href=”https://picasaweb.google.com/102394476629197694908/201406#6023228421248992162″ caption=”” type=”image” alt=”비정상화면.jpg” ]
하지만 비정상상태인 경우는 상기 이미지 처럼 비밀번호 입력칸 하단에 X박스가 발생하면서 글쓰기 자체가 불가능해진 상태입니다.
[pe2-image src=”http://lh6.ggpht.com/-lq0LBcjy9iw/U5bOVq0hfwI/AAAAAAAAEKc/kZfl9cIhcss/s144-c-o/captcha.jpg” href=”https://picasaweb.google.com/102394476629197694908/201406#6023228423321779970″ caption=”” type=”image” alt=”captcha.jpg” ]
상기 이미지에서 X박스 이미지는 스팸방지 보안문자 생성부분으로 Captcha 함수를 불러오는 부분에서 에러가 발생하여 문자출력을 못하였고 이후의 소스가 기능을 상실한 상황으로 보여집니다.
임의의 스팸방지 문자 이미지를 워드프레스 업로드(Uploads) 폴더의 Kboard_captcha 폴더에 생성하여 보여주어야 하는데 이부분에서 문제가 생긴것입니다.
Uploads – Kboard_captcha 폴더의 쓰기권한이 없어 이미지 생성을 못했기 때문에 에러가 발생할 수 있다고 하여 관련부분의 권한을 777(모든권한)을 부여했지만 에러는 해결되지 않았습니다.
스팸 보안문자 자체를 소스에서 제거하는것으로 문제해결
플러그인 소스와 테마가 충돌하거나 혹은 다른 플러그인의 소스가 서로 충돌하는 문제점으로 생각되는데 간단하게 오류가 발생한 스팸 보안문자 소스부분을 제거하는 것으로 문제해결을 하기로 결정했습니다.
순서는 다음과 같습니다.
1. FTP로 워드프레스 서버에 접속하여 수정할 스킨파일 다운로드 받기
FTP로 워드프레스 서버에 접속한 후 Plugins-Kboard-skin 폴더에서 현재 게시판에 사용하고 있는 스킨을 선택합니다. 스킨은 avatar,cusomer,default,thumbnail 의 4개 스킨이 제공됩니다.
게시판 설정시 적용한 스킨 폴더로 이동합니다.
해당 폴더로 이동하면 editors.php 라는 파일이 있습니다. 이 파일을 수정할 예정으므로 PC로 복사합니다.
2. 게시판 스킨폴더에서 복사한 editors.php 파일을 수정
수정할 부분이 스팸방지 보안문자이므로 검색어를 Captcha 로 하여 해당 부분을 검색해 봅니다.
[pe2-image src=”http://lh4.ggpht.com/-mIe-WG7v7gE/U5bOVp4vuWI/AAAAAAAAEKQ/yzKSQwmj1YE/s144-c-o/%2525EC%252586%25258C%2525EC%25258A%2525A4%2525EC%252588%252598%2525EC%2525A0%252595-captcha.jpg” href=”https://picasaweb.google.com/102394476629197694908/201406#6023228423071054178″ caption=”” type=”image” alt=”소스수정-captcha.jpg” ]
검색을 진행하게 되면 하단의 2개 부분이 나오게 됩니다. 점선 적색 박스 부분을 삭제해 줍니다.
[pe2-image src=”http://lh4.ggpht.com/-ooyWDF-8Vww/U5bOYacsAJI/AAAAAAAAEKs/3BD57Bp9iaU/s144-c-o/%2525EC%252597%252590%2525EB%252594%252594%2525ED%252584%2525B0%2525EC%252588%252598%2525EC%2525A0%25259502.jpg” href=”https://picasaweb.google.com/102394476629197694908/201406#6023228470466445458″ caption=”” type=”image” alt=”에디터수정02.jpg” ]
[pe2-image src=”http://lh5.ggpht.com/-kf3teGK0Fw0/U5bOXZCh1aI/AAAAAAAAEKk/x2QL5zNOZ1s/s144-c-o/%2525EC%252597%252590%2525EB%252594%252594%2525ED%252584%2525B0%2525EC%252588%252598%2525EC%2525A0%25259501.jpg” href=”https://picasaweb.google.com/102394476629197694908/201406#6023228452908422562″ caption=”” type=”image” alt=”에디터수정01.jpg” ]
혹시 문제가 발생했을 때 원본복구를 할수 있도록 원본은 미리 복사해 둡니다. 상단 부분을 삭제후 저장한 파일을 FTP프로그램을 이용하여 원본파일에 덮어씌워 줍니다.
3. 댓글부분의 Captcha 소스도 수정해야 수정이 모두 마무리
게시판의 스킨 부분의 스팸방지 보안문자부분을 제거한후 댓글 부분의 소스도 수정해 주어야 합니다. 댓글 부분은 Kboard-comments 폴더에 분리되어 있으며 이 폴더의 하위폴더인 skin 폴더로 이동합니다.
댓글부분은 스킨이 default 하나만 제공되므로 다시 이 폴더로 들어갑니다. 수정할 부분은 list.php 파일입니다.
[pe2-image src=”http://lh3.ggpht.com/-ZgOYOWJN3pc/U5bOZaYvA5I/AAAAAAAAELE/hmS72Am368Y/s144-c-o/%2525EC%2525BD%252594%2525EB%2525A9%252598%2525ED%25258A%2525B8%2525EB%2525A6%2525AC%2525EC%25258A%2525A4%2525ED%25258A%2525B8%2525EC%252588%252598%2525EC%2525A0%252595_01.jpg” href=”https://picasaweb.google.com/102394476629197694908/201406#6023228487629734802″ caption=”” type=”image” alt=”코멘트리스트수정_01.jpg” ]
[pe2-image src=”http://lh4.ggpht.com/-J6LGuvB-0gk/U5bOZ7OqtFI/AAAAAAAAELA/xXdqDxhnQow/s144-c-o/%2525EC%2525BD%252594%2525EB%2525A9%252598%2525ED%25258A%2525B8%2525EB%2525A6%2525AC%2525EC%25258A%2525A4%2525ED%25258A%2525B8%2525EC%252588%252598%2525EC%2525A0%252595_02.jpg” href=”https://picasaweb.google.com/102394476629197694908/201406#6023228496445879378″ caption=”” type=”image” alt=”코멘트리스트수정_02.jpg” ]
(2)번처럼 captcha를 검색어로 하여 소스를 검색한 후 수정할 부분을 확인합니다. 상단 이미지 부분의 2개 소스 부분을 모두 삭제해 줍니다. 원본은 미리 백업해 둡니다.
삭제후 저장한 파일을 마찬가지로 FTP프로그램을 이용하여 원본파일에 덮어 씌워줍니다.
이렇게 스팸방지 보안문자 소스부분을 모두 삭제하면 해당 기능이 사라지면서 정상적으로 게시판이 동작하게 됩니다.
다만 K보드 버전에 따라서 이 소스의 위치나 형태가 다를수 있습니다. (* K보드플러그인 4.7, 코멘트플러그인 3.7을 기준으로 참조하시면 되겠습니다.)
Update 2015-06-12 :
스팸방지차단문자 자체를 없앴더니 얼마되지 않아 게시판에 스팸 게시물이 넘쳐났습니다. 귀찮음에 간단하게 해결하려고 있더니 일을 2번하게 되네요!
Kboard 게시판 GD라이브러리 설치로 Captcha 문제 해결
Captcha 문자가 로딩되지 않는 원인은 GD 라이브러리 문제였고 GD 라이브러리 설치로 Captcha 를 활성화하여 문제를 해결했는데 관련 게시물은 상단 링크를 참조해 보시면 되겠습니다.