Shopware: Properties undefined (reading 'search')
This error can happen when you forget to inject the repositoryFactory and include the relevant repository as a computed property.
34 views

By. Jacob
Jacob Kristensen (Turbulentarius) is a Web Developer based in Denmark. He is currently pursuing a Bachelor's degree in Web Development at Zealand, focusing on learning React and refining his existing skills.
Edited: 2023-10-16 09:48
An error was captured in current module: TypeError: Cannot read properties of undefined (reading 'search')
This can happen because you have not included the relevant repository as a computed property. E.g:
inject: ['repositoryFactory'],
mixins: [
'cms-element'
],
computed: {
mediaRepository() {
return this.repositoryFactory.create('media');
}
},
Tell us what you think: