fix: ORDER BY ordering ASC on profiles table after column was dropped #180

Open
opened 2026-06-29 14:39:39 +00:00 by jmiller · 2 comments
Owner

Summary

Migration 01.43.33.sql dropped the ordering column from #__mokosuitebackup_profiles. Two plugin form XMLs still reference it, causing SQL errors:

  1. plg_content_mokosuitebackup/mokosuitebackup.xml:62ORDER BY ordering ASC
  2. plg_task_mokosuitebackup/forms/run_profile.xml:14ORDER BY ordering ASC

Severity

Critical — breaks profile dropdown rendering in content plugin config and scheduled task creation/editing.

Impact

  • Content plugin: profile dropdown fails when rendering config
  • Task plugin: profile dropdown fails when creating/editing scheduled tasks

Fix

Change ORDER BY ordering ASC to ORDER BY id ASC (or title ASC) in both files.

## Summary Migration `01.43.33.sql` dropped the `ordering` column from `#__mokosuitebackup_profiles`. Two plugin form XMLs still reference it, causing SQL errors: 1. `plg_content_mokosuitebackup/mokosuitebackup.xml:62` — `ORDER BY ordering ASC` 2. `plg_task_mokosuitebackup/forms/run_profile.xml:14` — `ORDER BY ordering ASC` ## Severity **Critical** — breaks profile dropdown rendering in content plugin config and scheduled task creation/editing. ## Impact - Content plugin: profile dropdown fails when rendering config - Task plugin: profile dropdown fails when creating/editing scheduled tasks ## Fix Change `ORDER BY ordering ASC` to `ORDER BY id ASC` (or `title ASC`) in both files.
Author
Owner

Branch created: feature/180-fix-order-by-ordering-asc-on-profiles-ta

git fetch origin
git checkout feature/180-fix-order-by-ordering-asc-on-profiles-ta
Branch created: [`feature/180-fix-order-by-ordering-asc-on-profiles-ta`](https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteBackup/src/branch/feature/180-fix-order-by-ordering-asc-on-profiles-ta) ```bash git fetch origin git checkout feature/180-fix-order-by-ordering-asc-on-profiles-ta ```
Author
Owner

Confirmed in 02.56.05 — keep open.

Both forms still ORDER BY ordering ASC while migration sql/updates/mysql/01.43.33.sql drops that column on upgraded sites:

  • plg_task_mokosuitebackup/forms/run_profile.xml:14
  • plg_content_mokosuitebackup/mokosuitebackup.xml:62

Fix: change to ORDER BY id ASC.

Additional inconsistency worth fixing together: install.mysql.sql:91 still defines ordering INT(11) in the profiles CREATE, so a fresh install still has the column and masks the bug — only upgraded sites (past 01.43.33) hit it. Recommend removing ordering from install.mysql.sql as well so fresh and upgraded schemas match.

Confirmed in 02.56.05 — keep open. Both forms still `ORDER BY ordering ASC` while migration `sql/updates/mysql/01.43.33.sql` drops that column on upgraded sites: - `plg_task_mokosuitebackup/forms/run_profile.xml:14` - `plg_content_mokosuitebackup/mokosuitebackup.xml:62` Fix: change to `ORDER BY id ASC`. **Additional inconsistency worth fixing together:** `install.mysql.sql:91` still defines `ordering INT(11)` in the profiles CREATE, so a *fresh* install still has the column and masks the bug — only *upgraded* sites (past 01.43.33) hit it. Recommend removing `ordering` from `install.mysql.sql` as well so fresh and upgraded schemas match.
Sign in to join this conversation.