Missing Galley Links in some Issues

Greetings,

I think we found the root problem but need some insight to know how to solve it (probably the field and table to be updated).

Messing around a little bit, we identify that a custom component in Control Panel > WorkFlow → Article Component might be related because it follows the behaviour we are having. You can reproduce this behaviour following the next steps:
Option 1:

  1. Create a custom component in Control Panel > WorkFlow → Article Components
  2. Create/assign a galley file to the new component
  3. Check the issue/article view page and check that the link is there (it is)
  4. Delete the new custom component from Control Panel > WorkFlow → Article Components (No warnings for related articles)
  5. Check the issue/article view page and check that the link is there (it is not)
  6. Create the custom component again
  7. Check the issue/article view page and check that the link is there (it is not. Probably because the new component is assigned with a new id)

Option 2:

  1. Create/assign a galley file to the a default component
  2. Check the issue/article view page and check that the link is there (it is)
  3. Delete the default component from Control Panel > WorkFlow → Article Components (No warnings for related articles)
  4. Check the issue/article view page and check that the link is there (it is not)
  5. Restore default components
  6. Check the issue/article view page and check that the link is there (it is there. Probably because the default component is assigned with the same id)

The second option for us, identify another issue. I can’t restore the default components for one of the two journals. Probably because is an old journal with custom components that are using the same id of one of the default components, and when it tries to restore them it clash with the id of the custom and can’t do the job.

Can you please try to reproduce the problem to confirm the issue? If is true, can you point me out which table is related to the Journal Article Components, and which table has the relation [galley id] <-> [article component id]? Knowing this, I can update the relation to an existing journal component and solve the problem.

If this is the problem, it would be nice to put a warning/restriction if somebody tries to follow this steps (sometimes, the journal managers are too creative).

Thanks in advance