Skip to content

Troubleshooting ​

Check the console first. When something is refused, a message is always logged; nothing fails silently.

INFO

Console messages are in Chinese, as printed by the framework. The left column gives the original text so you can match it.

Console messages ​

Message starts withMeaningFix
端點設定缺失 / 端點設定格式錯誤 (endpoint config missing / malformed)The page lacks endpoint config, or Blade and JS versions differDeploy Blade and front-end assets together, then reload
…被拒絕 —— 這個元素不在任何 data-render-blade-object 裡面 (refused: not inside any object)No object on the ancestor chainWrap it in @renderObject
…被拒絕 —— 物件 "X" 的 data-render-allow 只有 [...] (refused: object only allows …)The action isn't grantedDisplay needs state:read, writes need state:write, renders need render
data-render-blade-object 需要名稱 (needs a name)Empty valueGive it a name
data-render-allow 有不認得的動作 X (unknown action X)TypoOnly render, state:read, state:write exist
data-state-class 需要 "key:class" 格式 (needs "key:class")Missing colondata-state-class="advanced:is-open"
data-state-init:JSON 格式錯誤 (invalid JSON)Starts with { but isn't valid JSONCheck the quotes, or use k=v
…無法序列化,略過 (cannot serialize, skipped)The value contains a function, DOM node or circular referenceOnly store JSON-serializable data
renderBladeAuto:容器需要 id (container needs an id)The @renderAuto container has no idAdd an id

The button does nothing at all ​

  1. Is there a "refused" message in the console? → see the table above
  2. Is data-cg-event misspelled? (renderBlade is case-sensitive)
  3. Is that event imported in resources/js/app.js?
  4. Did you insert this HTML yourself with innerHTML? → without renderBlade it isn't re-bound
  5. Are the front-end assets built?

The value is stored but the screen doesn't change ​

  • You mutated a copy: s.get('o').x = 1 doesn't notify; use s.merge('o', { x: 1 }).
  • Same for arrays: use s.update('list', (l = []) => l.concat(x)).
  • The display and the writer are in different namespaces. The same key under two objects is two values.

Text goes blank on load ​

When a key has no value, data-state-text falls back to the text written in the template. If it's really blank, usually:

  • The template had no initial text → use data-state-init="display=0"
  • Something called set(key, ''): that really sets an empty string

State disappears after a re-render ​

  • Did you press F5? A reload always resets it; that's by design.
  • Did you switch tabs? Two tabs = two separate states.
  • Did a full navigation happen? pagehide clears it.
  • page-mode navigation does not clear it. If state disappears in that case, it's a real bug.

A fragment is never unchanged ​

Does the fragment contain @linker? It generates a new uuid on every render. Move the mount point to an outer block.

Endpoints return 404 after an upgrade ​

Check the path in the Network panel. If it's still the old path, reload so Blade and JS share the same endpoint config. On multi-node deployments, confirm APP_KEY is identical everywhere.

bash
php artisan route:list --name=renderBlade