Topic on Extension talk:Linter

Prh47bridge (talkcontribs)

I've installed the extension and modified the config.yaml for Parsoid as per the instructions. VisualEditor is working fine so I know Parsoid and Restbase are both working. However, I am not getting any lint errors at all. This seems unlikely. I've tried deliberately putting an error on a page but it isn't picked up. Any ideas? Is there anything I can do to test that everything is working correctly?

Arlolra (talkcontribs)
Prh47bridge (talkcontribs)

Thanks for your advice. I think I've solved it. It seems that the version of Parsoid I'm using is expecting the config variable linterSendAPI rather than the current variable. So lint errors were being detected but were going straight to the log, not to the API. However, when I put "linterSendAPI: true" in the config Parsoid won't work at all! Very frustrating! Would I be correct in thinking that this means I'm using an older version of Parsoid and need to update?

Prh47bridge (talkcontribs)

I've now established that, for some reason, my server was no longer picking up Parsoid updates from the repository. Fixed that and will be upgrading from the currently installed version (0.7.1) to the latest in the repository. Hopefully that will fix this issue.

Arlolra (talkcontribs)
Prh47bridge (talkcontribs)

Thanks for the pointer. I have now upgraded to 0.8.0. However, it still isn't working. I'm getting the following in the Parsoid log on startup:

WARNING: For config property linter, required a value of type: object

Found null; Resetting it to: {"sendAPI":false,"apiSampling":1,"tidyWhitespaceBugMaxLength":100}

A diff comparing my config.yaml with the distribution version comes up with the following (ignoring domain name stuff);

83,87c83,86

<         linting: true

<         # Send lint errors to MW API instead of to the log

<         linter:

<               sendAPI: true

<               apiSampling: 10

---

>         #linting: true

>         #linter:

>         #  sendAPI: false # Send lint errors to MW API instead of to the log

>         #  apiSampling: 10 # Sampling rate (1 / 10)

97,99d95

<

<       # Enable the batch API

<       useBatchAPI: true

Any ideas? I'm assuming there is something I need to change in config.yaml to make this work?

Arlolra (talkcontribs)

Maybe a whitespace issue? Do you have any tabs hanging around?

Prh47bridge (talkcontribs)

Yes, it was a whitespace issue. I had tabs rather than spaces on the sendAPI and apiSampling lines of config.yaml. I am no longer getting lint errors in the Parsoid log. I can't see anything relevant in the API debug log but I suspect that is because the page I've been using no longer has any lint errors! I'll have to try and provoke one to make sure it is working.

Prh47bridge (talkcontribs)

Coming back to this after getting distracted by a problem with subpages...

I'm still not getting any Lint errors. Looking at the Parsoid log, I'm seeing multiple entries saying "Parsoid id found on element without a matching data-parsoid entry". I'm also seeing "Incompatible constraints (merge)" messages. I don't know if the incompatible constraints reports are significant. I know that for a while Parsoid was unable to log errors through the API due to a whitelist problem which I've fixed. Is that the cause of the "element without a matching entry" messages? Is it stopping errors being reported from my test page? If so, what do I do about it? Any advice gratefully received!

Reply to "No lint errors"