Fix #10511 - make correct redirect to Opportunity's DetailView without extra data from submitted form #10512
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixed issue #10511.
Description
Issue happens because user not redirected to other page but submitting form on "Contact-Opportunity" page with other form data that should send at request. And this data wrongly adds to search queries because
SubPanel
class usesSeacrhForm
functionality to filter data andSearchForm
grubs data from$_POST
that should happens for subpanels. Thats why it includescontact_name
andcontact_id
to SQL that doesn't include this tables and shouldn't filter by these params.Example of wrongly generated SQL:
Steps to reproduce issue
[ER]: all subpanels works fine without errors and print linked data
[AR]: have message at some subpanels "Database failure. Please refer to suitecrm.log for details."
Motivation and Context
This bug breaks business logic at out company. Extra data from "Contact-Opportunity" form should send to Opportunity's DetailView page.
This PR fixed issue with broken subpanels on Opportunity DetailView, one of the most common modules.
How To Test This
Open "Contact-Opportunity" page from Contacts subpanel and click "Cancel".
Types of changes
Final checklist