Skip to content

Last picture overriden on reload #9036

@pgrange

Description

@pgrange

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

In some blog entries with several pictures, the last picture is overridden by the previous picture when reloading the page.

I've setup the smallest blog entry that I've been able to create that will reproduce the issue in this project: https://github.com/pgrange/docusaurus-final-picture

I'm sorry I did not see https://new.docusaurus.io/ before trying to qualify the issue, I hope you can work with that.

The project has been created with:

npx create-docusaurus@latest docusaurus-final-picture classic

Then the following commit creates a blog entry which exhibits the issue.

The issue can be seen on the following page (when running locally): http://localhost:3000/blog/2023-05

Reproducible demo

http://localhost:3000/blog/2023-05 (sorry)

Steps to reproduce

git clone https://github.com/pgrange/docusaurus-final-picture.git
cd docusaurus-final-picture
yarn
yarn build
yarn serve

Then go to the following page: http://localhost:3000/blog/2023-05

You should see three images, a 1, a 2 and a 3.

Click reload.

Expected behavior

You should still see three images, a 1, a 2 and a 3 after reloading the page.

Actual behavior

You see a 1, a 2 and a 2 again. The 3 has been replaced by the 2.

Your environment

  • Public source code: https://github.com/pgrange/docusaurus-final-picture
  • Public site URL: none
  • Docusaurus version used: 2.4.1
  • Environment name and version (e.g. Chrome 89, Node.js 16.4): Safari 16.5, Node.js v19.8.1
  • Operating system and version (e.g. Ubuntu 20.04.2 LTS): MacOs 13.4

Self-service

  • I'd be willing to fix this bug myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error in the Docusaurus core causing instability or issues with its executionclosed: wontfixA fix will bring significant overhead, or is out of scope (for feature requests)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions