Hi @sergiobm and @Gustavo_Leon,
here are the SQLs that you can execute to fix the missing assoc_type and assoc_id in your DB table submission_files. Those are SQLs for MySQL database. If you have PostgreSQL database the SQLs should be slightly different.
Please test the SQLs first on a test installation/server!!!
After executing both SQLs you could try to (re)process one log file that did not work earlier.
Here the SQLs:
UPDATE submission_files sf
INNER JOIN publication_galleys pg ON pg.submission_file_id = sf.submission_file_id
SET sf.assoc_type = 521, sf.assoc_id = pg.galley_id
WHERE sf.file_stage = 10 AND assoc_type IS NULL AND assoc_id IS NULL
This first SQL will fix the rows that have NULL in both columns assoc_type and assoc_id.
UPDATE submission_files sf
INNER JOIN publication_galleys pg ON pg.submission_file_id = sf.submission_file_id AND pg.galley_id = sf.assoc_id
SET sf.assoc_type = 521
WHERE sf.file_stage = 10 AND assoc_type IS NULL AND assoc_id IS NOT NULL
This second SQL will fix the rows where only assoc_type is missing but there is assoc_id.
Best,
Bozana