Troubleshooting
Each entry is a symptom, its cause and the fix. Check the browser console first: the script warns about what it cannot use.
Nothing is drawn at all
| What you see | Why | Fix |
|---|---|---|
| A console warning from the script, empty boxes | data-property is missing or is not the property’s nine digits. |
Put the hotel’s number on the script tag — see Install the script. |
No warning, window.pmsBooking is undefined |
The script tag is not on this page, or it failed to load. | Put it in the shared <head>; check the Network tab and your Content Security Policy. On a page that enforces Trusted Types, allow the policy name pms-booking-loader. |
| The payment step or the guest area sends the guest to our address after some seconds | The frame could not load on your page — your policy’s frame-src, or the site is not on the allowed origins — and after 12 seconds the guest is taken to our own page instead. |
Allow the frame’s address, and check the allowed origins. |
| The script loads, requests fail with a CORS error | The site’s address is not on the hotel’s allowed origins. | The hotel adds it in Tape Chart Link → Booking engine → Firewall — your http://localhost:PORT too. No code fixes this. |
| A box added by your framework stays empty | Rare: boxes added after load are drawn by themselves. | Check the attribute’s spelling: data-pms-booking="search-form", not searchForm. If the markup came in with a swapped stylesheet, call pmsBooking.refresh(). |
The search and the links
| What you see | Why | Fix |
|---|---|---|
| Search goes to a page with no booking window | The site’s booking page is not at /booking. |
Name it with data-booking-path on the script tag. |
| Pressing Search opens the calendar instead of searching | One or both dates are missing. This is intended. | — |
| Pressing Search opens the guests panel | A child has no age yet: a child is priced by its real age. Intended. | — |
A data-pms-text value in your form never fills |
The element sits beside the form, not inside it. | Move it inside the <form> that has the data-pms-dates button. A stay’s checkIn, checkOut or nights can also sit outside it, with data-stay="search". |
data-plan on a link does nothing |
data-plan is used only together with data-room. |
Add the room’s id. |
| A date in a link is ignored | Both dates are needed, in order, as YYYY-MM-DD; check-out is the day of departure. |
Give both, or use data-stay="weekend". |
A link with data-stay="search" opens the booking page with no dates |
The search it follows is not complete yet. | Intended: the address follows every pick and carries dates once both are in and every child has an age. |
Prices and room cards
| What you see | Why | Fix |
|---|---|---|
| A price does not change when the guest picks dates | A value is priced for the stay written on its own element. It follows a search form only with data-stay="search". |
Put data-stay="search" on the value, the rooms template or the link — see A price that follows the search form. |
A price with data-stay="search" keeps your own text |
The search is not complete: a date is missing, or a child has no age yet. Or the page has no search form — a form of yours with a data-pms-dates or data-pms-guests button, or a ready search form. |
Intended: a price is asked only for a complete search, about half a second after the last change. Write a fallback that says so, or give the element data-check-in and data-check-out to price meanwhile. |
A rooms template with data-stay="search" draws no card |
The same: no card is drawn until the search is complete. | Keep your own text beside the template, or give the template data-check-in and data-check-out. |
| A price disappears for a moment when the dates change | Intended. The value of the stay before is removed at once and your own text stands, with data-pms-loading on the element, until the new answer is in. |
Style [data-pms-loading]; do not expect a filled value to stay under new dates. |
| Your fallback text stays | There is nothing to print for the stay the element asks for: the room cannot be sold, or the request failed. | Intended — keep the fallback sensible. To say why a room cannot be sold, print reason. |
| Your fallback text comes back after a value was shown | The element now asks for another stay — an attribute changed, or the search it follows did — and there is no value for it. | Intended: a filled value is not kept for a stay it was not priced for. |
| “Only 2 left” does not change while the page stays open | A value is asked again when what it asks for changes, not on a timer. An answer is reused for 60 seconds, then the next ask goes to the server. | Intended. |
A banner with data-pms-if is always visible |
A rule of your stylesheet sets display on it, and that beats the browser’s own rule for hidden. Or you did not write hidden on it, and no definite answer has said no. |
Add [hidden] { display: none !important; } to your stylesheet, and write hidden on what should appear only on a yes. |
A line with data-pms-if never appears |
No definite answer: the request failed, the search it follows is not complete, data-room is not one of the property’s ids, or the name is not a field — the console says that once. Outside a template scarce and a room’s fields need data-room. |
Check the console and the id; see Conditions. |
data-pms-if="reasonKind='min-stay'" never holds |
The text after = is compared exactly with what the field prints. Quotes are part of it. |
Write it bare: data-pms-if="reasonKind=min-stay". A number the same way: minStay=4; nights prints words: nights=3 nights. |
| An element inside a room card stays hidden | Inside a template data-pms-if removes or keeps the element; it does not touch hidden. A kept element you wrote hidden stays hidden. |
Do not write hidden on a data-pms-if element inside a template. |
| Your page’s price is higher than the booking page’s | The page added vatAdded or cityTax to price. Both are already inside it. |
Print price as it is; print taxes beside it as a note. |
| A room card says a room is not available though the hotel has it free | available means the room has a rate plan for the stay that can be paid for online. A restriction, or a party that does not fit, refuses it too. |
Print reason; reasonKind is other when no rate plan can be paid for online. |
Raw {{name}} shows on the page |
The braces are outside a <template data-pms-each>. |
Put them inside the template; outside one, use data-pms-text. |
| No cards at all | The prices could not be read; a repeat then draws nothing. With data-stay="search", the search is not complete. |
Keep your own fallback beside the template. |
| A carousel breaks after the cards arrive | The cards are added after your script ran. | Start it on pms-booking-rendered — see Events. |
| A room card from a template in React, Vue or another framework never appears | The script does read a <template data-pms-each> a framework rendered — its children may sit on the element itself — and draws the cards right after it. What goes wrong is around it: the braces were written as code, not text (in JSX {{name}} is an object: write {'{{name}}'}), or the framework drew that part of the page again — the cards are elements it did not put there, and our tests do not cover what a framework then does with them. |
Keep the template in a part of the page the framework does not draw again, or draw the cards in your own components from pmsBooking.rooms() — see From JavaScript. |
Events and tracking
| What you see | Why | Fix |
|---|---|---|
The first pms-booking-step is never heard |
The listener was added after the step was fired. The event is not kept. | Add the listener in a script before our script tag — see Add the listener before the first step. |
rooms arrives though no room is listed |
rooms is the first screen: also before a search, and while prices load. |
See What rooms means. |
No pms-booking-purchase after a booking |
The booking asked for no payment online, or the listener is not on the page the payment returned to. | Listen for the confirmation step as well, on the booking page itself. |
| A price for a family is the price for two adults | The list of children was dropped whole: an entry is not an age, or one child is older than the property books as a child. | See Children. |
The look
| What you see | Why | Fix |
|---|---|---|
| Your variables change nothing | The stylesheet that holds them is not on this page. | Put them on :root, in CSS that every page with a component loads. |
| The calendar keeps the branding | The variables are on our <div>. The calendar and the guests panel open over the page, outside that box. |
Put them on :root. |
| Your CSS selector does not reach a component | The components sit in a shadow root. | Use the --pms-* variables; for the calendar and the guests panel, the ::part() names. |
A ::part() rule changes nothing |
The rule is written on the wrong element, or on a name that is not listed. The calendar and the guests panel open in [data-pms-booking-overlay], never in the search form’s box — the ready form’s too. |
[data-pms-booking-overlay]::part(cal-day), with a name from the two tables — see How a part rule works. |
::part(cal-day) span or :first-child after a part matches nothing |
CSS itself: nothing inside a part can be selected, and only state pseudo-classes may follow one. | Use the piece’s own name — cal-day-number, cal-day-price — and :hover, :focus-visible, :disabled. |
A hover rule on cal-day repaints the chosen days |
A pseudo-class adds weight: ::part(cal-day):hover beats a plain ::part(cal-day-selected). |
Write ::part(cal-day-selected):hover after it. |
var(--primary) in a part rule gives the wrong colour |
Unprefixed names such as --primary are ours inside the components. |
Give your own custom properties a prefix. |
| The payment step ignores a value that works on the page | The frames accept values within limits: a radius up to the stated maximum, text at least half opaque, fonts from the list. | See Values and Fonts. |
| Your font shows on the page but not in the payment step | The frames can show only the listed fonts. | End the font list with a listed font and a generic fallback. |
| A swapped theme stylesheet is not picked up by the frames | A stylesheet swapped while the page is open is not noticed. | Call pmsBooking.refresh() after the swap. |
| Variables set inside a media query do not reach the payment step when the window is resized | Crossing a breakpoint changes no attribute, so the frames are not sent the new values. | Call pmsBooking.refresh() from a matchMedia listener — see Changing a variable while the page is open. |
An animated --pms-* variable moves on the page and stands still in the payment step |
Animating a variable is not supported: the frames keep the value they were last sent. | Animate an element of your own, or a part. |
| The components are dark on a light site (or the reverse) | The property’s branding or data-theme decides the start. |
Set data-theme on the script tag, or data-theme="page" to follow your site’s own switch — see Theme icon. |
Language, currency, account
| What you see | Why | Fix |
|---|---|---|
| The components are in the wrong language | They follow <html lang> unless data-locale says otherwise; a guest’s own pick wins. |
Set lang correctly on the page. |
| Picking a language reloads the page | Intended for our icon and menu. | Cancel pms-booking-locale and route to your own page — see Language icon. |
After setLocale() the payment step or the guest area is still in the old language |
A frame opens in the language of that moment and is not told of a later change. | Change the language before the guest reaches the frame, or reload the page — see Language icon. |
| The guest’s name cannot be shown in your header | Who is signed in stays inside the guest area. | Use a plain link to the account page. |
| Sign-in links in emails open on our address, not on the site | The hotel has not set the site’s account page. | The hotel sets it in Tape Chart Link → Booking engine → Configuration. |
Still stuck
Send the hotel the page’s address, the console output and what you expected. The hotel reaches Tape Chart from inside Tape Chart Link.