# How find and fix backlink problems?

**URL:** <https://gramps.discourse.group/t/how-find-and-fix-backlink-problems/5124>\
**Category:** Help\
**Created:** [March 15, 2024, 7:36pm UTC](https://gramps.discourse.group/t/how-find-and-fix-backlink-problems/5124 "2024-03-15T19:36:28Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Urchello](https://avatars.discourse-cdn.com/v4/letter/u/c4cdca/32.png) [@Urchello](https://gramps.discourse.group/u/Urchello)\
**Post date:** [March 15, 2024, 7:36pm UTC](https://gramps.discourse.group/t/how-find-and-fix-backlink-problems/5124/1 "2024-03-15T19:36:28Z")

</div>

I have 3 problems which Repair tool can not fix.  
 ![Screenshot from 2024-03-15 21-33-08](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/8/87bf73210ab3fa93ac0c466a6a1d18ea02173bd8.png)  
How to do it manually? Logs dont show the problem.

---

<div class="post-metadata">

**Author:** ![ennoborg](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/ennoborg/32/4659_2.png) [@ennoborg](https://gramps.discourse.group/u/ennoborg)\
**Post date:** [March 15, 2024, 9:27pm UTC](https://gramps.discourse.group/t/how-find-and-fix-backlink-problems/5124/2 "2024-03-15T21:27:16Z")

</div>

What are they? I have one with merging duplicate citations, where 5.2 gives this message:

```python
244496: ERROR: grampsapp.py: line 188: Unhandled exception
Traceback (most recent call last):
  File "/home/enno/gramps/gramps/plugins/tool/mergecitations.py", line 205, in on_merge_ok_clicked
    raise MergeError(
gramps.gen.errors.MergeError: Encountered an object of type Note that has a citation reference.

```

I run it from source, because I don’t trust 5.2 with my work trees yet. And that’s because this error is also not cured by check & repair, and the error message does not give me a clue about the identity of the object that seems to be wrong.

---

<div class="post-metadata">

**Author:** ![Urchello](https://avatars.discourse-cdn.com/v4/letter/u/c4cdca/32.png) [@Urchello](https://gramps.discourse.group/u/Urchello)\
**Post date:** [March 16, 2024, 10:38am UTC](https://gramps.discourse.group/t/how-find-and-fix-backlink-problems/5124/3 "2024-03-16T10:38:47Z")

</div>

@ennoborg where did you read this message? I would like do the same for my 3 cases. Did you add some logs directly in the python scrypt?

---

<div class="post-metadata">

**Author:** ![ennoborg](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/ennoborg/32/4659_2.png) [@ennoborg](https://gramps.discourse.group/u/ennoborg)\
**Post date:** [March 16, 2024, 7:04pm UTC](https://gramps.discourse.group/t/how-find-and-fix-backlink-problems/5124/4 "2024-03-16T19:04:25Z")

</div>

I see this when I run the tool that is supposed to merge duplicate citations. It does that quite well in 5.1.6, where I use it to merge citations that have the same date and vol/page, and are situated under the same source. I sometimes need to merge the sources first, using the automerge from the isotammi tools.

I’ve been too lazy to add extra logging here, because I can’t believe that there is anything wrong with them, since check & repair shows no errors in 5.1.6, and this is the same database, after upgrade.

When I look at the code, it suggests that there is a backlink problem that wasn’t in the original, meaning that it was introduced by the database upgrade. I think that also, because the code of the merge tool itself hasn’t changed.

I need to add that in your message, I can’t see what those 3 problems are, because you didn’t write about those.

---

<div class="post-metadata">

**Author:** ![Urchello](https://avatars.discourse-cdn.com/v4/letter/u/c4cdca/32.png) [@Urchello](https://gramps.discourse.group/u/Urchello)\
**Post date:** [March 16, 2024, 7:06pm UTC](https://gramps.discourse.group/t/how-find-and-fix-backlink-problems/5124/5 "2024-03-16T19:06:52Z")

</div>

Looks like it were progress steps (1), (2), (3).  
I found in code these fragments:

```python
self.progress.set_pass(_('Looking for backlink reference problems') +
                                ' (1)', total)

```

```python
self.progress.set_pass(_('Looking for backlink reference problems') +
                                ' (2)', my_items)

```

```python
self.progress.set_pass(_('Looking for backlink reference problems') +
                                ' (3)', db_items)

```

I thought that there were 3 errors )))

---

<div class="post-metadata">

**Author:** ![Urchello](https://avatars.discourse-cdn.com/v4/letter/u/c4cdca/32.png) [@Urchello](https://gramps.discourse.group/u/Urchello)\
**Post date:** [March 16, 2024, 7:09pm UTC](https://gramps.discourse.group/t/how-find-and-fix-backlink-problems/5124/6 "2024-03-16T19:09:26Z")

</div>

But I also see logging rows like this:

```python
logging.info('Looking for backlink reference problems')

```

But they are not loggend in the terminal. Why? Logging level? How turn on them for installed app? This is not app version for developers.

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [March 16, 2024, 7:28pm UTC](https://gramps.discourse.group/t/how-find-and-fix-backlink-problems/5124/7 "2024-03-16T19:28:29Z")

</div>

Details of our [logging system](https://gramps-project.org/wiki/index.php/Logging_system) are available in the wiki. There is also a python [logging Howto](https://docs.python.org/3/howto/logging.html) which gives more information.

---

<div class="post-metadata">

**Author:** ![lmstearn](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/lmstearn/32/2879_2.png) [@lmstearn](https://gramps.discourse.group/u/lmstearn)\
**Post date:** [March 26, 2024, 6:18am UTC](https://gramps.discourse.group/t/how-find-and-fix-backlink-problems/5124/8 "2024-03-26T06:18:55Z")

</div>

Thanks, get it here too, looks like a progress informational, couldn’t find too background on back links per se.  
@Nick-Hall: what are your thoughts on making the console dockable, if nothing else but to make the C & R output more of a scrollathon? 😄

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/2ac1e712b7adf612e31ca08a55419f4cf37c0158.png) [@system](https://gramps.discourse.group/u/system)\
**Post date:** [April 25, 2024, 2:06pm UTC](https://gramps.discourse.group/t/how-find-and-fix-backlink-problems/5124/10 "2024-04-25T14:06:15Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
