User tests: Successful: Unsuccessful:
Pull Request for Issue #45782
When restoring an article from version history, the ordering
field may be null
if the version was saved during the initial creation of the item. This caused issues restoring that first version since the ordering
column in the database is non-nullable and required.
This PR adds a safeguard in the restore process to explicitly set ordering = 0
if it is null
in the versioned data. This prevents database errors or broken record state during restore. It also goes ahead and patches version saves to ensure a null
ordering value cannot be saved.
ordering
value) fails or causes an invalid NULL
ordering to be saved.ordering
was null
, it is now safely set to 0
.Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Labels |
Added:
PR-5.3-dev
|
I have tested this item ✅ successfully on d8a14bd
Tested with Workflow enabled.
Status | Pending | ⇒ | Ready to Commit |
RTC
Labels |
Added:
RTC
bug
|
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2025-08-01 14:32:41 |
Closed_By | ⇒ | rdeutz |
Thanks!
I have tested this item ✅ successfully on d8a14bd
Tested before applying this PR, with JBT graft Joomla_5.3.3-dev-Development-Full_Package.zip:
Column 'ordering' cannot be null
Tested with this PR, by graft Joomla_5.3.3-dev+pr.45783-Development-Full_Package.zip:
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45783.