Skip to content

page-name maps to wrong diagrams with current drawio versions #106

@vhdumann

Description

@vhdumann

Describe the bug
I have a drawio file with 6 diagrams on different pages. Each page has a different name.
After renaming the pages and updating the page-name attribute, the generated sphinx documentation does not show the correct image anymore. The HTML shows the same image for the first 2 usages. The other 4 usages are still correct.

I then switched from page-name to page-index, which seemed to help at first. Now, on a different system (a docker container), the same problem occurs with indices, too. On my local setup it is still working.

In the build outputs _images and doctrees I can see 6 svg output files. There I can also see that the missing image (which instead shows the duplicate in the HTML) is never generated. Instead, a svg file for the 7th page, which is not yet used in the documentation, is generated. But this 7th page is yet unused in the rst files and does not appear in the HTML output.

To Reproduce
Steps to reproduce the behaviour:

  1. Create drawio file with multiple pages
  2. Integrate into sphinx documentation with sphinxcontrib-drawio
  3. View the HTML
  4. See wrong images (not deterministic)

Expected behaviour
page-index and page-name export the correct svg file.

Screenshots
I use sphinxcontrib-drawio like this:

.. drawio-figure:: 00_example.drawio
    :format: svg
    :alt: Sphinxcontrib Example
    :page-index: 6
    :align: center
    :name: fig_example

    An example with multiple pages

Setup Information

  • OS: Linux
  • Python: 3.12.6
  • Version: 0.0.17

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