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

dev/core#4309 Fix schedule reminder getting overwritten #26344

Conversation

chrisgaraffa
Copy link

Overview

Fixes Schedule Reminder form to use an id form field instead of getting the id value from the session.

Before

https://lab.civicrm.org/dev/core/-/issues/4309 outlines the issue - opening the Edit link for multiple Scheduled Reminders in new tabs/windows and saving any but the most recently opened causes the most recently opened reminder gets overwritten.

After

Now uses a hidden id field to store the ID rather than the session.

Comments

Based on fixes for contributions and participants in #14244

@civibot
Copy link

civibot bot commented May 25, 2023

(Standard links)

@civibot civibot bot added the master label May 25, 2023
parent::preProcess();

$this->_id = CRM_Utils_Request::retrieve('id', 'Positive');
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chrisgaraffa I think is not necessary to override the preprocess to assign the $this->_id because the parent class already does that here. Or is it not working earlier?

@chrisgaraffa
Copy link
Author

@monishdeb Thanks for checking that (and sorry for the delayed response here) - You're right, I just tested against 5.63.1 and the preProcess isn't necessary.

@civicrm civicrm deleted a comment from civibot bot Jul 17, 2023
@colemanw
Copy link
Member

OK! It turns out that this is resolved indirectly via #26884
Apparently the bug happens to forms that are embedded in pages. Decoupling the form from the page is an all-around good thing, and it also fixes this issue!

@colemanw colemanw closed this Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants