행위

미디어위키 비주얼에디터 설치 및 오류 해결

DB CAFE

thumb_up 추천메뉴 바로가기


1 비주얼 데이터 설치[편집]

  • (참고)
    • 설치 환경 : Ubuntu 16.4
    • 미디어위키 1.31.0
    • Parsoid

2 설치 후 오류 해결[편집]

2.1 HTTP 500 에러[편집]

2.1.1 Parsoid 와 미디어위키의 설정오류[편집]

2.1.1.1 Parsoid 설정[편집]
  1. 우분투환경은 8142포트로 추천함 // Use port 8142 if you use the Debian package (다른 포트사용시 오류 발생)
  2. "config.yaml" (Parsoid환경설정 파일) 과 "LocalSettings.php"(미디어위키 설정) 반드시 일치 하여야 함.

[/usr/local/parsoid/config.yaml]

mwApis:
        - # This is the only required parameter,
          # the URL of you MediaWiki API endpoint.
          # wiki 설치 디렉토리에 존재하는 api.php url입력 
          uri: 'http://dbcafe.co.kr/api.php'
          # The "domain" is used for communication with Visual Editor
          # and RESTBase.  It defaults to the hostname portion of
          # the `uri` property above, but you can manually set it
          # to an arbitrary string. It must match the "domain" set
          # in $wgVirtualRestConfig.
          domain: 'dbcafe.co.kr'
...  중략 ...
       # Allow override of port/interface:
        serverPort: 8142
        serverInterface: '127.0.0.1'
2.1.1.2 미디어위키의 설정[편집]
wfLoadExtension( 'VisualEditor' );

 // Enable by default for everybody
 $wgDefaultUserOptions['visualeditor-enable'] = 1;

 // Optional: Set VisualEditor as the default for anonymous users
 // otherwise they will have to switch to VE
 // $wgDefaultUserOptions['visualeditor-editor'] = "visualeditor";

 // Don't allow users to disable it
 $wgHiddenPrefs[] = 'visualeditor-enable';

 // OPTIONAL: Enable VisualEditor's experimental code features
 #$wgDefaultUserOptions['visualeditor-enable-experimental'] = 1;


 $wgVirtualRestConfig['modules']['parsoid'] = array(
     // URL to the Parsoid instance
     // Use port 8142 if you use the Debian package
     'url' => 'http://dbcafe.co.kr:8142',
     // Parsoid "domain", see below (optional)
     'domain' => 'dbcafe.co.kr',
     // Parsoid "prefix", see below (optional)
     'prefix' => 'dbcafe.co.kr'
 );

2.2 HTTP 406 에러[편집]

  • SSL관련 오류

[해결방법]

  1. parsoid 설치 위치로 이동 후 (저는 /usr/local/parsoid 에 설치 함)
  2. cd lib/config/
  3. vi ParsoidConfig.js 후 ParsoidConfig.prototype.strictSSL = false; (기본 true => false로 변경 후 저장)
  4. parsoid 재시작