Additional findings from CB Activity 7.1.1 migration recovery tests on MariaDB 10.11Hello,we performed a series of controlled recovery tests after the CB Activity 7.1.1 update failed. The tests revealed that the problem is not limited to the original SQL alias in the
migration.System environment:
- Joomla: 6.2.0
- Community Builder: 2.12.0
- PHP: 8.4.26
- Database: MariaDB 10.11.18
- Database driver reported by Joomla: MySQL
- Target package:
Code:
plug_cbactivity_7.1.1+2026.10.12.zip
- Previously working CB Activity version: 6.2.0
Original failureThe original package failed with:
Code:
CB Activity Migration (reply_depth) Failed!
Error: Unknown column 'c.reply' in 'SET'
The relevant migration uses an eleven-table self-join:
Code:
UPDATE #__comprofiler_plugin_activity_comments AS c
LEFT JOIN #__comprofiler_plugin_activity_comments AS p1 ...
LEFT JOIN #__comprofiler_plugin_activity_comments AS p10 ...
SET c.`reply` = ...
WHERE c.`parent_id` > 0
The 7.1.1 manifest declares the new column:
Code:
<column name="reply" type="sql:int(11)" default="0" />
The previously installed 6.2.0 manifest does not contain this column.Test 1: Remove the alias from the assignment targetThe assignment was changed from:
Code:
SET c.`reply` = ...
to:
Result:
Code:
CB Activity Migration (reply_depth) Failed!
Error: Unknown column 'reply' in 'SET'
This showed that the problem was not resolved by removing the alias. At this point, the new
column was apparently not available to the migration.Test 2: Add the column conditionally during postflightA guard was added before the migration:
Code:
ALTER TABLE #__comprofiler_plugin_activity_comments
ADD COLUMN IF NOT EXISTS `reply` INT(11) NOT NULL DEFAULT 0
AFTER `parent_id`
The self-join was also replaced with a non-join migration that:
- loads only
and
;
- calculates the reply depth in PHP, up to the original limit of ten;
- writes the results using ordinary single-table
statements in batches.
Result:
Code:
CB Activity Migration (reply_depth_v5) Failed!
Error: Unknown column 'reply' in 'SET'
The installer did not report an error for the preceding
, but
was still unavailable during the following update.Test 3: Move schema preparation to preflightThe column preparation was moved to
, before Community Builder performs its schema synchronization. The guard was repeated in
.A direct availability test was added immediately before the data migration:
Code:
SELECT `reply`
FROM #__comprofiler_plugin_activity_comments
LIMIT 0
Result:
Code:
CB Activity Migration (reply_depth_v6) Failed!
Error: Unknown column 'reply' in 'SELECT'
This confirmed that the column was still unavailable immediately before the data migration.Test 4: Replace cached schema checks with direct physical checksTo rule out cached Community Builder schema metadata, the package used:
Code:
SHOW COLUMNS FROM ...
It then executed a classic, non-conditional:
Code:
ALTER TABLE ...
ADD `reply` INT(11) NOT NULL DEFAULT 0
AFTER `parent_id`
The database operation did not produce an exception. However, the subsequent physical check still could not find the column.Result:
Code:
CB Activity Migration (reply_depth_schema_preflight_v7) Failed!
Error: The reply column is still unavailable after ALTER TABLE.
Test 5: Resolve the physical table and query INFORMATION_SCHEMATo eliminate possible
prefix replacement or schema-cache effects, the physical table name was resolved explicitly:
Code:
np0d7_comprofiler_plugin_activity_comments
Column existence was then checked directly using:
Code:
SELECT COUNT(*)
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = DATABASE()
AND TABLE_NAME = 'np0d7_comprofiler_plugin_activity_comments'
AND COLUMN_NAME = 'reply'
The
operation again returned without a caught exception, but the immediate
check still returned no
column.Result:
Code:
CB Activity Migration (reply_depth_schema_preflight_v8) Failed!
Error: The reply column is still absent from INFORMATION_SCHEMA after
ALTER TABLE on np0d7_comprofiler_plugin_activity_comments.
Recovery resultWe stopped further modifications at this point and reinstalled the original CB Activity 6.2.0 package:
Code:
plug_cbactivity_6.2.0+build.2026.04.16.16.44.21.f05970673.zip
The installation completed successfully.No Activity tables were deleted, and no manual database modifications were performed.ConclusionsThe findings indicate two separate issues.1. The original reply-depth migration is not portable as writtenThe migration uses a deeply nested self-join and assigns to an aliased target:
This fails on the tested MariaDB 10.11 installation.Changing the assignment to an unqualified column or to the physical table-qualified column did not provide a reliable solution in this multi-table update.A safer migration would avoid this self-join update entirely. Possible approaches include:
- calculating depths in application code and updating rows in batches;
- using a temporary materialized result followed by a simple update;
- another migration strategy explicitly tested against MariaDB 10.11 and supported MySQL versions.
2. The
column is not available when the migration runsAlthough
is declared in the 7.1.1 manifest, it is not available during the
migration in this installation path.Tests in both
and
showed that the column could not be reliably observed after an attempted
. Even a direct
Code:
INFORMATION_SCHEMA.COLUMNS
check using the resolved physical table name did not find it.This suggests that the schema update and data migration ordering requires review. It may also be necessary to inspect how the Community Builder installer handles DDL statements, schema synchronization and rollback during a failed nested package installation.Recommended installer changesWe recommend that the corrected release:
- Ensures the
column is physically present before any data migration begins.
- Verifies the physical schema rather than relying only on the extension version.
- Treats failure to create or verify the column as a distinct schema error.
- Replaces the current self-join migration with a MariaDB-compatible strategy.
- Makes the migration idempotent.
- Records an explicit migration-completion marker.
- Does not rely exclusively on:
Code:
version_compare($currentRelease, '7.1.0', '<')
A failed installation may leave files, schema changes, version information or migration state partially updated.
- Supports safe retry after a failed installation.
- Reports the executed migration phase and underlying SQL error separately.
- Tests the complete update path from CB Activity 6.2.0 to 7.1.1 on MariaDB 10.11.
Current operational stateThe site is currently running the successfully restored CB Activity 6.2.0 package. We will not retry the 7.1.1 update until an official corrected package is available.
Best regards, MO