Uncaught TypeError: Cannot read property 'lazyLoad' of undefined

  • 1
  • Problem
  • Updated 3 years ago
  • (Edited)
I am unable to type in the 'post' section of a chatter feed componenet on a page. I tested in my sandbox and everything works as expected and the pages are set up the same.  When I look at the console in my production environment I get the error 'Uncaught TypeError: Cannot read property 'lazyLoad' of undefined'.

When I dig into the error I see this message:
" has not been wired yet.  Either the widget wasn't added with addWidget() or wireWidgets() was not called after it was added.",Sfdc.Logging.LogLevel.ERROR"

If I use a template with the following code I can post without issue.
<iframe frameborder=0 width="100%" height="600px" src="/apex/skuid__Social?id={{{Id}}}"/>

So it seems this is an issue with the Chatter component has anyone else experienced this?
Photo of Tami Lust

Tami Lust

  • 5,280 Points 5k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
Where is the Chatter Feed being loaded? Is it in a Drawer / Popup?
Photo of Tami Lust

Tami Lust

  • 5,280 Points 5k badge 2x thumb
It is being loaded in a tab within a panel.
Photo of JD Bell

JD Bell, Senior Product Engineer

  • 2,996 Points 2k badge 2x thumb
I've seen issues like this before related to quick actions based on objects to which the current user does not have permission. This was due to a flaw in Salesforce's Chatter Visualforce component - it didn't check user permissions before attempting to pre-render some of the quick action forms, resulting in unexpected output from a REST service and causing a Javascript error which made the Chatter component non-functional.

I'll update this post with additional information soon, but wanted to give you a head start on solving this.
Photo of Tami Lust

Tami Lust

  • 5,280 Points 5k badge 2x thumb
Thanks for the explanation. I used the iframe method to get it working in the interim.
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
What object is the Chatter Feed on? If it's on the Account object, try removing the "New Case" and "New Opportunity" Quick Actions from the list of Actions on anyAccount Page Layouts assigned to users that do not have full Salesforce CRM licenses.