Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in logs: 'Cannot add note, no person ID specified' when form is submitted after timeout #1041

Open
jefft opened this issue Jun 13, 2024 · 1 comment

Comments

@jefft
Copy link
Contributor

jefft commented Jun 13, 2024

We're seeing occasional errors from Jethro:

Cannot add note, no person ID specified
Line 16 of /home/jethro/public_html/demo/views/view_0_add_note_to_person.class.php

To replicate:

  1. Log in
  2. Persons -> List All
  3. Tick a person, and from the drop-down, choose 'Add Note'
  4. In a second tab, log out of Jethro (to simulate a timeout)
  5. In the first tab, finish filling in the form and submit. You will be redirect to the login page
  6. Log in again. Jethro redirects to /?view=_add_note_to_person, but this time has an error at the top:

image

There's probably other situations like this where timeout interrupts a stateful operation, and the state is forgotten but the redirect tries to resume the operation.

@tbar0970
Copy link
Owner

Maybe the login form could somehow detect this kind of scenario, where the post data is lost and the destination view won't cope without it, and redirect to the home page with a message.

The alternative would be for the login form to capture and re-submit the post data (extra hidden fields in the login form). But that would be iffy if the next login is potentially much later, and the action might no longer be relevant. I guess it could have a time limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants