Ignore:
Timestamp:
06/14/2026 05:25:41 PM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
8afbdd6
Parents:
7963a6e
Message:

fix: all site-scoped links use siteUrlBase in hub mode

Follow-up on the feed fix (612b102). The same class of bug was still present in:

  • post.ejs: tag, edit, delete links + comment forms + comment delete + login-next -> now with siteUrlBase prefix
  • bottom-tab.ejs: "Write" FAB (/posts/new)
  • home.ejs: empty-state "Write your first post"
  • profile-sheet.ejs: "New post"
  • search.ejs: search form action

Without the prefix these fell back to the primary site in hub (404 /
wrong site). In solo siteUrlBase is empty -> behavior unchanged.

Co-Authored-By: Claude <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/partials/profile-sheet.ejs

    r7963a6e rb94c08e  
    2121                 : (user.role === 'editor') ? 'redacteur'
    2222                 : '';
     23// Site-scoped link (post-aanmaken) heeft in hub de /user/<slug>-prefix nodig.
     24const _base = (typeof siteUrlBase !== 'undefined' && siteUrlBase) ? siteUrlBase : '';
    2325%>
    2426
     
    6466      <% if (_canPost) { %>
    6567      <li role="none">
    66         <a href="/posts/new" class="profile-sheet-item" role="menuitem" data-close-sheet
    67            hx-get="/posts/new?partial=1" hx-target="#pcms-main" hx-swap="innerHTML"
    68            hx-push-url="/posts/new" hx-indicator="#pcms-loading">
     68        <a href="<%= _base %>/posts/new" class="profile-sheet-item" role="menuitem" data-close-sheet
     69           hx-get="<%= _base %>/posts/new?partial=1" hx-target="#pcms-main" hx-swap="innerHTML"
     70           hx-push-url="<%= _base %>/posts/new" hx-indicator="#pcms-loading">
    6971          <svg class="psi-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 20h9"/><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"/></svg>
    7072          <span class="psi-label">Nieuwe post</span>
Note: See TracChangeset for help on using the changeset viewer.