When trying to search inside IPE, I keep on getting the following error message on my console and the search no longer works
CategoryView.js?v=8.2.0:257 Uncaught TypeError: Cannot read property 'toLowerCase' of null(…)
(anonymous function) @ CategoryView.js?v=8.2.0:257
(anonymous function) @ underscore.js:73
(anonymous function) @ underscore.js:227m.each.
m.forEach @ underscore.js:153
m.filter.m.select @ underscore.js:226
(anonymous function) @ backbone.js:87
searchCategories @ CategoryView.js?v=8.2.0:255
dispatch @ jquery.min.js?v=2.2.3:3
r.handle @ jquery.min.js?v=2.2.3:3
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | panels-ipe-search-2824508-8.patch | 684 bytes | dsnopek |
Issue fork panels-2824508
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
samuel.mortensonHi @swagato, could you apply this patch to your Panels install and let me know what the output of your browser's console is when seeing this error?
Hopefully adding a console.log will help me debug the problem without having access to your site.
Comment #4
swagato commentedI get the following on the console after adding the patch #2.
Comment #5
samuel.mortensonAwesome! Remote debugging is tough but I see now that you have a Block Content entity without a label:
DEBUG: Object {plugin_id: "block_content:257bc57b-122e-4ddc-8350-2da2e7b24fad", label: null, category: "Custom", id: "block_content", provider: "block_content"} nullThis is surprising, as "label" is usually representative of the "info" field, which is required when creating Block Content entities! At any rate, this happened on your site and we'll need a condition in PHP that ensures that "label" is never NULL, or a condition in JS that handles this case. I'll tag this issue for the next Panels beta to make sure a fix gets in.
Comment #6
swagato commentedI have just tested this by adding Block description on each of the custom blocks that was missing the Block description. After doing this, I can search on the IPE again.
Comment #7
damienmckennaRemoving this from the beta6 list.
Comment #8
dsnopekThis situation is apparently really easy to create! :-) Here's a patch to fix
Comment #9
mikemadison commentedthe patch in #8 fixes this for me. thanks!
Comment #10
scvinodkumar commentedFor me too the patch #8 worked for me and thanks @dsnopek and why this patch is not included in the module yet?
Comment #11
joseph.olstadTriggered tests against D10 php 8.2 and D9.5 php 8.1
hoping to find a solution for #3383474: Fix HEAD test failures for 4.x
Comment #13
joseph.olstadunrelated failures, moving back to RTBC as reported.
Comment #14
joseph.olstadI've rolled this into two different MRs.
One here:
https://www.drupal.org/project/panels/issues/3475770#comment-15864698
and another here:
https://www.drupal.org/project/panels/issues/3465159#comment-15864675
Maybe the fix will eventually make it in.
Comment #15
liam morlandComment #19
joelpittetI am not adding tests for this, it's a good idea but generally panels should migrate to LB... I know that is a hot take (and may change with time) but merged anyway. Thanks for reporting and debugging (remotely) @samuel.mortenson and to all who tested it and provided fixes!
Comment #21
joseph.olstad@joelpittet , panels has always been very good and it still works very well. Earl Miles basically gifted us Panels and Views.
There's many use cases and advanced things possible with panels that many in the drupal community probably have not yet learned to appreciate. For site building it's extremely powerful.
Comment #22
joelpittetI am a late panels power appreciator... if that's a word... I agree with the sentiment in #21