---
schema_version: "1"
id: 22b21d214eed315d3a7713cc422df5b428295f08ae6e16854bbd5bea7c1742b5
title: Troubleshoot the Storefront Toolkit in B2C Commerce
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/cc/264-0-0/b2c_troubleshooting_storefront_toolkit.md
canonical_url: https://help.salesforce.com/s/articleView?id=cc.b2c_troubleshooting_storefront_toolkit.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: d05324c8567b0f633b298582192461b219d7a588b4122753ba85592032b18d4f
description: Troubleshoot some common issues with the Storefront Toolkit.
products:
  - Commerce
  - B2C Commerce
release: "264"
---
# Troubleshoot the Storefront Toolkit in B2C Commerce

Troubleshoot some common issues with the Storefront Toolkit.

The Storefront Toolkit JavaScript is inserted before the first JavaScript tag in the HTML `<head>` section of your storefront. If the HTML `<head>` section contains no JavaScript, the Storefront Toolkit JavaScript is inserted at the end of the `<head>` section.

The following table lists some problems commonly encountered when you use the Storefront Toolkit, along with potential solutions.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
      <colgroup>
        <col style="width:50%">
        <col style="width:50%">
      </colgroup>
      <thead class="slds-text-title_caps ">
        <tr class="">
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d225614e54">Problem</th>
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d225614e57">Solution</th>
        </tr>
      </thead>
      <tbody>
        <tr class="">
          <td data-label="Problem" class="slds-cell-wrap" style="vertical-align:top;" headers="d225614e54 ">When you use Google Chrome, you see an error message about navigating away
            from the storefront.</td>

          <td data-label="Solution" class="slds-cell-wrap" style="vertical-align:top;" headers="d225614e57 ">
            <p>Google Chrome's third-party cookie blocking can prevent authorization and
              break the Storefront Toolkit. To resolve this issue, allow third-party
              cookies in Chrome Settings.</p>
            <p>If you prefer to keep third-party cookies blocked, enable partitioned cookies
              so that the Storefront Toolkit works. Partitioned cookies is a
              customer-facing feature toggle.</p>
            <div class="slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium">
              <div class="slds-media slds-media_responsive">
                <div class="slds-media__figure"><span class="slds-icon_container slds-icon_container_circle slds-icon-note-note"><img style="margin-bottom:0;" src="https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/images/icon_note.png" alt="Note"></span></div>
                <div class="slds-media__body" style="padding-top:.5rem;padding-bottom:.5rem;"><span class="slds-text-title_caps">Note</span> Enabling partitioned cookies can have other consequences for your
                  storefront, depending on your implementation and how your storefront uses
                  cookies. Before you enable partitioned cookies, consult the developers who
                  maintain your storefront, whether internal, a partner, or the Customer
                  Success Group (CSG).</div>
              </div>
            </div>
          </td>

        </tr>
        <tr class="">
          <td data-label="Problem" class="slds-cell-wrap" style="vertical-align:top;" headers="d225614e54 ">You try to open a page in the Storefront Toolkit and you get a message that
            the toolkit failed to initialize.</td>

          <td data-label="Solution" class="slds-cell-wrap" style="vertical-align:top;" headers="d225614e57 ">
            <ul>
              <li>Make sure that you’ve correctly configured the HTTPS host and that the
                hostname aliases point to the correct instance using DNS. See <a href="https://help.salesforce.com/s/articleView?id=cc.b2c_hostname_aliases.htm&amp;release=264.0.0&amp;type=5" title="A hostname alias defines alternative names for an existing website URL. You must set up and register the DNS and domain names to use hostnames aliases in a B2C store. A hostname alias can map a human-readable hostname onto a more technical hostname. A hostname alias can also redirect one external, human-readable domain to another, such as www.mystore.com to www.yourstore.com.">Hostname
                  Aliases</a>.</li>

              <li>To open the storefront, click <strong class="uicontrol">Storefront</strong>. Make
                sure to use HTTPS in the URL for the storefront. If the browser displays
                an error regarding an invalid certificate, allow an exception for the
                certificate.</li>

              <li>Remove <code>CDATA</code> sections from your HTML storefront code.
                The Storefront Toolkit doesn't support <code>CDATA</code>.</li>

            </ul>
          </td>

        </tr>
        <tr class="">
          <td data-label="Problem" class="slds-cell-wrap" style="vertical-align:top;" headers="d225614e54 ">The Content Information tool doesn't show content and product tags.</td>

          <td data-label="Solution" class="slds-cell-wrap" style="vertical-align:top;" headers="d225614e57 ">
            <p style="margin-bottom:0;">It's possible that page markers are missing from the HTML. Add
              <code>&lt;!-- dwMarker="content" dwContentID="${pdict.Content.UUID}"
                           --&gt;</code> when rendering content assets and <code>&lt;!--
                           dwMarker="product" dwContentID="${Product.UUID}" --&gt;</code> when
              rendering products.
            </p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Problem" class="slds-cell-wrap" style="vertical-align:top;" headers="d225614e54 ">The Search Results Window or Product Search Model Window isn't
            available.</td>

          <td data-label="Solution" class="slds-cell-wrap" style="vertical-align:top;" headers="d225614e57 ">Make sure that the <code>isobject</code> tag is correctly implemented.
            See <a href="https://help.salesforce.com/s/articleView?id=cc.b2c_implementing_the_search_information_tool.htm&amp;release=264.0.0&amp;type=5" title="To enable the Search Information tool, your site must correctly implement the <isobject> tag in the storefront Internet Store Markup Language (ISML) templates.">Enable the Search Information Tool for Storefront Toolkit in B2C Commerce</a>.</td>

        </tr>
        <tr class="">
          <td data-label="Problem" class="slds-cell-wrap" style="vertical-align:top;" headers="d225614e54 ">The Storefront Toolkit tools show no information.</td>

          <td data-label="Solution" class="slds-cell-wrap" style="vertical-align:top;" headers="d225614e57 ">It's possible that the Content Delivery Network (CDN) is removing HTML
            comments. Disable this feature in the CDN. If you use Cloudflare, see <a href="https://support.cloudflare.com/hc/en-us/articles/200168196-How-do-I-minify-HTML-CSS-and-JavaScript-to-optimize-my-site-" target="_blank">How do I minify HTML, CSS, and JavaScript to optimize my site?</a>
          </td>

        </tr>
        <tr class="">
          <td data-label="Problem" class="slds-cell-wrap" style="vertical-align:top;" headers="d225614e54 ">Toolkit shows an empty storefront.</td>

          <td data-label="Solution" class="slds-cell-wrap" style="vertical-align:top;" headers="d225614e57 ">
            <p style="margin-bottom:0;">If your code includes anticlickjacking, the content of the page can be
              hidden when opened in an iframe. To resolve this issue, we recommend that
              you add a custom site preference to disable anticlickjacking on staging or
              sandbox instances. For more information, see <a href="https://owasp.org/www-community/Clickjacking" target="_blank">Clickjacking</a>.</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Problem" class="slds-cell-wrap" style="vertical-align:top;" headers="d225614e54 ">
            <p>URLs constructed using the following methods of
              <code>dw.web.URLUtils</code> aren’t working as expected:
            </p>
            <ul>
              <li><code>url</code></li>

              <li><code>http</code></li>

              <li><code>https</code></li>

              <li><code>abs</code></li>

            </ul>
          </td>

          <td data-label="Solution" class="slds-cell-wrap" style="vertical-align:top;" headers="d225614e57 ">
            <p>The Storefront Toolkit adds a cache-busting parameter to URLs. For example,
              you use <code>URLUtils.url</code> to construct a URL with a parameter
              like this: <code>URLUtils.url(”Pipeline-Start”) +
                        “?param=value”</code>.</p>
            <p>The resulting URL is
              <code>https://example.com/on/demandware.store/Sites-MySite-Site/default/Pipeline-Start?__sftkCacheBuster=1593615552718?param=value</code>.
            </p>
            <p>The URL doesn’t work as expected and can cause problems in the storefront
              depending on where you use it.</p>
            <p>Use <code>URLUtils</code> as in this example to pass in a URL parameter:
              <code>URLUtils.url("Pipeline-Start", "param", "value")</code>.
            </p>
            <p style="margin-bottom:0;">When you use the Storefront Toolkit, the resulting URL is
              <code>https://example.com/on/demandware.store/Sites-MySite-Site/default/Pipeline-Start?__sftkCacheBuster=1593615552718&amp;param=value</code>.
              The URL has the &amp; character instead of ? before param. When you don’t
              use the Storefront Toolkit, the resulting URL is
              <code>https://example.com/on/demandware.store/Sites-MySite-Site/default/Pipeline-Start?param=value</code>.
            </p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Problem" class="slds-cell-wrap" style="vertical-align:top;" headers="d225614e54 ">The Storefront Toolkit disappears after you click a link.</td>

          <td data-label="Solution" class="slds-cell-wrap" style="vertical-align:top;" headers="d225614e57 ">
            <p>Check to see if you’re using links that include a
              <code>target=”_top”</code> attribute, as in this example:
            </p>
            <p><code>&lt;a href="/example/link" target="_top"&gt;An example
                           link&lt;/a&gt;</code></p>
            <p style="margin-bottom:0;">The <code>target=”_top”</code> attribute causes the browser to open the
              link in the topmost frame, resulting in the Storefront Toolkit not being
              visible.</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Problem" class="slds-cell-wrap" style="vertical-align:top;" headers="d225614e54 ">The storefront doesn’t appear in the Storefront Toolkit, or the toolbar of
            the Storefront Toolkit doesn’t appear.</td>

          <td data-label="Solution" class="slds-cell-wrap" style="vertical-align:top;" headers="d225614e57 ">
            <p>ClickJack Protection or Anti-ClickJack scripts can cause these errors.
              ClickJacking is when a malicious actor displays your website in an iframe
              that the attacker controls. The attacker can intercept input events to see
              the information, such as passwords or credit card numbers, that a user
              enters.</p>
            <p>Instead of using scripts, to prevent clickjacking, include the following
              HTTP headers in your storefront: <code>X-Frame-Options: DENY</code> and
              <code>Content-Security-Policy: frame-ancestors ‘none’</code>.
            </p>
            <p>Use the following code in your storefront to set these headers:</p>
            <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>response.setHttpHeader("X-Frame-Options", "DENY");
