v2.1.0
What's Changed (since v2.0.2)
A feature release, and a license change: OSL is now Apache-2.0. The functional theme is review, with approved revisions now holding across the whole stack rather than only in the page body.
Approval was already available, but everything around it still read the latest revision. Semantic MediaWiki stored and answered queries from it, MwJson resolved slots from it, and the display title came from it, so a page could show its approved text while its data, its schema and its title came from an edit nobody had reviewed. Files embedded in an approved page were not covered at all. This release closes those paths and adds the queryable state needed to find what is waiting.
License
- AGPL-3.0 to Apache-2.0, for this repository and every OSL extension it bundles: MwJson, OpenSemanticLab, osw-python, Chatbot, ChemEditor, FileApi, InteractiveSemanticGraph, InteractiveSemanticGraph2, RdfExport, Reveal, SciFileHandler, SemanticProperties, SpreadsheetEditor, SvgEditor, WellplateEditor
- ChemEditor, InteractiveSemanticGraph2, SciFileHandler, SpreadsheetEditor and WellplateEditor carried no license file at all, so their effective status was all rights reserved. They are now explicitly licensed
- Each repository gains a
NOTICEfile carrying the copyright, per Apache section 4(d) - MwJson gains
THIRD-PARTY-NOTICES.md, attributing the bundled libraries: CeJS, Ace, jsoneditor, Selectize, Handlebars, Bootstrap, flatpickr, IMask, lz-string, Signature Pad, JSONPath, Spectre, Autocomplete, Font Awesome, json-schema-ref-parser and json-editor. All permissive, none previously carrying the copyright notice that MIT and BSD-3-Clause require to be retained - MediaWiki and its third party extensions are unaffected and remain under their own licenses, predominantly GPL-2.0-or-later
Approval
- Semantic data follows the approved revision. SemanticApprovedRevs is now installed, pinned to a known commit and patched during the image build. It answers the
SMW::RevisionGuardhooks, without which SMW stores and queries whatever was saved last. Four defects were fixed in the patch:ChangeRevisionis dispatched by reference but was taken by value, a revision id arrived as a string where an int was required, so neither guard path reached the approved revision; the update was skipped rather than moved onto the approved revision, leaving the store describing whatever it last held; and its four properties claimed the same labels as the_APPROVED*set of SemanticExtraSpecialProperties, so one set or the other was unreachable depending on load order - Approving a page no longer resets its title. ApprovedRevs is now the OSL fork (branch
osw). Link updates were built from the main slot alone, so a display title emitted by a non-main slot was dropped on approval and the page fell back to itsOSW...id. Purging did not help; only a null edit did - Approve without leaving the page. The not-approved header now offers the approval directly, gated on
$egApprovedRevsShowApproveLatest, instead of requiring a trip through the history - Embedded files are reviewed with the page. The header offers Approve latest with all embedded files and lists them, marking which are not yet approved. Enabled here via
$egApprovedRevsApproveFilesWithPage, which the extension itself defaults to off - Slots are read at the revision being rendered, and follow the approved revision (MwJson)
Queryable once the properties are enabled: Approval status (approved, pending, unapproved), File approval status, plus Approved revision, Approved by and Approved date.
Build
- WSSlots is patched: creating a page tested the wrong array for the presence of a main slot, so a page created from non-main slots alone was given a spurious empty main slot. Save failures are also reported rather than swallowed
- CommentStreams is patched:
SMWHooksindexed aReplyas an array where it is an object, which abortedrebuildDataon any wiki with replies - MwJson's composer dependencies are installed; it renders templates with
mustache/mustache, which nothing else in the stack pulls in
In the bundled extensions
- MwJson (v0.55.5 to v0.57.0):
- Slot patches, shipped off. A patch is an instance of the PagePatch category naming target pages and per-slot operations, applied when those slots are read and without editing the target. Guarded by
$wgMwJsonEnablePatches,$wgMwJsonPatchCategoryand a per-category edit right, since a patch can rewrite what other pages read - A PHP header/footer renderer, shipped off, replacing
Module:MwJson.$wgMwJsonRendererswitches every page at once in either direction with no edits, so it is a live rollback switch - A refused save is reported instead of hanging the editor, and a page is created in one revision rather than several
- Create buttons are hidden where the user's save would be refused
- A
oneOfbranch is matched correctly against multi-value enums
- Slot patches, shipped off. A patch is an instance of the PagePatch category naming target pages and per-slot operations, applied when those slots are read and without editing the target. Guarded by
- OpenSemanticLab (v0.43.3 to v0.43.7):
- The toolbar reload button rebuilds page properties, rather than purging without a link update
- Forms are built from patched schemas
- The view tab is only relabelled where it actually cancels something
New settings
All ship at the safe end, each a separate opt-in. See README.md.
$egApprovedRevsEnabledNamespaces # default covers no OSL namespace: add 14 and 7000
$egApprovedRevsAutomaticApprovals # default true: reviewers' own edits self-approve
$egApprovedRevsApproveFilesWithPage = true;
$wgMwJsonRenderer = 'php';
$wgMwJsonBypassLegacyTemplates = true;
$wgMwJsonRegisterSlotDependencies = true;
$wgMwJsonEnablePatches = false;Upgrade note
$egApprovedRevsEnabledNamespacesdefaults to0, 2, 4, 6, 10, 12, none of which are OSL namespaces. Add14(Category) and7000(Item) to put entities under review, or opt individual pages in with__APPROVEDREVS__$sespgEnabledPropertyListhas to list the_APPROVED*entries or the approval properties do not exist$wgMwJsonRegisterSlotDependenciesmakes an edit to a base category queue a refresh for every entity beneath it. That is the intended effect, but schedule it on a large wiki- Pages whose display title was lost to an earlier approval regain it when reparsed
- There is no notification for pending review. Either reviewers watch
Special:ApprovedRevsor the same set is queried with[[Approval status::pending]]
Full Changelog: v2.0.2...v2.1.0