Bug #13505

Problem: The accession mask setting can cause a timeout error when adding new accessions

Added by David Juhasz 5 months ago.

Status:NewStart date:05/03/2021
Priority:MediumDue date:
Assignee:David Juhasz% Done:


Category:Administration / settings
Target version:-
Google Code Legacy ID: Tested version:2.6
Sponsored:No Requires documentation:


If the AtoM Accession mask setting is set to a simple string, with no incremental number (e.g. "2021-05-03/1") it will cause an infinite loop and a timeout error when trying to add a new accession record.

To reproduce the error
  1. Log in to AtoM with administrator privileges
  2. Go to "Settings > Identifier" and set the "Accession mask" value to a string like "2020-05-03/1"
  3. Save the change
  4. Go to "Add > Accession record"
  5. The Accession number field should be pre-populated with the mask value: "2020-05-03/1"
  6. Save the accession record
  7. Go to "Add > Accession record"

Resulting error

The page will load for a long time (the total time depends on your PHP configuration) then returns a "504 Gateway Timeout" error.

Expected behaviour

The "Add accession" page should load without error. The Accession number field should probably be left blank in this case, and an warning shown to the user that a valid accession number could not be generated.

It may also be good to prevent an Administrator from setting the Accession mask to a simple string with no auto-increment placeholder.

Also available in: Atom PDF