function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ketan holmesketan holmes 

Uploading files on Chatter with JQuery in Community

Hello SF Gurus,

 I have created a component which shows the Upload Files button from Chatter posts. This component I call from two places. One is on Service Cloud Console and it works fine. However the same component, when called from Customer Community VF page doesn't show just the Upload File button, but all the 4 default actions : Poll, File, Link, Post. Additionally, the most curious thing is, I have written additional JS lines in my VF page which hides those addtional actions when I run in debug mode on FireFox.

I get the following exception in FireFox browser:

15:50:19.563 TypeError: b is undefined
Publisher/this.getWidget()Chatter.js:816
FileUploader.init()UploaderWrapper:241
n.Callbacks/i()jquery.min.js:2
n.Callbacks/j.fireWith()jquery.min.js:2
.ready()jquery.min.js:2
J()jquery.min.js:2
EventLoop.prototype.enter()script.js:350
bound ()self-hosted
ThreadActor<._pushThreadPause()script.js:543
ThreadActor<._pauseAndRespond()script.js:753
ThreadActor<._makeSteppingHooks/steppingHookState.pauseAndRespond()script.js:882
ThreadActor<._makeOnStep/<()script.js:863
FilesComp.validate/</<()BDPC_FileUploader:352
$VFRM.RemotingProviderImpl<.constructor/</e.cb()VFRemote.js:133
VFExt3.direct.RemotingProvider<.doCallback()VFRemote.js:99
VFExt3.direct.RemotingProvider<.onData()VFRemote.js:94
.handleResponse()VFRemote.js:75
a()VFRemote.js:39
h/h[e]<()VFRemote.js:40
1Chatter.js:816:1

When I run the same page on Chrome, I get the following exception:

Chatter.js:816 Uncaught TypeError: Cannot read property 'lazyLoad' of undefinedPublisher.getWidget @ Chatter.js:816init @ Uploaderpage?mdid=a1L21XXXXXXXXXKEAQ&parentURL=https%3A%2F%2Fcustomercommunity.cs26.force.com%2…:241i @ jquery.min.js:2fireWith @ jquery.min.js:2ready @ jquery.min.js:2J @ jquery.min.js:2


If anyone of you could please provide some pointers on it, I would be grateful for it.

Best Regards,
KB