Closed Bug 951775 Opened 11 years ago Closed 11 years ago

Provide a list of pages with scripting errors

Categories

(developer.mozilla.org Graveyard :: General, defect, P1)

All
Other
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: fs, Unassigned)

References

Details

(Whiteboard: [specification][type:feature])

What problems would this solve? =============================== We are looking into defining the health of important documentation areas. One aspect is that there shouldn't be any TemplateExecution errors lying around unfixed. Who would use this? =================== * documentation maintainers, * editors, * doc sprinters (as a todo list to pick from) What would users see? ===================== A listing of pages similar to https://developer.mozilla.org/en-US/docs/needs-review showing pages where the KumaScript warnings or errors are triggered. I hope that this list will not be enormously large. If we end up with more than ~100 entries on a prod data environment, this list should be filterable by topic. For example, as the maintainer of JS docs, I would be interested in a filtered list of documents living under "/docs/JavaScript/* What would users do? What would happen as a result? =================================================== We are able to say that there are no errors in the given documentation area and that the docs are "healthy". We can see what need fixing more quickly. Is there anything else we should know? ====================================== As this is one indicator for "documentation health" I want to include it in the doc status/health page: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Doc_status So, bonus points if we can make the list of KumaScript errors available to a KumaScript macro, that would be included on that page and is styled in a red warning style, so that we will fix these things within hours / days.
Another approach to do this might be to have another advanced search that also allows us to get a JSON that we will use in macros (https://developer.mozilla.org/en-US/docs/Project:MDN/Contributing/Advanced_search). So no additional front-end view would be needed. Instead we include it in our doc status wiki pages. Also adding P1, as this is something we need for the health of the docs in Q1 (top 3 request). Les, Jannis, any ideas or questions to get this spec'ed and ready to implement?
Flags: needinfo?(lorchard)
Flags: needinfo?(jezdez)
Priority: -- → P1
:fscholz Remember any search URL is also available as a JSON response (by either sending application/json as the Accepted header (preferred) or appending .json to the URL). I would caution you to use this endpoint to go crazy with regard to number of requests (how many are you expecting? what's the use case?) but we could certainly add caching and throttling to the search API if needed. I definitely think this is the way to go to integrate more data from the search backend into your doc static wiki pages.
Flags: needinfo?(jezdez)
Blocks: 968736
Just as a note-to-self or whomever implements this: There's a `rendered_errors` field on the Document model. If it's non-blank, the contents are errors from the last rendering run (including kumascript). So, we could add an index on Documents with non-blank `rendered_errors` to come up with the list of pages.
Flags: needinfo?(lorchard)
So, I had a look at this and submitted https://github.com/mozilla/kuma/pull/2064. This adds a simple list like https://developer.mozilla.org/en-US/docs/all for displaying all documents where the `rendered_errors` field is not empty. Of course this does not work with our macros and gives us not a list per section (e.g. only in JavaScript/), but at least we have something visible and can see *how many* errors there actually are. fwiw, I thought I could just add a new field to the document $json API with the error, but that does not work as the document's json does not get updated when there is an error (which makes sense so that other data is not erroneous there).
Commits pushed to master at https://github.com/mozilla/kuma https://github.com/mozilla/kuma/commit/a99933427ac1abb0471eb814213a69d3147455b6 Bug 951775 - Add a list of pages with errors to the wiki https://github.com/mozilla/kuma/commit/96c50268ad7285335936b3ea3bd276b2ae2e8745 Merge pull request #2064 from Elchi3/bug-951775 Bug 951775 - Add a list of pages with errors to the wiki
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.