Skip to content

[FIX] Forum: Recalculate counters of copied forums [release_10] - #12468

Merged
mjansenDatabay merged 4 commits into
ILIAS-eLearning:release_10from
marvin-matuschek:fix/10/forum-copy-counters
Dec 4, 2026
Merged

mjansenDatabay merged 4 commits into
ILIAS-eLearning:release_10from
marvin-matuschek:fix/10/forum-copy-counters

Conversation

@marvin-matuschek

@marvin-matuschek marvin-matuschek commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Copying a forum kept the source thread and posting counters and then incremented them again for every new thread and post. The thread overview therefore showed empty pages that repeated the first page. A migration recalculates both counters for existing forums.

This bug also exists in ILIAS 11, 12 and trunk.
I also created PRs containing this fix for:
release_11
release_12
trunk

@marvin-matuschek
marvin-matuschek force-pushed the fix/10/forum-copy-counters branch 3 times, most recently from c083da2 to b28e44a Compare November 23, 2026 15:28
@marvin-matuschek
marvin-matuschek force-pushed the fix/10/forum-copy-counters branch from b28e44a to 5fa6704 Compare November 25, 2026 12:37
@marvin-matuschek marvin-matuschek changed the title [FIX] Forum: Recalculate counters of copied forums [FIX] Forum: Recalculate counters of copied forums [release_10] Nov 25, 2026
@mjansenDatabay mjansenDatabay added bugfix php Pull requests that update Php code labels Nov 26, 2026
Copying a forum kept the source counters and then incremented them again for every new thread and post. The thread overview then showed empty pages. A migration recalculates the counters of existing forums.
…ated counts

Join thread and post totals once and store missing counts as zero.
@marvin-matuschek
marvin-matuschek force-pushed the fix/10/forum-copy-counters branch from 5fa6704 to 1c2fbcd Compare November 26, 2026 09:56
The copy relied on the thread's post counter, which is never loaded and always 0, so every copied thread got a visible first posting. Whether the source thread has a first visible posting now decides this instead. The copy also gets its own creation date and the copying user as author, instead of the source forum's values.
@marvin-matuschek
marvin-matuschek force-pushed the fix/10/forum-copy-counters branch from 54cebff to c812ea1 Compare December 2, 2026 16:10
@mjansenDatabay
mjansenDatabay merged commit b3a2655 into ILIAS-eLearning:release_10 Dec 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants