User talk:Member005

From WMDRock Library
Revision as of 13:25, 10 June 2026 by Member005 (talk | contribs) (→‎Upgrade Documentation SMW 5.1.0: new section)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

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.php
  • mw_data_staging/extensions/PageForms/includes/PF_ValuesUtils.php
  • mw_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

Log check

  • Searched staging container logs for:
    • SMWDIProperty
    • Call to undefined method
    • Fatal 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.