Fix SimpleBackendSearch Error 414 - Request-URI Too Large#1087
Open
t-engl wants to merge 1 commit intopimcore:2.3from
Open
Fix SimpleBackendSearch Error 414 - Request-URI Too Large#1087t-engl wants to merge 1 commit intopimcore:2.3from
t-engl wants to merge 1 commit intopimcore:2.3from
Conversation
Added getObjectRelationInlineSearchRouteMethod to searchFacade and helper Changed object-tags to use getObjectRelationInlineSearchRouteMethod
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for configuring the HTTP method (GET vs POST) used by the inline relation “combo” search requests, enabling POST to avoid 414 Request-URI Too Large when request parameters become large.
Changes:
- Configure many-to-one and many-to-many relation combo stores to use a configurable
proxy.actionMethods.read. - Introduce
pimcore.helpers.getObjectRelationInlineSearchRouteMethod()to retrieve the desired HTTP method from the registered search implementation. - Extend the search facade (
searchImplementationRegistry) withgetObjectRelationInlineSearchRouteMethod()including a default fallback toGET.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| public/js/pimcore/object/tags/manyToOneRelation.js | Sets proxy.actionMethods.read for relation inline search store to allow POST. |
| public/js/pimcore/object/tags/manyToManyObjectRelation.js | Sets proxy.actionMethods.read for relation inline search store to allow POST. |
| public/js/pimcore/helpers.js | Adds helper accessor for retrieving the inline search route HTTP method from the search registry. |
| public/js/pimcore/element/selector/searchFacade.js | Adds facade method with backward-compatible GET default when implementation doesn’t specify a method. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
|
|
||
| return null; | ||
| } |
There was a problem hiding this comment.
Avoid automated semicolon insertion (92% of all statements in the enclosing script have an explicit semicolon).
Author
|
Added related PR to pimcore/pimcore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Changes in this pull request
Use POST instead of GET to search for objects for combo to prevent 414 error response if possible.
The change should be backwards compatible, because the used Http-Method is declared by the actual implemenation and defaulting to GET.
For this PR to take effect, SimpleBackendSearch bundled with pimcore 12.x itself should also be patched, but should not break even without the change.
Additional info
It may be sufficient to remove the extra parameter unsavedChanges instead, which is most likelly the root cause of this issue, but I don't know it's purpose.