User talk:Member005
Upgrade Documentation SMW 5.1.0
Staging remediation log: Page Forms fatal after SMW 5.1.0 upgrade
Date: 2026-06-10
Environment: staging only (dev.weaponofmusicaldefense.com)
Summary
After upgrading Semantic MediaWiki (SMW) on staging to 5.1.0, Special:FormEdit/Web_citation began failing with HTTP 500 and a fatal exception.
The failure was due to Page Forms calling SMW legacy class aliases removed in SMW 5.
A targeted compatibility patch was applied in staging, and the endpoint now renders successfully (HTTP 200).
Problem observed
- Failing URL:
- Symptom:
- Fatal exception / HTTP 500 on staging.
- Root error identified:
Class "SMWDIProperty" not found
Root cause
SMW 5 removed long-deprecated global class aliases (including SMWDIProperty and related legacy names).
The installed Page Forms branch still used legacy class names in multiple files, causing runtime failures in FormEdit-related code paths.
Changes applied
1) Page Forms: namespaced SMW class updates
Updated Page Forms calls from legacy aliases to namespaced SMW classes in:
mw_data_staging/extensions/PageForms/includes/PF_TemplateField.phpmw_data_staging/extensions/PageForms/includes/PF_ValuesUtils.phpmw_data_staging/extensions/PageForms/specials/PF_CreateTemplate.php
Representative edits:
SMWDIProperty::newFromUserLabel(...)→\SMW\DIProperty::newFromUserLabel(...)SMWDIWikiPage::newFromTitle(...)→\SMW\DIWikiPage::newFromTitle(...)new SMWRequestOptions()→new \SMW\RequestOptions()new SMWConceptDescription(...)→new \SMW\Query\Language\ConceptDescription(...)new SMWPrintRequest(...)→new \SMW\Query\PrintRequest(...)
2) Page Forms: safe adjustment for DataValueFactory method availability
In PF_TemplateField.php, the label-format code path previously called SMWDataValueFactory::findTypeID(...).
That method is not available in the installed SMW runtime.
The staging patch now uses $this->mPropertyType directly as the type ID before calling:
\SMW\DataValueFactory::newTypeIDValue(...)
3) Debug exposure cleanup
After validation, staging exception-detail output was disabled again:
mw_data_staging/LocalSettings.php- Confirmed value:
$wgShowExceptionDetails = false;
Validation performed
Endpoint check
- Requested:
- Result:
HTTP 200- Response contains
Create Web citationheading/title - No fatal exception text in response
Log check
- Searched staging container logs for:
SMWDIPropertyCall to undefined methodFatal exception/PHP Fatal
- Result:
- No new fatal matches after patch/validation requests
Current status
- Staging FormEdit path is restored for
Web_citation. - Staging remains on:
- MediaWiki 1.41.1
- Semantic MediaWiki 5.1.0
- This removes the immediate blocker introduced by the SMW upgrade and clears the path for subsequent staged core/runtime upgrade work.
Notes
- Changes were intentionally limited to staging files under
mw_data_staging. - No production routing/content changes were made in this remediation.