response.setHttpHeader("Content-Security-Policy", "frame-ancestors 'none');</code></pre>
          </td>

        </tr>
        <tr class="">
          <td data-label="Problem" class="slds-cell-wrap" style="vertical-align:top;" headers="d225614e54 ">When you click a link from the Storefront Toolkit, you’re prompted to log
            in to the instance and the login fails.</td>

          <td data-label="Solution" class="slds-cell-wrap" style="vertical-align:top;" headers="d225614e57 ">Make sure you’re using the new Storefront Toolkit. The deprecated version
            of the Storefront Toolkit doesn’t work reliably in combination with Unified
            Authentication.</td>

        </tr>
        <tr class="">
          <td data-label="Problem" class="slds-cell-wrap" style="vertical-align:top;" headers="d225614e54 ">Clicking an "Edit Content Asset in Business Manager" link opens the
            creation dialog for a new content asset instead of the edit dialog for the
            existing one.</td>

          <td data-label="Solution" class="slds-cell-wrap" style="vertical-align:top;" headers="d225614e57 ">
            <p>Look for the Page Marker in your custom code:</p>
            <div>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_troubleshooting_storefront_toolkit__codeblock_oxn_bbl_2tb"><a name="b2c_troubleshooting_storefront_toolkit__codeblock_oxn_bbl_2tb"><!-- --></a><code>&lt;!-- dwMarker="content" dwContentID="${pdict.Content.UUID}" --&gt;</code></pre>
            </div>
            <p style="margin-bottom:0;">The expression used for the <code>dwContentID</code> can be different.
              Make sure that expression actually evaluates to the universally unique
              identifier (UUID) of the content asset.</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Problem" class="slds-cell-wrap" style="vertical-align:top;" headers="d225614e54 ">You see a message about navigating away from the site for some sites, but
            not others.</td>

          <td data-label="Solution" class="slds-cell-wrap" style="vertical-align:top;" headers="d225614e57 ">
            <p>Check for custom code that redirects the request to a different site, for
              example, based on geolocation. The Storefront Toolkit doesn't work across
              multiple sites.</p>
            <p style="margin-bottom:0;">We recommend that you check for the presence of the
              <code>sfdc-toolkit-token</code> cookie and not redirect to another
              site when the cookie is present.
            </p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Problem" class="slds-cell-wrap" style="vertical-align:top;" headers="d225614e54 ">You tried all the solutions, but the Storefront Toolkit still doesn't
            work.</td>

          <td data-label="Solution" class="slds-cell-wrap" style="vertical-align:top;" headers="d225614e57 ">Disable and clear the page cache. </td>

        </tr>
      </tbody>
    </table>