# Note ID and Card ID are mixed up

**URL:** <https://forums.ankiweb.net/t/note-id-and-card-id-are-mixed-up/1445>\
**Category:** Help\
**Created:** [July 27, 2020, 7:50am UTC](https://forums.ankiweb.net/t/note-id-and-card-id-are-mixed-up/1445 "2020-07-27T07:50:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hengiesel](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/hengiesel/32/920_2.png) [@hengiesel](https://forums.ankiweb.net/u/hengiesel)\
**Post date:** [July 27, 2020, 7:50am UTC](https://forums.ankiweb.net/t/note-id-and-card-id-are-mixed-up/1445/1 "2020-07-27T07:50:12Z")

</div>

![wrong_cardid_noteid](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/1X/bca602fa61a9e976fde83922ad20a7d38221299a.jpeg)

In the picture, you can see a note ID, and card ID, however they are mixed up.  
The ID shown next to card ID is actually the note ID, which I can confirm in the browser typing “nid:theid”, or “cid:theid”.

I am on Anki version Version 2.1.28 (7d8818f8), on macOS 10.15.5 (19F101)

---

<div class="post-metadata">

**Author:** ![abdo](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/abdo/32/654_2.png) [@abdo](https://forums.ankiweb.net/u/abdo)\
**Post date:** [July 27, 2020, 10:01am UTC](https://forums.ankiweb.net/t/note-id-and-card-id-are-mixed-up/1445/2 "2020-07-27T10:01:23Z")

</div>

I can confirm the issue.

---

<div class="post-metadata">

**Author:** ![abdo](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/abdo/32/654_2.png) [@abdo](https://forums.ankiweb.net/u/abdo)\
**Post date:** [July 27, 2020, 10:12am UTC](https://forums.ankiweb.net/t/note-id-and-card-id-are-mixed-up/1445/3 "2020-07-27T10:12:32Z")

</div>

I could pinpoint the issue to these two lines of code:

```auto
stats.push((i18n.tr(TR::CardStatsNoteId).into(), cs.cid.0.to_string()));
stats.push((i18n.tr(TR::CardStatsCardId).into(), cs.nid.0.to_string()));

```

> <https://github.com/ankitects/anki/blob/500ec7da0e483a415acde929e74dc9096cd88a83/rslib/src/stats/card.rs#L192>

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [July 28, 2020, 3:03am UTC](https://forums.ankiweb.net/t/note-id-and-card-id-are-mixed-up/1445/4 "2020-07-28T03:03:51Z")

</div>

Thanks for the report; fixed in the stable 2.1.29 release.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/1X/8f1279ababc5879d54e4838989f606cfe55af8c7.jpeg) [@system](https://forums.ankiweb.net/u/system)\
**Post date:** [May 1, 2023, 5:39am UTC](https://forums.ankiweb.net/t/note-id-and-card-id-are-mixed-up/1445/5 "2023-05-01T05:39:01Z")

</div>

Closed on May 1, 2023, 5:39am UTC


