Topic on Extension talk:Linter

Linter on Third-party Wikis gives no results

3
Summary by FrozenPlum

Use of Linter in its current state, results in all zeros displayed in Special:LintErrors on third party wikis, if manual parsoid config (shown in the post) isn't added. This extra parsoid config uses the wikimedia/parsoid version included in MediaWiki.

FrozenPlum (talkcontribs)

Does Linter work on third-party wikis? I've installed MW 1.39.1 (on Apache, php 8.0.12) added Linter with the recommended settings:

$wgParsoidSettings = [
    'linting' => true
];

I ran update.php, it shows in Special:Version, but all stats are empty in Special:LintErrors. Editing a page with VisualEditor that has obsolete tags doesn't make the page populate into Special:LintErrors/obsolete-tag. The job queue is empty, there's nothing in the debug logs. I've run rebuildall.php in case it's a category link issue, I can't get this extension to work.

I've found one wiki (farm) on 1.38 (Miraheze) where Linter is functioning correctly, and the folks in MediaWiki discord pointed out that the other third-party wikis found via wikiapiary, using Linter, have all zeros for Linter results like I do--this seems unlikely to be because there's no Linter errors on any of their pages.


The notice "this extension requires linting enabled in parsoid's configuration" in combination with the suggested setting above, lead me to think that the bundled parsoid and its corresponding setting should work, but it doesn't. I see Miraheze is using a manual parsoid config with their (working) version of Linter. Perhaps in its current state, Linter requires the separate parsoid setup/config still, which isn't documented?


If it doesn't work with third-party wikis out of the box, it would be great to add a notice of some kind until the documentation is working and complete.

FrozenPlum (talkcontribs)

I've largely given up on making Linter work at this point, I am mostly leaving this here in hopes it might help someone else get farther than I did. I tried a number of variations in the settings (including some I saw in the extension page's history) and these instructions. I also tried making Linter work by following Miraheze's example who got it working in 1.38, loading it as an extension using:


For me, this resulted in a 404 with "The requested relative path () did not match any known handler".

I tried this with and without the extension page's recommended code:

$wgParsoidSettings = [
    'linting' => true
];

This is where I stopped, as I've already been through this same relative path error and most of the others described in task T263928 with manual parsoid/restbase config. I decided I didn't need Linter that badly, but perhaps this info might help someone else.

FrozenPlum (talkcontribs)

Okay, so working with the folks in MediaWiki Discord, I figured out how to load Parsoid as an extension (the built-in wikimedia/parsoid version), which lead me to looking at Miraheze's mw-config setup on Github. That got me part of the way there, but broke VE editing.


Fortunately, these links and footwork helped Feivel, the smarty pants at Star Citizen wiki to take it over the finish line, which helped me spot where my own (silly) error was (this particular site required the 'www' be added). The config I ended up with, works now for pages parsed by VE/Parsoid

# Parsoid
wfLoadExtension( 'Parsoid', "$IP/vendor/wikimedia/parsoid/extension.json" );

$wgParsoidSettings = [
    'useSelser' => true,
    'linting' => true,
];

$wgVisualEditorParsoidAutoConfig = false; #(for Linter, to make work)

$wgVirtualRestConfig = [
	'paths' => [],
	'modules' => [
		'parsoid' => [
			'url' => 'https://www.mysite.wiki/w/rest.php',
			'domain' => 'www.mysite.wiki',
			'forwardCookies' => true,
			'restbaseCompat' => false,
			'timeout' => 30,
		],
	],
	'global' => [
		'timeout' => 360,
		'forwardCookies' => false,
		'HTTPProxy' => null,
	],
];