Posts

Showing posts from January, 2018

Mediawiki Scary Transclusion and SSL Self Signed Certificate

Image
Mediawiki 1.26, Ubuntu 16.04.1. Scary transclusion ($wgEnableScaryTranscluding) stopped working when we moved Wikis to HTTPS only. Were getting error scarytranscludefailed ("[Template fetch failed for $1]"). Turned out being that we are using self signed certificates. Had to dive into includes/parser/Parser.php, function fetchScaryTemplateMaybeFromCache, and var_dump($status) after line 4125 to understand what was going on: object(Status)#405 (6) {  ["sv":protected]=>  object(StatusValue)#403 (6) {    ["ok":protected]=>    bool(false)    ["errors":protected]=>    array(1) {      [0]=>      array(3) {        ["type"]=>        string(5) "error"        ["message"]=>        string(15) "http-curl-error"        ["params"]=>        array(1) {          [0]=>           string(113) "error setting certificate verify locations:  CAfile: /etc/ssl/certs/