Order of chapters in OMP 3.1.1 flips with 10th chapter

Hi,

when I add chapters in the catalog entry of OMP 3.1.1, the sequence is always set to 0, but chapters are still ordered the way they were added. However, when the 10th chapter is added, the order changes.

Screenshots with 9 chapters added:

9chapters
9chaptersDB

Screenshots with 10 chapters added:

10chapters
10chaptersDB

best,
Carola

Edit: I named the chapters from 4 to 13 to show that the chapters are not ordered by name.

Hi,

for me, it works if I add “, chapter_id” to “order by” in https://github.com/pkp/omp/blob/master/classes/monograph/ChapterDAO.inc.php#L56.

best,
Carola

Hi @carola,

I think this should already be fixed by [OMP] Keep insertion order for chapters · Issue #3772 · pkp/pkp-lib · GitHub, which will be included in the next release! There’s a patch there for OMP 3.1.1.

Regards,
Alec Smecher
Public Knowledge Project Team

Thank you very much!