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

[4.x]: searching in asset window throws Uncaught TypeError #13241

Closed
mathieuser opened this issue May 24, 2023 · 1 comment
Closed

[4.x]: searching in asset window throws Uncaught TypeError #13241

mathieuser opened this issue May 24, 2023 · 1 comment
Assignees

Comments

@mathieuser
Copy link

What happened?

Description

I'm trying to search the library on an assets field, which throws an error (see hereunder). I've deleted and reinitiated the vendor folder, also cleared caches, indexed assets and deleted the cpresources folder, to no avail. This started to be an issue after updating from 3 to 4.

Steps to reproduce

  1. Go to an entry
  2. at an assets field, click Add Image to open the library
  3. Type something in the search bar
  4. look at the console to see the error

Expected behavior

When I search in the asset window in an entry (so not in the general asset library, which works fine), I should get the result of the search

Actual behavior

Nothing happens and the javascript console throws following error:

Uncaught TypeError: Cannot read properties of undefined (reading 'hasChildren') at s.constructor.startSearching (AssetIndex.js:302:53) at s.constructor.e [as startSearching] (Base.js:76:36) at s.constructor.<anonymous> (BaseElementIndex.js:261:16) at s.constructor.<anonymous> (Base.js:153:23) at HTMLInputElement.o (jquery.js?v=1684921251:2:89408) at HTMLInputElement.dispatch (jquery.js?v=1684921251:2:43392) at v.handle (jquery.js?v=1684921251:2:41387)

Craft CMS version

Craft Solo 4.4.12

PHP version

8.1

Operating system and version

No response

Database type and version

Mysql

Image driver and version

ImageOptimize with Imagick 3.7.0

Installed plugins and versions

No response

@brandonkelly
Copy link
Member

Thanks for reporting that! We just released Craft 3.8.13 and 4.4.13 with a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants