3

I have several custom LWC's I've designed - they all show up OK with no problem in my Digital Experience site -- except for one

When I go into the site builder to find the component, my palette displays this message:

Some components in this section are blocked due to the site's security level setting

screen shot from my builder UX

I am developing a barcode scanning component that relies on a 3rd party script, which I've referenced via static-resource - and because it also needs to reference yet other resources on a CDN, I have added the CDN's URL as a Trusted Site inside my Digital Experience's Security & Privacy settings

enter image description here

I've also ticked the Show All Components box in the Advanced settings panel

UPDATE: I know from reading the 3rd party docs, the script library I'm referencing is experimentally supporting a custom Web Component - so I'm guessing it may be scouring the DOM for it's preferred little piece of markup - and other SF docs I've read seem to indicate that this is really frowned upon. That's my best guess as to why nothing I do works

UPDATE: My isExposed element is already set to true - but thanks for the comments.

<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>52.0</apiVersion>
   <isExposed>true</isExposed>
    <masterLabel>SCANDIT Barcode Reader (Experimental)</masterLabel>
    <targets>
        <target>lightningCommunity__Page</target>
        <target>lightningCommunity__Default</target>
    </targets>
</LightningComponentBundle>
1
  • i think lwc meta.xml file missing community targets or isExposed true
    – sdandamud1
    Commented Mar 21, 2022 at 0:28

2 Answers 2

0

This might be very common, but make sure in your LWC's meta.xml file below pointer is in place:

<isExposed>true</isExposed>
<Targets>

Many times due to this, components doesn't appear in community builder page.

0

Please try adding capabilities to your LWC's meta.xml like below

<capabilities>
    <capability>lightningCommunity__RelaxedCSP</capability>
  </capabilities>

According to the explanation, it should fix your issue enter image description here

Hope it helps.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .