Skip to content

Publish feature/update already published static site - #2922

Draft
code4candy wants to merge 10 commits into
feature/collectives-publishfrom
publish-feature/update-already-published-static-site
Draft

code4candy wants to merge 10 commits into
feature/collectives-publishfrom
publish-feature/update-already-published-static-site

Conversation

@code4candy

@code4candy code4candy commented Nov 7, 2026 •

Copy link
Copy Markdown

📝 Summary

Description

Currently the frontend only calls createStaticSite in POST (src/components/Nav/CollectivePublishModal.vue:237).
If a record with the same static-site-id and slug already exists, having the status "published". The static site should call updateStaticSite
The endpoint already exists: PUT .../static-sites/{id} → StaticSiteService::update but is not used by the frontend yet.
Currently, if you call createStaticSite a second time aou get the error "slug already in use" because of a unique-constraint.

  • List all static sites - as simple as possible - just repeat existing banner
  • show last published slug & selection as default

(GUI - Design will be addressed in other issue)

Acceptance Criteria

  • 1. Changing an existing, published static site is possible (update)
  • 2. No error toast on updating an existing static site.
  • 3. Allow multiple static sites with different slug
  • 4. List all published static sites in publish modal

Dev Notes:

Some refactorings were necessary:

  • the build-status-callback from the external publish service is now answered with an empty body (instead of the static site object), due to information hiding
  • API responses do not contain the staticSiteId anymore, also due to information hiding
  • status "published" without a valid publish_url results now to 400

New:

  • Static Site Model has now two new fields lastError und publishedAt - to be able to keep the information of an existing publishing error and not to loose the information about an former successful publication. Also shown in the publish modal.
event status last_error published_at / published_url
Update startet pending → provided to null unchanged
Callback published published null updated
Callback failed / SSG declines request failed error message unchanged

🖼️ Screenshots

Update failed previously - old version still online:
Bildschirmfoto vom 2026-11-07 23-56-05

Update successfull:
Bildschirmfoto vom 2026-11-07 23-56-37

Klick on "New Website":
Bildschirmfoto vom 2026-11-07 23-58-04

Successfully created new website:
Bildschirmfoto vom 2026-11-07 23-59-08

🚧 TODO

  • ...

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests
  • Documentation (README or documentation) has been updated or is not required

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI tools
  • The AI-generated content was reviewed, comprehended and tested by a human

Melpo added 10 commits November 2, 2026 16:31
Signed-off-by: Melpo <melpomene@posteo.net>
Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Melpo <melpomene@posteo.net>
Assisted-by: ClaudeCode:claude-opus-5-5
…keep failing

Signed-off-by: Melpo <melpomene@posteo.net>
Assisted-by: ClaudeCode:claude-opus-5-5
…lish URL

Signed-off-by: Melpo <melpomene@posteo.net>
Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Melpo <melpomene@posteo.net>
Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Melpo <melpomene@posteo.net>
Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Melpo <melpomene@posteo.net>
Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Melpo <melpomene@posteo.net>
Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Melpo <melpomene@posteo.net>
Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Melpo <melpomene@posteo.net>
Assisted-by: ClaudeCode:claude-opus-5-5
@code4candy
code4candy requested a review from kjoscha November 7, 2026 23:07

This branch has not been deployed

No deployments
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