Tables Not Exporting - Content Security Policy

  • 1
  • Problem
  • Updated 8 months ago
  • In Progress
Any insight into this would be helpful.

Any time some tries to csv export a table the browser window crashes with the message "Requests to the server have been blocked by an extension."

Console Log:


I downloaded a Disable Content Security Policy headers chrome extension and was able to get the exports working again. Is there a better way to get the exports working again? Guessing Chrome has a problem when a lightning.force.com page refers to a visual.force.com page.

Salesforce Lighting with Skuid VF redirects for page assignments
Skuid v. 11.1.7
Chrome Browser
Photo of Sneh M

Sneh M

  • 110 Points 100 badge 2x thumb

Posted 8 months ago

  • 1
Photo of Matt Small

Matt Small

  • 1,182 Points 1k badge 2x thumb
Hi friend, 

Can you please try this on another browser and let us know what happens?

Also, what is the default name of the export (are you forcing the .csv postfix? ) 
Once we establish this stuff we should have a good idea where to go from here. 
Photo of Sneh M

Sneh M

  • 110 Points 100 badge 2x thumb
Hi Matt,

Interestingly, other browsers report the same error. Tried it in Firefox and Opera. Lightning is not functional in IE.



I also tried adjusting the file name to the default name and a custom name with & without the .csv postfix but it still errors out.

Thank you for your help.
Photo of Matt Small

Matt Small

  • 1,182 Points 1k badge 2x thumb
Hey np. 

Maybe shoot me your page XML so I can take a look?

Other than that, there could be a bug with the xml.
Sometimes you will need to rebuild the page to make some bugs go away. Maybe try this step now?
Photo of Sneh M

Sneh M

  • 110 Points 100 badge 2x thumb
Here's a simple page with one model and table that displays for the Contacts tab.
I went ahead and deleted everything and recreated the page but the exports still did not funtion.

One thing I noticed is if you preview the page from Page Builder the export were working and the URL is "https://domain--skuid.na30.visual.force.com/apex/skuid__ui?page=Contact_list". Under Lightning the URL is https://domain.lightning.force.com/one/one.app#/sObject/Contact/home" and exports error out. Any way that the export can originate from the lightning domain instead of the visualforce domain? Think that would solve the issue.

<skuidpage showheader="true" personalizationmode="server" showsidebar="true" unsavedchangeswarning="yes" tabtooverride="Contact">
    <models>
        <model type="" id="Contacts" sobject="Contact" createrowifnonefound="false" query="true" limit="20" orderby="Account.Name ASC" datasource="salesforce">
            <fields>
                <field id="FirstName"/>
                <field id="LastName"/>
                <field id="AccountId"/>
                <field id="Account.Name"/>
                <field id="Phone"/>
                <field id="MobilePhone"/>
                <field id="Email"/>
                <field id="Salutation"/>
                <field id="Title"/>
                <field id="Description"/>
                <field id="Id"/>
                <field id="MailingAddress"/>
                <field id="MailingCity"/>
                <field id="MailingPostalCode"/>
                <field id="MailingStreet"/>
                <field id="Primary_Buyer__c"/>
            </fields>
            <conditions/>
            <actions/>
        </model>
    </models>
    <components>
        <pagetitle uniqueid="sk-1qUaWQ-81" model="Contacts">
            <maintitle>All Contacts</maintitle>
            <actions>
                <action type="redirect" label="Add Contact" icon="sk-icon-add" window="self" url="/apex/skuid__ui?page=Contact_New" uniqueid="sk-1kapOo-79"/>
            </actions>
        </pagetitle>
        <skootable uniqueid="sk-1qUddv-86" model="Contacts" showerrorsinline="true" buttonposition="left" mode="read" showsavecancel="true" createrecords="true" pagesize="10" showexportbuttons="true" searchbox="true" searchmethod="server" showconditions="true" emptysearchbehavior="query" allowscrollbars="true" floatheader="true">
            <fields>
                <field type="" id="AccountId" valuehalign="" optionsource="" displaytemplate="{{Name}}" allowordering="true" searchtemplate="{{Name}}" uniqueid="fi-1fMpTS-119">
                    <label>Account</label>
                    <searchfields>
                        <searchfield field="Name" operator="contains" query="true" show="true" return="true"/>
                        <searchfield field="RecordTypeId" operator="=" query="true" show="true" return="true"/>
                        <searchfield field="RecordType.Name" query="true" show="false" return="true"/>
                    </searchfields>
                </field>
                <field type="" id="FirstName" valuehalign="" allowordering="true" uniqueid="fi-1fMpTS-120"/>
                <field type="" id="LastName" valuehalign="" allowordering="true" uniqueid="fi-1fMpTT-121"/>
                <field type="" id="Salutation" valuehalign="" allowordering="true" uniqueid="fi-1fMpTT-122"/>
                <field type="" id="Title" valuehalign="" allowordering="true" uniqueid="fi-1fMpTT-123"/>
                <field type="" id="Phone" valuehalign="" allowordering="true" uniqueid="fi-1fMpTT-124"/>
                <field type="" id="MobilePhone" valuehalign="" allowordering="true" uniqueid="fi-1fMpTT-125"/>
                <field type="" id="Email" valuehalign="" allowordering="true" uniqueid="fi-1fMpTT-126"/>
                <field id="Primary_Buyer__c" hideable="true" uniqueid="fi-1kbRaZ-157"/>
                <field type="" id="Description" valuehalign="" uniqueid="fi-1fMpTT-127">
                    <label>TEMP Contact Role</label>
                    <renderconditions logictype="and" onhidedatabehavior="keep"/>
                    <enableconditions/>
                </field>
            </fields>
            <rowactions>
                <action type="redirect" label="Edit Contact" icon="sk-icon-edit" window="self" url="https://skuid.na30.visual.force.com/{{Id}}"/>;
                <action type="delete"/>
            </rowactions>
            <massactions usefirstitemasdefault="true">
                <action type="massupdate"/>
                <action type="massdelete"/>
            </massactions>
            <views>
                <view type="standard"/>
            </views>
            <actions defaultlabel="Global Actions" defaulticon="sk-icon-magic" usefirstitemasdefault="true"/>
            <searchfields/>
            <renderconditions logictype="and"/>
            <exportproperties usetablecolumns="false" loadallrecords="true">
                <columns>
                    <column type="field" headertype="fieldlabel" field="Account.Name"/>
                    <column type="field" headertype="fieldlabel" field="FirstName"/>
                    <column type="field" headertype="fieldlabel" field="LastName"/>
                    <column type="field" headertype="fieldlabel" field="Title"/>
                    <column type="field" headertype="fieldlabel" field="Phone"/>
                    <column type="field" headertype="fieldlabel" field="MobilePhone"/>
                    <column type="field" headertype="fieldlabel" field="Email"/>
                </columns>
            </exportproperties>
        </skootable>
    </components>
    <resources>
        <labels/>
        <javascript/>
        <css/>
    </resources>
    <styles>
        <styleitem type="background" bgtype="none"/>
    </styles>
</skuidpage>