Skip to content

Admin Editor Preview Loads Wrong or Empty Content #4

Open
@Programming-Sai

Description

@Programming-Sai

Description:
The Admin Editor Preview page currently pulls blog post content directly from localStorage. However:

  1. If localStorage is empty (e.g. after reload or new browser), no content is shown.
  2. If localStorage has stale or unrelated post content, it incorrectly displays that instead of the correct post.

Expected Behavior:

  • The preview should first attempt to get the correct content based on the current post (e.g. via slug).
  • If no relevant content exists in localStorage, it should fallback to fetching from the backend.
  • It must validate that the content in localStorage matches the currently previewed post (e.g. compare slugs).

Steps to Reproduce:

  1. Save or preview one post.
  2. Open a different post's preview page.
  3. Observe that content from the previous post appears (or nothing appears if localStorage is empty).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions