Repository navigation
Correct the EntitySearchInputType option defaults - #2186
Merged
kpodemski merged 1 commit intoDec 2, 2026
Merged
Conversation
min_length defaults to 2 and limit to 0 (no limit) in EntitySearchInputType on 9.0.0, 9.1.0 and 9.2.x; remote_url has no default endpoint, it is the URL the search calls with __QUERY__ replaced. The note under the required components now says that EntitySearchInput needs the field container and so cannot be loaded with initComponents(), which fails with "Cannot read properties of undefined".
kpodemski
approved these changes
Dec 2, 2026
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.
EntitySearchInputTypedisagrees with the form type on 9.0.0, 9.1.0 and 9.2.x:min_lengthdefaults to2(not 3) andlimitto0, which means no limit (not 1, and it caps the selected entities rather than the items displayed).remote_urldefaults tonulland is the endpoint itself: there is no default endpoint to override, and__QUERY__in it is replaced by the search phrase. The note under the required JavaScript components now says thatEntitySearchInputis built with the field container, sowindow.prestashop.component.initComponents()cannot load it - doing so fails withCannot read properties of undefined (reading 'data'), as reported in PrestaShop/PrestaShop#34667.Sources, all on
9.2.x: the defaults insrc/PrestaShopBundle/Form/Admin/Type/EntitySearchInputType.php(configureOptions()), the limit checkdataLimit !== 0 && $entityItems.length >= dataLimitand thequeryWildcarddefault__QUERY__inadmin-dev/themes/new-theme/js/components/entity-search-input.ts, andinitComponents()inadmin-dev/themes/new-theme/js/app/utils/init-components.ts, which constructs each component with no argument.