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

Unique ID issues #247

Open
knakaj opened this issue Jul 8, 2022 · 1 comment
Open

Unique ID issues #247

knakaj opened this issue Jul 8, 2022 · 1 comment

Comments

@knakaj
Copy link

knakaj commented Jul 8, 2022

What Course are you in
thinkcspy

Describe the bug
When running pretext build web, a lot of @xml:id values in different sections are not unique.

Screen Shot 2022-07-08 at 3 16 18 PM

@bnmnetp
Copy link
Member

bnmnetp commented Jul 8, 2022

Yes, it looks like many of them are id1. Further it looks like whatever is generating these ids is creating them without knowing about any of the other files. within a file it looks like we have id1, id2, id3 etc but we may have multiple id1s in several files.

I have an idea...

In the fixIds.py script we can

  1. Create a counter variable at the top of the inner loop. (so we are essentially counting files)
  2. then we can look for xml:id="id1" , xml:id="id2", etc, etc, in each file and make them look like: f"xml:id="{counter}_id1"

that should make them all unique. We should not worry about this too much as I don't think any of these are actually referenced. But it will clear out all of the error messages about duplicate ids

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants