Common Issues
Solutions for frequently encountered integration problems.
Blank #haven-app
Symptoms: The container stays empty after page load.
Causes and fixes:
Haven not ready — Ensure you poll
haven.ready()before callinghaven.config():javascriptvar poll = setInterval(function () { if (window.haven && haven.ready && haven.ready()) { clearInterval(poll); // configure here } }, 10);Missing
.render()— The fluent chain requires a final.render()call:javascripthaven.config({}).directory.init({}).render(); // .render() is requiredInvalid feed credentials — Check the browser Network tab for 401/403 responses. Verify your Kit URL or
havenFeedId.Wrong selector — Confirm the
selectormatches an element on the page.JavaScript error — Open the browser console and look for errors before the Haven init code runs.
Map does not appear
Symptoms: List renders but map area is blank or missing.
Fixes:
Load Mapbox before Haven — Mapbox GL CSS and JS must be on the page before
haven.init():html<link href="https://api.mapbox.com/mapbox-gl-js/v2.10.0/mapbox-gl.css" rel="stylesheet" /> <script src="https://api.mapbox.com/mapbox-gl-js/v2.10.0/mapbox-gl.js"></script> <!-- THEN Haven Kit --> <script src="https://kit.havendestinations.ca/YOUR_KIT_ID.js"></script>Enable map in config — Set both global and module options:
javascripthaven.config({ useMapBox: true }) .directory.init({ options: { includeMap: true, map: { autoload: true } } });Invalid Mapbox token — Verify
mapboxApiKeyin standalone mode or Kit configuration.Products lack coordinates — Markers only appear for products with geolocation data in Haven.
Filter icons missing
Symptoms: Search field shows broken icon or no icon.
Fixes:
- Load Font Awesome before Haven.
- Set
useFontAwesome: trueinhaven.config(). - Or remove icon HTML from filter config and set
useFontAwesome: false.
Custom templates not loading
Symptoms: Default templates render instead of your custom versions.
Fixes:
Verify URL — Open the template URL directly in a browser. It must return HTML without authentication.
Check
userTemplates— List exact filenames (case-sensitive):javascriptuserTemplates: ['haven-directory-list-item.html']Trailing slash on
templatePath— Haven adds filenames to this base. Use:javascripttemplatePath: 'https://yourhost.com/haven-templates/'CORS — Template host must allow cross-origin requests from your site's domain.
Path routing returns 404
Symptoms: Direct URL access or page refresh shows a server 404.
Fixes:
- Add server rewrite rules — see Path Routing.
- Ensure
RewriteBasematches yourrouting.path. - Confirm
index.htmlexists in the routed directory.
Lightbox does not open
Symptoms: Clicking a list item does nothing.
Fixes:
Set
includeLightbox: truein options.Include a detail template in
userTemplates:javascriptuserTemplates: ['haven-directory-list-item.html', 'haven-directory-detail.html']Check console for template load errors.
Styles look unstyled or broken
Symptoms: Raw HTML with no layout or spacing.
Fixes:
Load
haven.min.css(included automatically by Kit).Add theme CSS files after Haven:
html<link rel="stylesheet" href="/haven-theme--default.css" /> <link rel="stylesheet" href="/haven-theme--directory.css" />As of v2.0.1, styles are not inlined in
haven.min.js.
haven.fetch is undefined
Symptoms: Error when calling haven.fetch.getProducts().
Fix: haven.fetch is only available after haven.init() completes. Wait for haven.ready():
if (haven.ready()) {
haven.fetch.getProducts(function (response) { /* ... */ }, 'plugin');
}API returns empty array
Symptoms: Render succeeds but no items appear.
Fixes:
- Verify products exist in your Haven feed for the requested categories.
- Check category nicenames match exactly (case-sensitive).
- Try
queryType: 'plugin'for embed-optimized responses. - Inspect the Network tab for the API response body.
Getting help
- Check the browser console for errors and warnings.
- Inspect Network requests to
havenapi.havendestinations.ca. - Compare your setup against the Quick Start and Examples.
- Contact your Haven account manager for feed and Kit issues.