Skip to content

Fix validation findings and remove the German language pack - #5

Merged
bonelifer merged 1 commit into
mainfrom
validation-fixes
Oct 19, 2026
Merged

bonelifer merged 1 commit into
mainfrom
validation-fixes

Conversation

@bonelifer

Copy link
Copy Markdown
Contributor

Fixes the findings from a validation pass in the style of phpBB.com's extension checks. None were security problems. This also removes the German translation, which only covered one of the three language files.

Fixes

  • Edit notice. The "Last edited by" usernames were loaded with one query per edited post, and that query read every editor on the board. They now come from one query for the posts on the page. The notice also showed the raw key EDITED_TIMES_TOTAL, because the news page never loaded phpBB's viewtopic language file. It now does.

  • Profile fields. Fields set to show on topic pages never appeared on news items: the code read a variable nothing set. They now show in the poster line when "Show user information" is on, the same way viewtopic picks them.

  • Unused code removed:

    • contact links (PM, email, Jabber)
    • online status
    • joined date
    • the controller's post and contact icon images
    • the unapproved/deleted post forms (the news page only lists approved topics)
    • a few other template variables nothing read
    • the request service that newspage was given but never used

    Kept for other styles and event templates: the comment count, forum name and link, and rank image address.

  • Templates. All templates now use Twig syntax only; before, they mixed Twig and the old phpBB syntax. Language strings used in HTML attributes are escaped. The "in forum" byline link is now built in PHP.

  • Who is online. A news category is named only when the forum exists and the viewer may see it, as viewonline.php does for forums. Otherwise it shows "Viewing news", or the archive month when there is one.

  • Version in config. A new migration removes newspage_mod_version, which the 1.0 and 1.1 migrations stored. phpBB reads the version from composer.json.

  • license.txt now matches the extension skeleton's text.

  • Language. Removed the unused NEWS_GO_TO_TOPIC, NEWS_READ_FULL and NEWS_READ_HERE keys, and language/de/. The German TODO item is gone too.

Testing

Claude ran:

  • Unit tests: pass on phpBB 3.3.x (168 tests) and master (168 tests). This includes three new Who is online cases: a hidden forum, a hidden forum with an archive month, and a forum that no longer exists. The 17 PHPUnit deprecations on master are the same as on main.
  • Guest pages: on the seed-forum 3.3 and 4.0 test boards, Claude saved 7 news pages per board as a guest before and after the change. All 14 are identical apart from the asset version number.
  • Logged in as the test admin, on both boards:
    • profile field shown
    • edit notice names the editor and reason
    • post buttons and the byline forum link render
    • single news page works
    • ACP settings page saves
    • Who is online names the category a guest is viewing
    • no JavaScript errors
  • Migration: runs on both boards. On 3.3, Claude also checked disable → purge → enable.

Investigated and written by Claude on behalf of William Jacoby (bonelifer).

- Load the edit notice's usernames in one query instead of one per post, and
  load viewtopic's language so the notice is no longer shown as a raw key.
- Show the posters' profile fields, which never appeared because the code
  read a variable nothing set.
- Remove code and template variables nothing used: contact links, online
  status, joined date, the controller's icon images, the unapproved/deleted
  post forms and the unused request service.
- Write the templates in Twig only, with language strings in HTML
  attributes escaped.
- Who is online names a news category only when the viewer may see the forum.
- Remove the newspage_mod_version config value with a new migration.
- Replace license.txt with the extension skeleton's text.
- Remove the unused NEWS_GO_TO_TOPIC, NEWS_READ_FULL and NEWS_READ_HERE keys
  and the incomplete German translation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bonelifer
bonelifer merged commit 53b3167 into main Oct 19, 2026
57 checks passed
@bonelifer
bonelifer deleted the validation-fixes branch October 19, 2026 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant