fix(template): make the version a valid semver again #23

Merged
fabrice.kirchner merged 1 commit from fix/template-version-semver into main 2026-11-24 09:13:37 +01:00
Owner

The shop parses <Version> with JTLShop\SemVer\Version, which rejects a
fourth dot-separated part. TemplateValidator then returns
RES_INVALID_VERSION, ListingItem::parseXML() bails out before it
assigns $parent, and the GPSR plugin's getParent() call during the
licence check hits an uninitialised typed property.

Every backend request of all three shops has ended in HTTP 500 since
5.8.0.5 rolled out on 21.11.2026, while the frontend kept serving. The
counter now rides along as a prerelease, so the cache buster still
changes per tag.

Auswirkungen

The backend of cdp-webshop, engel-webshop and cdp-testshop becomes usable
again. The frontend is unaffected either way. Shops pick the template up
through TEMPLATE_REF, so a tag v5-8-0-6 has to follow this merge
before the reference can be raised in k3s-prod.

Test

Verified against the shop's own code in the running cdp-webshop pod:

NOVA       Ist   Version=1.8.0     RES_OK               | getParent() = NULL
NOVAChild  Ist   Version=5.8.0.5   RES_INVALID_VERSION  | getParent() WIRFT: ...
           Test  Version=5.8.0-6   RES_OK               | getParent() = 'NOVA'

pre-commit run --files README.md template.xml passes.

  • template.xml: version 5.8.0.5 to 5.8.0-6
  • README.md: spell out why the separator has to be a hyphen

Refs fabrice.kirchner/k3s-prod#1083

The shop parses `<Version>` with `JTLShop\SemVer\Version`, which rejects a fourth dot-separated part. `TemplateValidator` then returns `RES_INVALID_VERSION`, `ListingItem::parseXML()` bails out before it assigns `$parent`, and the GPSR plugin's `getParent()` call during the licence check hits an uninitialised typed property. Every backend request of all three shops has ended in HTTP 500 since `5.8.0.5` rolled out on 21.11.2026, while the frontend kept serving. The counter now rides along as a prerelease, so the cache buster still changes per tag. ## Auswirkungen The backend of cdp-webshop, engel-webshop and cdp-testshop becomes usable again. The frontend is unaffected either way. Shops pick the template up through `TEMPLATE_REF`, so a tag `v5-8-0-6` has to follow this merge before the reference can be raised in k3s-prod. ## Test Verified against the shop's own code in the running `cdp-webshop` pod: ``` NOVA Ist Version=1.8.0 RES_OK | getParent() = NULL NOVAChild Ist Version=5.8.0.5 RES_INVALID_VERSION | getParent() WIRFT: ... Test Version=5.8.0-6 RES_OK | getParent() = 'NOVA' ``` `pre-commit run --files README.md template.xml` passes. - template.xml: version 5.8.0.5 to 5.8.0-6 - README.md: spell out why the separator has to be a hyphen Refs fabrice.kirchner/k3s-prod#1083
fix(template): make the version a valid semver again
All checks were successful
Freeze Gate / freeze-gate (pull_request) Successful in 0s
8b039afe54
The shop parses <Version> with JTLShop\SemVer\Version, which rejects a
fourth dot-separated part. TemplateValidator then returns
RES_INVALID_VERSION, ListingItem::parseXML() bails out before it assigns
$parent, and the GPSR plugin's getParent() call during the licence check
hits an uninitialised typed property. Every backend request of all three
shops has ended in HTTP 500 since 5.8.0.5 rolled out on 21.11.2026,
while the frontend kept serving. The counter now rides along as a
prerelease, so the cache buster still changes per tag.

- template.xml: version 5.8.0.5 to 5.8.0-6
- README.md: spell out why the separator has to be a hyphen
fabrice.kirchner deleted branch fix/template-version-semver 2026-11-24 09:13:37 +01:00
Sign in to join this conversation.
No description provided.