Data store hangs when trying to bind

======== TEMPLATE BUG FORM ========

Wappler Version : 3.5.7
Operating System : W10
Server Model: NodeJS
Database Type: Postgresql
Hosting Type: Docker local

Expected behavior

What do you think should happen?

Want to bind datastore data (if empty hide) to dynamic attributes of an element.

Actual behavior

What actually happens?

When selecting datastore1 a prefixed spinner starts to run and keeps doing that, the data binding “hangs”:

How to reproduce

  1. Create a new page.
  2. Add Data Store element
  3. Add another element (container for example)
  4. Click element’s dynamic attributes -> hide
  5. Try to select the data store data in the data bindings menu.
  6. You’ll see the spinner running forever.

Have you set up your data store data when adding it?
What page are you working on?

Well, it appears that the variables I set for the data store component got lost. So I will have to add those again. However, I am using it for a product cart and that still works for some reason. I will set it up again properly and let you know if the problem persists.

Btw: I remember some trouble with query managers and data store components on layout pages and a similar problem (data bindings menu keeps runnning) when trying to bind their values to an element on a content page. Could this have something to do with this? Is it necessary to add the datastore component to every shop page seperately for example or should it be fine to add it to the shop pages’ layout?

So your explanation is unclear.
Where is the data store added - layout or content page?
Where are you trying to access it - on the same page or on some content page (if added on the layout page)?

Sorry for the confusion.

The datastore component is on the layout page.
I am trying to hide an element on the content page if the datastore value is empty. So I am trying to access the datastore’s data from the content page.

Just tested the same locally. Data store defined on the layout page:

Accessing it on a content page:

No issues with that. I’d suggest you to re-apply the data store component on the layout page and test again.

Okay I got it sorted out!

After removing al datastore components everywhere and setting it up again in the layout pages and trying to access it from the content pages I got the same error again :exploding_head:

BUT then I found out the session managers had the same issue and were also not accessible from the content pages.

SOLUTION: For anyone having the same error and frustration in the future, this is what was causing this: I had no View component in my layout page that contains the Layout Body Content component as Teodor had in his test setup:

After adding this, the problem for both the datastore and sessions storage managers were gone.

Thanks for your help @teodor, the screenshot of your test setup made me see the light, wouldn’t have found the cause without it!

That is strange as it’s being added automatically when you create a layout page … probably you deleted it.

That’s very likely indeed. I copied the code from older layouts to the new ones, so it’s even possible it was already absent when I copied it.

Thanks for your help again Teodor! :+1: