Hello, I'm working with ChronoForms v8 and have a multi-page form (3 pages):
-
Page 1: displays a table listing database records
-
Page 2 & 3: used to view/edit details (e.g., for operators to check or update data)
The flow works like this:
-
On Page 1, I see the list of records from my table (
read_data2
). -
When I click Edit, the correct row is loaded using a
Read Data
action (e.g.,read_data6
), and I go to Page 2. -
If I Save the changes, the data is correctly stored, and when I return to Page 1, the session is clean — only
read_data2
is active in the Debug. -
But if I click Cancel (or Back from other views), I return to Page 1, but the session still keeps variables from the edit or view (e.g.,
row
,read_data6
, or evenread_data23
if I opened multiple views).
This leftover data in the session causes problems when editing another row later — multiple sets of edit/view data are present, leading to logic errors or UI conflicts (e.g., showing stale values or triggering the wrong logic based on isset()
conditions).
Is there a way to reset or clear session data (e.g., using PHP or a ChronoForms action) when going back to Page 1 using a Cancel or Back button?
Thanks in advance!
Array
(
[option] => com_chronoforms8
[action] => view
[chronoform] => lectura-20250427-040109-20250502-15465320250509-220917
[chronopage] => edit
[id] => 4
[agencia] => Chiclayo
[fecha_inicio] => 2025-05-01
[hora_inicio] => 15:00
[evento] => INGRESO DE PORTAVALOR
[operador] => Juan Dioses
[estado] => Registrado
)
Files
Array ( )
Vars
Array ( [app_active_page] => 1 [read_data2] => Array ( [0] => Array ( [id] => 1 [agencia] => Puente Piedra [fecha_inicio] => 2025-05-02 [hora_inicio] => 11:00 [evento] => INGRESO DE PORTAVALOR [operador] => Arturo Checa [estado] => Pendiente ) [1] => Array ( [id] => 2 [agencia] => Santa Anita [fecha_inicio] => 2025-05-03 [hora_inicio] => 10:20 [evento] => INGRESO DE PORTAVALOR [operador] => Elvis Daniel [estado] => Registrado ) [2] => Array ( [id] => 3 [agencia] => Arequipa [fecha_inicio] => 2025-05-01 [hora_inicio] => 11:00 [evento] => ALARMA DE FUEGO [operador] => Miguel Soto [estado] => Pendiente ) [3] => Array ( [id] => 4 [agencia] => Chiclayo [fecha_inicio] => 2025-05-01 [hora_inicio] => 15:00 [evento] => INGRESO DE PORTAVALOR [operador] => Juan Dioses [estado] => Registrado ) [4] => Array ( [id] => 5 [agencia] => sullana [fecha_inicio] => 2025-05-08 [hora_inicio] => 14:23 [evento] => INGRESO DE PORTAVALOR [operador] => rortega [estado] => Pendiente ) [5] => Array ( [id] => 6 [agencia] => Villa El Salvador [fecha_inicio] => 2025-05-09 [hora_inicio] => 12:02 [evento] => ALARMA DE FUEGO [operador] => Wilmer Gutierrez [estado] => Pendiente ) [6] => Array ( [id] => 7 [agencia] => Lima Centro [fecha_inicio] => 2025-05-07 [hora_inicio] => 15:00 [evento] => ALARMA DE FUEGO [operador] => Miguel Soto [estado] => Pendiente ) [7] => Array ( [id] => 8 [agencia] => Aguaytia [fecha_inicio] => 2025-05-09 [hora_inicio] => 10:10 [evento] => ALARMA DE FUEGO [operador] => Arturo Checa [estado] => Pendiente ) [8] => Array ( [id] => 9 [agencia] => Trujillo [fecha_inicio] => 2025-05-07 [hora_inicio] => 15:00 [evento] => ALARMA DE FUEGO [operador] => Bryan Checa [estado] => Pendiente ) [9] => Array ( [id] => 10 [agencia] => Tarapoto [fecha_inicio] => 2025-05-07 [hora_inicio] => 15:45 [evento] => INGRESO DE PORTAVALOR [operador] => Bryan Checa [estado] => Pendiente ) ) [read_data2_count] => 19 [row] => Array ( [id] => 10 [agencia] => Tarapoto [fecha_inicio] => 2025-05-07 [hora_inicio] => 15:45 [evento] => INGRESO DE PORTAVALOR [operador] => Bryan Checa [estado] => Pendiente ) [read_data6] => Array ( [id] => 4 [agencia] => Chiclayo [fecha_inicio] => 2025-05-01 [hora_inicio] => 15:00 [evento] => INGRESO DE PORTAVALOR [operador] => Juan Dioses [estado] => Registrado ) [read_data23] => Array ( [id] => 3 [agencia] => Arequipa [fecha_inicio] => 2025-05-01 [hora_inicio] => 11:00 [evento] => ALARMA DE FUEGO [operador] => Miguel Soto [estado] => Pendiente ) )
Info
Array ( [read_data2] => Array ( [sql] => SELECT * FROM `registroccs` LIMIT 10 OFFSET 0 [returned] => Array ( [0] => Array ( [id] => 1 [agencia] => Puente Piedra [fecha_inicio] => 2025-05-02 [hora_inicio] => 11:00 [evento] => INGRESO DE PORTAVALOR [operador] => Arturo Checa [estado] => Pendiente ) [1] => Array ( [id] => 2 [agencia] => Santa Anita [fecha_inicio] => 2025-05-03 [hora_inicio] => 10:20 [evento] => INGRESO DE PORTAVALOR [operador] => Elvis Daniel [estado] => Registrado ) [2] => Array ( [id] => 3 [agencia] => Arequipa [fecha_inicio] => 2025-05-01 [hora_inicio] => 11:00 [evento] => ALARMA DE FUEGO [operador] => Miguel Soto [estado] => Pendiente ) [3] => Array ( [id] => 4 [agencia] => Chiclayo [fecha_inicio] => 2025-05-01 [hora_inicio] => 15:00 [evento] => INGRESO DE PORTAVALOR[operador] => Juan Dioses [estado] => Registrado ) [4] => Array ( [id] => 5 [agencia] => sullana [fecha_inicio] => 2025-05-08 [hora_inicio] => 14:23 [evento] => INGRESO DE PORTAVALOR [operador] => rortega [estado] => Pendiente ) [5] => Array ( [id] => 6 [agencia] => Villa El Salvador [fecha_inicio] => 2025-05-09 [hora_inicio] => 12:02 [evento] => ALARMA DE FUEGO [operador] => Wilmer Gutierrez [estado] => Pendiente ) [6] => Array ( [id] => 7 [agencia] => Lima Centro [fecha_inicio] => 2025-05-07 [hora_inicio] => 15:00 [evento] => ALARMA DE FUEGO [operador] => Miguel Soto [estado] => Pendiente ) [7] => Array ( [id] => 8 [agencia] => Aguaytia [fecha_inicio] => 2025-05-09 [hora_inicio] => 10:10 [evento] => ALARMA DE FUEGO [operador] => Arturo Checa [estado] => Pendiente ) [8] => Array ( [id] => 9 [agencia] => Trujillo [fecha_inicio] => 2025-05-07 [hora_inicio] => 15:00 [evento] => ALARMA DE FUEGO [operador] => Bryan Checa [estado] => Pendiente ) [9] => Array ( [id] => 10 [agencia] => Tarapoto [fecha_inicio] => 2025-05-07 [hora_inicio] => 15:45 [evento] => INGRESO DE PORTAVALOR [operador] => Bryan Checa [estado] => Pendiente ) ) ) [read_data2_count] => Array ( [sql] => SELECT COUNT(*) FROM `registroccs` [returned] => 19 ) )
Hi darkarturo
if you have the read_data6 at the beginning of your editing page "Load" event, then it will always load a new row when you open an Edit page again, which will overwrite previous values, is this the behavior you want ?
Hello max.
I don't know if I missed it, but I'm getting the "Too Many Connections Error" message, which is concerning because it's loading too many connections or reads on the database. For example, when you access page 1, the entire table is listed without issue. The connections for page 2 (editing) and page 3 (viewing) are not visible in the debug. However, when you access page 2 to edit and successfully save the changes, you return to page 1 and only see the connection for the table listing; that is, the connection for the edit was successfully closed. However, if you didn't save correctly or only returned to page 1 in the debug, the connection to the data for that edit remains, and that can cause the "Too Many Connections" error. The same goes for page 3 to view the data for the selected row.
:(
How do you return to page 1 when you cancel ? using a link ?
The "Too Many Connections Error" is strange, since it happens when multiple database sessions are active, usually from different clients, but you have 1 session only
Hi Max, I'm back as it is in the image, and the HTML that you see above, I use it to show the data or details of the row that is being consulted, also if you like, I can give you the access to the Joomla administration area, maybe you can detect the error better, since honestly, I don't understand much about this :(
Hi darkarturo
Returning with a link should be fine, the "Too many connections" error occurs with this setup ?
I think I will need a link to test this, please post here or send it using the Contact page
Hi max. I sent you the details via the contact page.
THANKS
Hi Arturo
I logged in earlier and opened the first few records and canceled all the time, I also saved one record without changing any details, but I did not receive any connection errors, everything is working fine.