Skip to main content

Troubleshooting Selector Issues

Learn how to check placement selectors when your Candu content isn't showing

Deborah Ramírez avatar
Written by Deborah Ramírez
Updated yesterday

Your Candu placement targets a specific HTML element on your page (called a selector or div). If your page structure has changed since you created the placement, or if your selector is dynamic, that element may:

  • No longer exist, or

  • Exist only sometimes, depending on how your page is rendered (common with React, Vue, and other frameworks)

Both cases prevent your content from displaying correctly. Below are two ways to verify your selectors are valid.

Visual check (easiest)

Go to the page in your product where you want the content to show. See step-by-step walkthrough or follow the steps below:

  1. Open the Chrome Extension.

  2. Click All content.

  3. Use the dropdown to select your Candu workspace.

  4. Search for the content you want to preview. This should match your product's environment (Production, Staging, etc).

  5. Select the content.

  6. Click the Placement card.

  7. If no matches, the selector may no longer exist.

Technical check (advanced)

  1. Go to Settings > Placements

  2. Copy the HTML Selector

  3. Go to the page in your product where you want the content to show

  4. Right-click the page and select "Inspect"

  5. In the console, type: document.querySelector("your-selector-here") and replace your-selector-here with the HTML selector

  6. If it returns null, the selector doesn't exist on the page

If the selector doesn’t exist or isn’t found on the page, you can try to retake your snapshot. If retaking the snapshot doesn’t work, see the section below.

About selector stability

Candu places content by finding specific elements inside the DOM (Document Object Model). The DOM is the browser’s live representation of the page, including all text, sections, divs, and interactive elements.

In some cases, the snapshot cannot be trusted as the source of truth. If your page uses dynamic rendering, conditional elements, or classes that change after load, the snapshot may show a selector that looks correct but does not actually exist in the DOM.

In these cases, the reliable way to find stable selectors is to:

  • Define a selector manually using more stable attributes

  • Or inspect the live DOM in the Elements panel

  • Or ask your engineering team to provide a stable div specifically for Candu content

Most selector problems can be solved directly with Candu Support, but sometimes the issue is caused by the page itself rather than Candu. In those cases, you may need help from your engineering team.

If you run into issues or need help confirming a selector, we’re here to help. You can reach us anytime through chat or by email at [email protected].

Did this answer your question?