Skip to content

ARS Migration Plugin

Brent Cordis edited this page Jul 18, 2026 · 1 revision

ARS Migration Plugin (plg_system_cwmarsmigrate)

A small server-side Joomla plugin that runs on the CWM download site (the Akeeba Release System / ARS server), not on Proclaim sites. It lets churches that installed the old standalone com_proclaim component receive updates and auto-migrate to the current pkg_proclaim package through the normal one-click updater.

TL;DR — It injects a com_proclaim (component) entry at the top of the stream‑1 update feed. Stranded component-only sites finally match an update; applying it downloads the same package ZIP and migrates them. Keep it enabled until the fleet has migrated, then disable it.

The problem it solves

Proclaim 10.3+ ships as the pkg_proclaim package. The ARS update stream advertises updates for element = pkg_proclaim.

Joomla matches an available update to an installed extension on element + type + client_id:

Site installed Registered extension type client_id
The package (10.3+) pkg_proclaim package 0 (site)
The old standalone component com_proclaim component 1 (administrator)

A site that installed only the standalone component has no pkg_proclaim registered, so the pkg_proclaim update never matches — those sites see "no updates" forever and are stranded on an old version.

How it works

The plugin subscribes to onAfterRender and only acts on the ARS update-stream request for the configured stream:

option=com_ars & view=update & task=stream & format=xml & id=<stream_id>

For that response it:

  1. Finds the newest pkg_proclaim <update> block in the feed (highest version via version_compare).
  2. Clones it and re-types the clone so Joomla will match it against a component:
    • <element>pkg_proclaim</element> → <element>com_proclaim</element>
    • <type>package</type> → <type>component</type>
    • <client>site</client> → <client>administrator</client> (components are client_id = 1; Joomla parses <client> by name, so administrator is required — a numeric 1 does not match)
  3. Inserts the clone at the top of the feed, immediately after <updates>.

The download URL and checksums are left untouched — they already point at the same pkg_proclaim ZIP. So when a component-only site applies this "component update", Joomla downloads the package and installs it, migrating the site from component to package. Joomla decides install-vs-package by the downloaded ZIP's own manifest, not by the feed's <type>.

Why it must be inserted first (the critical detail)

Joomla's Update parser keeps only a single $latest update per feed — the highest version — and on a version tie the first block in the feed wins (it only replaces $latest when a later block is strictly greater).

The injected com_proclaim entry shares its version (e.g. 10.3.3) with the pkg_proclaim entry ARS lists first. If the clone is appended, the package block wins the tie and the component block is discarded → component-only sites still get nothing. Inserting the clone before the equal-version package block makes it win selection.

The feed may also contain a block with version="Developers Package". It is harmless here: it requires a newer PHP than most sites run, so Joomla routes it to the "requires newer platform" warning bucket rather than treating it as $latest.

Effect on package sites

Because the component entry wins the version tie, every site polling the stream — including current package sites — is offered the update as this component entry rather than the pkg_proclaim entry. Applying it re-installs the package, which is a clean package-over-package update.

Verified end-to-end on a real package site: applying the offered component update updated both pkg_proclaim and com_proclaim to the new version and ran the schema migrations. Same end result as a normal package update — only the update row's Type column reads "Component" while the plugin is active.

Configuration

Plugin parameters (Extensions → Plugins → System - CWM ARS Proclaim Migration):

Field Default Purpose
Update stream ID 1 The ARS stream whose XML output receives the injected entry (the stream your deployed sites poll).
Source element pkg_proclaim The package element already served in the stream, cloned from.
Target element com_proclaim The component element to advertise the migration update for.

Deployment (on the ARS / download server)

  1. Extensions → Install → Upload Package File → upload plg_system_cwmarsmigrate.zip (installs as an upgrade over any prior version and stays enabled).

  2. Confirm it is enabled and the stream ID matches the stream your sites poll (1).

  3. Verify the feed — fetch the stream and confirm the injected block is present and first:

    .../index.php?option=com_ars&view=update&task=stream&format=xml&id=1
    

    The <element>com_proclaim</element> / <type>component</type> / <client>administrator</client> block should appear before the first pkg_proclaim block.

  4. On a component-only test site: System → Clear Cache (the com_installer cache), then Extensions → Update → Check For Updates — the new version should now be offered.

Lifecycle

Keep the plugin enabled while any site still runs the standalone component. Once the fleet has migrated (every site now has pkg_proclaim), disable the plugin — package sites then resume updating through the normal pkg_proclaim entry, and the update row's Type reads "Package" again.

Notes

  • The plugin lives in its own source tree (plg_system_cwmarsmigrate/), separate from the Proclaim component repo, because it is deployed to the download server rather than shipped inside the package.
  • It is purely additive and read-mostly: it rewrites only the outgoing XML for the one matching stream request and changes nothing in ARS or its database.

See also

  • Release-Process — how a Proclaim version is built, validated, and published to ARS.
  • Upgrading-From-9x — the 9.x → 10.x migration path Proclaim enforces on install.

Clone this wiki locally