Jump to content

Talk:Offline content generator/Installation/en

Add topic
From mediawiki.org

Something is wrong

[edit]

<pre>cd /.../extensions/Collection git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Collection/OfflineContentGenerator.git cd OfflineContentGenerator npm install -g node-gyp npm install

Created localsettings.js

./mw-ocg-service.js -c localsettings.js
/.../w/extensions/Collection/OfflineContentGenerator/lib/cli.js:33
		config = require(configFile)(config) || config;
		                            ^
TypeError: object is not a function
    at Object.exports.parseConfig (/.../w/extensions/Collection/OfflineContentGenerator/lib/cli.js:33:31)
    at Object.<anonymous> (/.../w/extensions/Collection/OfflineContentGenerator/mw-ocg-service.js:46:18)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3

[[kgh]] (talk) 22:58, 16 March 2016 (UTC)Reply

Could you paste the contents of your localsettings.js please? It looks like some sort of problem there. cscott (talk) 15:23, 19 April 2016 (UTC)Reply
Well I deleted all this OCG stuff so I cannot recreate right now. The "localsettings.js" however should have had the contents as created by
./mw-ocg-service.js -c localsettings.js
So no manual intervention was done by me since it is not necessary according to the installation instructions. I will try to recreate the issue on another server an get back with the contents of this file. [[kgh]] (talk) 08:02, 21 April 2016 (UTC)Reply
Ah, I installed Parsoid from the Linux package so I have a settings.js and not a localsettings.js
        parsoidConfig.setMwApi({
                uri: 'https://www.example.org/w/api.php',
                domain: 'example.org',
                prefix: 'eorg'
        });
Probably the result will be that one should not install Parsoid from package if the ocg should be used. Oh dear [[kgh]] (talk) 08:24, 21 April 2016 (UTC)Reply
I think the confusion is that OCG has its *own* settings file. You shouldn't use Parsoid's `localsettings.js` as a configuration file for OCG. In fact, as the installation instructions suggest, if you have the PHP side configured correctly, you shouldn't need a localsettings.js for OCG at all. cscott (talk) 17:14, 29 April 2016 (UTC)Reply
Have not tried since since mwlib is still working on Debian 8 but I will have another go soon. [[kgh]] (talk) 14:44, 5 October 2016 (UTC)Reply

Offline Content Generator functionality with private wiki?

[edit]

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


https://phabricator.wikimedia.org/T120556 [[kgh]] (talk) 14:42, 5 October 2016 (UTC)Reply

The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.