[OJS] Reordering of articles and sections isn't working

Hello all, @asmecher, @NateWr, @ctgraham

I’m having the same problem as in post https://forum.pkp.sfu.ca/t/section-order-in-issue/50426

Reordering sections was done in the database, so they are displayed in the sections list correctly.
However, the sections are misplaced in the table of contents, and the Ordering within section configuration and Table of Contents isn’t working within the editors interface (I have multiple roles within multiple journals!).

OJS is in use.

Checking the database, data seems to be fine:

| submission_id | section_id |
| 5508 | 230 |
| 5510 | 230 |
| 5511 | 230 |
| 5518 | 231 |
| 5522 | 231 |
| 5523 | 231 |
| 5524 | 231 |
| 5525 | 232 |
| 5526 | 232 |
| 5530 | 232 |
| 5531 | 232 |
| 5532 | 232 |
| 5513 | 233 |
| 5516 | 233 |
| 5517 | 233 |

But they are being displayed all messed up in the issue table of contents form, as well as in the public page:


Hello all,

I managed to fix my ToC manually in the database, setting the section orders and article orders.

If there’s a patch to fix this issue, as it seems the code is savind the ordering incorrectly, please let me know as I couldn’t find any at GitHub.


We encountered the same bug in the modification of the order of sections inside an already published issue.
One of our journal editor created a new section and added it in an already published issue as a replacement of another section, it appeared that this new section came at the bottom of the Table of Content of the issue. Modifying the order was not possible.

We noticed in the “custom_section_orders” table that a new entry was not created as expected, preventing the reordering. We also noticed that the empty section was still present in that table.

We solved the problem with this little change on the database:

  1. go to the “sections” table to identify the “section_id” of the newly created section
  2. go to the “issues” table to identify the “issue_id” of the issue in which the new section appears
  3. go to the “custom_section_orders” table and add a new row with the “issue_id”, “section_id” found and give a greater number for the “seq” field than the others issue sections

If there is a section that is no longer used in the issue (this was our case) we don’t need to create the new row, we can simply update the row with the “issue_id” and “section_id” no more in use. After this creation or modification of the table “custom_section_orders”, it becomes possible to change the order in the admin interface again.

We also discovered that the addition of a new section in an already published issue, duely unpublished to make the change, didn’t create a new line in the table. So:

  • the removal of a section doesn’t delete the entry in the database
  • the addition of a new section doesn’t create a new entry in the database

Hope this helps to correct that bug.

Thank you @claivaz !

I followed your instruction and it was a bit hard to identify the “section_id”, “issue_id” but I figured it out as shown in attached screenshot. It works!

Much appreciate your sharing.


Best regards,


1 Like


Can you write the steps on how to reach step 1 to 3. I have the same problem but I failed to resolve it via the screenshots only.

Hi @zaid_Mkangwa ,

  1. first go to the url as in my screenshot
  2. go to chrome debug console (google for how)
  3. under Tab Network find the issueId=1234
  4. second go to the url as in my screenshot on another browser
    then right click on page to inspect, look for the same html tag and id
  5. using this id in step 4, open the database table issues and add new row accordingly (read [claivaz] comment to see what to add, observe the record pattern to figure out that missing record).


1 Like