PHP Fatal error: Uncaught Exception: DB Error: ERROR: right sibling's left-link doesn't match: block 2 links to 7468 instead of expected 1 in index "sessions_user_id"

Can someone help me?
My OJS 3.2.0-3 is showing the following error and I don’t know how to solve it.

[Mon Oct 02 22:41:38.532718 2023] [php7:error] [pid 1610024] [client 10.171.1.142:54309] PHP Fatal error: Uncaught Exception: DB Error: ERROR: right sibling’s left-link doesn’t match:
block 2 links to 7468 instead of expected 1 in index “sessions_user_id” Query: UPDATE sessions\n\t\t\t\tSET\n\t\t\t\t\tuser_id = ?,\n\t\t\t\t\tip_address = ?,\n\t\t\t\t\tuser_agent = ?,\n\t\t\t\t\tcreated = ?,
\n\t\t\t\t\tlast_used = ?,\n\t\t\t\t\tremember = ?,\n\t\t\t\t\tdata = ?,\n\t\t\t\t\tdomain = ?\n\t\t\t\tWHERE session_id = ? in /opt/ojs/lib/pkp/classes/db/DAO.inc.php:
703\nStack trace:\n#0 /opt/ojs/lib/pkp/classes/db/DAO.inc.php(231): DAO->handleError()\n#1 /opt/ojs/lib/pkp/classes/session/SessionDAO.inc.php(109): DAO->update()\n#2 /opt/ojs/lib/pkp/classes/session/SessionManager.inc.php(185):
SessionDAO->updateObject()\n#3 [internal function]: SessionManager->write()\n#4 [internal function]: session_write_close()\n#5 {main}\n thrown in /opt/ojs/lib/pkp/classes/db/DAO.inc.php on line 703,
referer: https://www.revista.esap.go.gov.br/index.php/resap/login

The magazine accesses normally but I can’t log in. Whenever I try to log in it keeps looping back to the login screen.

Versão Atual: 3.2.0.3 (June 18, 2020 - 12:40 AM)

Versão do Apache Apache/2.4.41 (Ubuntu)
Versão do servidor de base de dados PostgreSQL 13.6 (Ubuntu 13.6-1.pgdg20.04+1)

i18n
locale pt_BR
client_charset utf-8
connection_charset utf8
database_charset utf8
charset_normalization Desativado

PHP Version 7.4.3

Hi @Felipe_Bruno,

This is a MySQL question rather than an OJS one; it sounds like your MySQL table has suffered some corruption. You should be able to fix it by running the database checker tools that come with MySQL.
If you’re not the server admin, contact them; they should be able to help you.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Hi @asmecher Thank you for your return. Here we use potsgresql. Can you help with these verification commands?

Hi @Felipe_Bruno,

You’re right – this is a PostgreSQL error, not a MySQL error. But nonetheless, you’ll have better luck e.g. on StackOverflow figuring out how to resolve it; see e.g.: https://stackoverflow.com/questions/49307292/error-in-postgresql-right-siblings-left-link-doesnt-match-block-5-links-to-8

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

@asmecher thanks a lot for the help! =)

1 Like