Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Placeholders %pagenumber% and %pagecount% not working #1641

Open
DavidKarstensTruppHR opened this issue Dec 22, 2020 · 2 comments
Open

Placeholders %pagenumber% and %pagecount% not working #1641

DavidKarstensTruppHR opened this issue Dec 22, 2020 · 2 comments
Labels
notstale Stop the stale bot from processing

Comments

@DavidKarstensTruppHR
Copy link

The %pagenumber% and %pagecount% placeholders do not appear to be working. They both continuously generate the value 1, regardless of what page contains the object using the placeholder.

Start a new document, then enable page separators (View > Page View).

Place a text object on the visible page and fill it with the contents %pagecount%. Right-click and choose the Edit Data option, then enable the Placeholders option. With the Placeholders option enabled, the text object (when not editing the contents) should show the number 1.

Add a second text object and drag it across the edge of the page to cause a second page to be created. Configure the second text object in the same way (contents %pagecount%, Placeholder enabled). The number 1 appears on the second text object, as well.

Print the document - the number 1 on both pages.

I'm using the online tool at diagrams.net, currently 13.8.6.

@davidjgraph
Copy link
Collaborator

Please could you close all diagrams.net tabs, load https://app.diagrams.net/?offline=0 to clear your cache, close that tab and open a new one. That should update you to a more recent version. Does the problem still happen?

@DavidKarstensTruppHR
Copy link
Author

Hello David.

With the cache cleared, I now see version 14.1.1, but the behavior is still the same. Below is the complete XML from the Extras > Edit Diagram menu.

Note that including headers/footers shows the correct page number and number of pages (1/2 and 2/2), while %pagenumber% and %pagecount% are still both 1 for all pages on the same document.

Are you able to use these placeholders successfully using the web-based app at diagrams.net?

<mxGraphModel dx="1408" dy="780" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0" extFonts="Permanent Marker^https://fonts.googleapis.com/css?family=Permanent+Marker"> <root> <mxCell id="0" /> <mxCell id="1" parent="0" /> <object label="&lt;span style=&quot;text-align: right&quot;&gt;Page %pagenumber% of %pagecount%&lt;/span&gt;" placeholders="1" id="rcTtCaBVkUmVItbQ2x3F-1"> <mxCell style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1"> <mxGeometry x="405" y="340" width="295" height="20" as="geometry" /> </mxCell> </object> <object label="&lt;span style=&quot;text-align: right&quot;&gt;Page %pagenumber% of %pagecount%&lt;br&gt;&lt;/span&gt;" placeholders="1" id="rcTtCaBVkUmVItbQ2x3F-2"> <mxCell style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1"> <mxGeometry x="1080" y="340" width="270" height="20" as="geometry" /> </mxCell> </object> </root> </mxGraphModel>

@stale stale bot added the wontfix label Jul 11, 2021
@davidjgraph davidjgraph added the notstale Stop the stale bot from processing label Jul 12, 2021
@stale stale bot removed the wontfix label Jul 12, 2021
@jgraph jgraph deleted a comment from stale bot Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notstale Stop the stale bot from processing
Projects
None yet
Development

No branches or pull requests

2 participants