Files
summercms/.planning/todos/pending/journal-author-profile-fields.md
Jakub Zych 3f9d3b4f11 docs: sync todos with g15office and map phases to milestone tasks
Tag the 17 open todos with their g15office task IDs, close 7 todos that
are already done or promoted to Phase 16.3, and record the sync rules
and the phase-to-task map in .planning/G15OFFICE.md.
2026-10-11 02:01:50 +02:00

2.0 KiB

created, title, area, severity, files, g15office
created title area severity files g15office
2026-10-09T11:22:00Z Expose author subtitle, description and avatar on the Journal author API plugins minor
../sm-journal-plugin/controllers/api/authors.go
modules/lagoon/backend_admin_migrations.go
esrp4qtx

Problem

The WinterCMS author component (journalAuthor) shows metadata.subtitle, and its SEO add-on reads the author avatar and a description. The framework's backend_users table has no metadata column and no avatar attachment, so the D-20 endpoint GET /_journal/api/v1/authors/{author} exposes only id, slug, first_name and last_name. An author page built on it has no subtitle, bio or picture, and the import into backend_users creates authors without them.

Solution

Make a framework decision on backend user profile storage first. Either add a metadata JSON column plus an avatar attachment on backend users (in modules/lagoon/backend_admin_migrations.go and the admin user form), or give the journal plugin its own author profile table edited in the admin. Then add the new keys to the author payload additively (authorProfile in controllers/api/authors.go), document them in the plugin README, and extend TestJournalAuthorProfile's exact key set. Never emit a key without a storage source.

Progress (2026-10-09, quick task 261009-mys)

The framework decision is made and shipped (commits 143eca5, 64d21c8, 4f1cda3, 89611ea): backend_users.metadata holds the subtitle under subtitle (WinterCMS-compatible), and the avatar is a WinterCMS-style Backend\Models\User avatar attachOne, both edited on the My account page. Plugins read them via cabana.BackendUser.Subtitle() and cabana.BackendUserAvatar().

Still open:

  • an editor for the author description (would fit metadata.description);
  • subtitle and avatar keys in sm-journal-plugin's authorProfile, README and TestJournalAuthorProfile;
  • the author import filling metadata and copying avatar file rows.