integreat-cms
integreat-cms copied to clipboard
Sometimes no broken links found after cloning region
Motivation
After a region has been cloned, sometimes the analytics section does not show broken links.
Proposed Solution
Find out why they are not automatically created
Alternatives
manually starting the process
Additional Context
If #1383 is being implemented as well, the search should be triggered after the links have been updated.
I cannot reproduce this. Similar to when new pages are created and the links are automatically recognized without manually triggering the scan, links should always be updated when the translation's save()
-method is called. And, when cloning regions, this is the case:
https://github.com/digitalfabrik/integreat-cms/blob/f027b8ff07a10cdbbf8b733431d36f15d74887cf/integreat_cms/cms/forms/regions/region_form.py#L567
The only thing I can imagine which goes wrong here is some kind of race condition - since only links in the latest versions should be recognized, maybe creating too many versions too quickly confuses the scanner.
If I create enough translations with many links, I can reproduce this behavior (not that there are no links at all, but that there are links from outdated versions - and if these do not contain links at all, I might also reproduce the behavior described in the issue). It is indeed some kind of race condition between the post save signals and the creation of new translation elements.