lightning:inputRichText component not working when deployed to new sandbox - quillLib.js error

Aislinn Hayes 07/20/2018. 1 answers, 53 views
lightning-components lightning

I have a lightning component that contains a lightning:inputRichText field working in a sandbox. When I deployed the component to another sandbox using ANT, I'm getting an error about quillLib.js as shown below when I try to type in the form.

quillLib.js error occurring on lightning:inputRichText in new sandbox

Both sandboxes are on API v43.0.

Has anyone seen this error or know why it's happening? Will raise a case with Salesforce also, as it seems to be an internal error.

1 Answers

Aislinn Hayes 08/09/2018.

Managed to find an answer for this one through some experimentation - it seems that my force:recordData component (which was trying to populate a custom rich text field on my chat object) couldn't access the custom field in any sandboxes past the one where the object and field were originally created.

Even though I had layoutType specified as FULL, I had to specifically include the new "Body__c" field in the fields parameter. This is because I forgot to deploy the layout for the new object that included this field, so the only fields available when I specified "FULL" were the ID and any other required fields.

<force:recordData aura:id="chatRecordCreator" 
                      fields="Body__c" />

<lightning:inputRichText value="{!v.simpleNewChat.Body__c}" />

Seems like there was some internal access issue on the field which was causing the null pointer in the quillLib.js class. Once I specifically provided access to the field on the force:recordData component, it worked.

Some more information on the Lightning Data Service from the Summer '17 highlights here.

More info about the difference between layoutType and fields attributes here.

Related questions

Hot questions


Popular Tags