Skip to content

Move an article to a new name - #63

Merged
bonelifer merged 2 commits into
mainfrom
move-article
Oct 14, 2026
Merged

bonelifer merged 2 commits into
mainfrom
move-article

Conversation

@bonelifer

Copy link
Copy Markdown
Contributor

An article's address was fixed forever once created (the TODO's "Move/rename an article"). This builds it as decided on 10/13/2026.

Moving

  • Move article under Moderator controls in the version history. The form takes the new name and the title, and has "Leave a redirect at the old name", ticked by default.
  • Every version, its uploaded files and its watchers move to the new name, in one transaction. The search index is keyed on versions, so it follows them and is then refreshed.
  • With the box ticked, the old name gets a live redirect version ("Moved to …"), and links in other articles keep working through it. Links aren't rewritten.
  • An article can be moved back over redirects that point to it, which are removed. Any other article or pending version at the new name blocks the move.
  • Names follow the same rules as [[links]]: not empty, at most 255 characters, no leading or trailing space, none of [ ] | < > " # ? % / \.

Templates

  • Template lookup now follows a redirect to another Template: page, one step only. Articles using a moved template keep showing it if a redirect was left.
  • Moving a template that articles use, directly or through a template name that redirects to it, shows how many, and needs a second, explicit confirmation.

Permission

  • New u_wiki_move ("Can move an article to a new name"). Like the other wiki moderation permissions, the migration gives it to whoever has m_.

Also

  • Unit tests for the name rules. The README describes moving, and the item is removed from docs/TODO.md.

Claude tested this on a seed-forum board with the wiki fixtures, as wiki_moderator:

  • moving an article with two versions, two files and a watcher, with a redirect, then moving it back over its own redirect without one;
  • the taken, invalid and same-name errors;
  • moving a used template: the warning, refusal without the second confirmation, and the article still showing the template through the redirect;
  • a guest being refused.

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

🤖 Generated with Claude Code

bonelifer and others added 2 commits October 14, 2026 12:25
Move article, under Moderator controls in the version history, renames
an article's address (and optionally its title). Every version, its
uploaded files and its watchers move in one transaction, and a redirect
is left at the old name unless the box is cleared. An article can be
moved back over its own redirects. Links are not rewritten.

Template lookup now follows a redirect to another template, one step,
so articles using a moved template keep working. Moving a template that
articles use (directly or through a redirect) warns with the count and
needs a second confirmation.

New permission u_wiki_move, given like the other wiki moderation
permissions to whoever has m_.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
templates::source() gained $follow_redirect, so the anonymous subclass in
parser_functions_test.php no longer matched it and PHP stopped with a
fatal error on load.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bonelifer
bonelifer merged commit da0bfce into main Oct 14, 2026
58 checks passed
@bonelifer
bonelifer deleted the move-article branch October 14, 2026 17:36
bonelifer added a commit that referenced this pull request Oct 15, 2026
Cancel on the Move article page (#63) was a link styled as `button2`,
which prosilver only sizes on form buttons, so it rendered smaller than
the Move button and out of line. It's now a form button named `cancel`
that goes back to the article, as in phpBB's own forms.
`docs/images/wiki-move.png` is retaken.

Claude retook the screenshot with phpbb-release-tools' `screenshots.py`,
and clicked Cancel on the seed-forum 3.3 board to check it returns to
the article.

---

Investigated and written by [Claude](https://www.anthropic.com/claude)
on behalf of William Jacoby ([bonelifer](https://github.com/bonelifer)).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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