# New layout refresh problem

**URL:** https://community.forestadmin.com/t/new-layout-refresh-problem/3456
**Category:** Help me!
**Created:** [October 5, 2021, 2:30pm UTC](https://community.forestadmin.com/t/new-layout-refresh-problem/3456 "2021-10-05T14:30:17Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Louis-Marie](https://avatars.discourse-cdn.com/v4/letter/l/258eb7/32.png) [@Louis-Marie](https://community.forestadmin.com/u/Louis-Marie)
#### Post date: [October 5, 2021, 2:30pm UTC](https://community.forestadmin.com/t/new-layout-refresh-problem/3456/1 "2021-10-05T14:30:17Z")

</div>

Hi team,

I have once again a layout refresh issue.  
It is very similar to the issue I encountered [here](https://community.forestadmin.com/t/one-more-layout-refresh-problem-again/2118/2)

I updated a list of items in a smart action named: Mail request user action

The new item `Remin **** ths` appears in Development:  
 ![image](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/5/57b0cf17a60d5d6510560529b103a9ce2f844b90.png)

However, after migrating towards the Staging environment,  
=\> the new item does not appear  
Then, in the Production environment,  
=\> Same issue, the new item does not appear

Team: Compliance  
Project: MyPocket

In my previous ticket, I had to wait for other internal changes to come and integrate them to make the new item appear.  
So, the original issue has not been solved and was reproduced today.  
Could you please investigate?

Thanks in advance

My Setup:

```javascript
    "liana": "forest-express-sequelize",
    "liana_version": "8.2.2",
    "stack": {
      "database_type": "postgres",
      "engine": "nodejs",
      "engine_version": "14.16.0",
      "orm_version": "5.22.3"
    }

```

---

<div class="post-metadata">

### Author: ![Arnaud\_Moncel](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/arnaud_moncel/32/24_2.png) [@Arnaud\_Moncel](https://community.forestadmin.com/u/Arnaud_Moncel)
#### Post date: [October 5, 2021, 3:04pm UTC](https://community.forestadmin.com/t/new-layout-refresh-problem/3456/2 "2021-10-05T15:04:52Z")

</div>

Hi @Louis-Marie 👋, i’m afraid i see it on our end.  
I see the `Remin **** ths` in the `enums` array from `Mail_template` field.  
The smart action have a load hook is that right? Does the load hook return the right enum?

---

<div class="post-metadata">

### Author: ![Louis-Marie](https://avatars.discourse-cdn.com/v4/letter/l/258eb7/32.png) [@Louis-Marie](https://community.forestadmin.com/u/Louis-Marie)
#### Post date: [October 5, 2021, 3:07pm UTC](https://community.forestadmin.com/t/new-layout-refresh-problem/3456/3 "2021-10-05T15:07:50Z")

</div>

Hi @Arnaud_Moncel

I’m sorry I could not wait and I integrated other changes.  
Then, the new item appeared.

I am now available to make new tests in my Development and Staging environments if you have some time to monitor this issue.

As an example, I will add a new `Dummy` item in the same list.  
Please just let me know if you are ready to monitor at the same time.

Thanks for your help.

---

<div class="post-metadata">

### Author: ![Arnaud\_Moncel](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/arnaud_moncel/32/24_2.png) [@Arnaud\_Moncel](https://community.forestadmin.com/u/Arnaud_Moncel)
#### Post date: [October 5, 2021, 3:28pm UTC](https://community.forestadmin.com/t/new-layout-refresh-problem/3456/4 "2021-10-05T15:28:37Z")

</div>

If I understand well all is back to normal now?

In order to find what happen can you give me approximatively the hour on which you deploy to staging the first time(where the new enum item is not available) and the second time who fix your issue 🙏

---

<div class="post-metadata">

### Author: ![Louis-Marie](https://avatars.discourse-cdn.com/v4/letter/l/258eb7/32.png) [@Louis-Marie](https://community.forestadmin.com/u/Louis-Marie)
#### Post date: [October 5, 2021, 3:41pm UTC](https://community.forestadmin.com/t/new-layout-refresh-problem/3456/5 "2021-10-05T15:41:26Z")

</div>

Yes, all is back to normal now.

Ok, let’s take the `Staging` environment:

- Around: Oct 5, 2021 3:02pm GMT+0200 : First change was made  
– new item was added, and server restarted  
– it was visible in .forestadmin.schema.json file but not in the UI  
– I waited some time and refreshed the UI  
– the new item was still not visible in the UI

- then, I made different tries in Staging:  
– manually editing the .forestadmin.schema.json, back and forth  
=\> no change in the UI  
– switching from enum to string  
=\> changed in the UI  
– switching back to the enum, including the new item  
=\> changed in the UI with a list, but still with the new item missing

- Around Oct 5, 2021 4:50pm GMT+0200 : New change in `Development`  
– Indeed, I added the exact new item in another identical list in another smart action.  
=\> no issue: Changes appear in the UI  
– pushed to Staging

- Around Oct 5, 2021 4:55pm GMT+0200 :  
– New change pulled in `Staging`  
– Server restarted  
==\> Changes appear in the UI in `Staging`

Hoping this will help.

---

<div class="post-metadata">

### Author: ![Sliman\_Medini](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/sliman_medini/32/19_2.png) [@Sliman\_Medini](https://community.forestadmin.com/u/Sliman_Medini)
#### Post date: [October 6, 2021, 10:21am UTC](https://community.forestadmin.com/t/new-layout-refresh-problem/3456/6 "2021-10-06T10:21:26Z")

</div>

Hi @Louis-Marie,

Thank you for the feedback.

I was not able to reproduce the issue. Either I am missing it, or maybe we have a subtlety in the way schemas have to be handled.

You maybe already know this, but please note the following informations:

- Only development environments re-generate the `forestadmin-schema.json`
- Consequently, changing code without changing the related `forestadmin-schema.json` has no effect on environments other than development ones.
- Others environments than development should not be touched directly. They should just be git pulled.
- `forestadmin-schema.json` must be versionned so the changes on dev is propagated on merge.

The normal flow is the following:

- Change something on the dev server (inside models or forest folder)
- Start or restart the dev server
  - it will refresh the `forestadmin-schema.json`
  - it will then send it to forest to perform the schema update.

- When it’s ok, merge the dev branch on the staging branch
- Pull & restart the Staging
  - new code and `forestadmin-schema.json` is here
  - it will then send it to forest to perform the schema update.

When Forest performs a schema update, it makes an hash matching the whole content of `forestadmin-schema.json`. When the hash is new, we perform a schema update. If the hash is the same, we “do-nothing”. At the date of yesterday, your project started 2 schema update (15:21 and 16:44, one time for staging and one for dev.) Both schema update updates correctly the schema. There was no “do-nothing” call.

When following this flow, I am not able to reproduce any issue.

If you still encounter the problem, please do not hesitate to restart your staging many times (like that whe can easier identify it in our logs) and to keep the datetime to inform us.

Regards,

---

<div class="post-metadata">

### Author: ![Louis-Marie](https://avatars.discourse-cdn.com/v4/letter/l/258eb7/32.png) [@Louis-Marie](https://community.forestadmin.com/u/Louis-Marie)
#### Post date: [October 6, 2021, 10:55am UTC](https://community.forestadmin.com/t/new-layout-refresh-problem/3456/7 "2021-10-06T10:55:09Z")

</div>

Hi @Sliman_Medini

I know well this flow, and this is our usual way of working.

I made a new change this morning to reproduce the issue, and I can say that the bug is still present:

Project: MyPocket  
Team: Compliance  
Collection: Users  
Smart action: Mail request user action  
Field: Mail\_template

- Wed Oct 6 12:27: Development environment  
– I added a new `Dummy item to test layout refresh` item in the enum list of the `Mail_template` field of the smart action  
– I starting my Development server with the change in place  
– the `.forestadmin-schema.json` file has been regenerated  
==\> the layout is well refreshed, the new item appears in Development environment

- Wed Oct 6 12:34 : Staging environment  
– change was merged in the staging branch  
==\> the programme code and `.forestadmin-schema.json` file are well updated  
– Staging server was restarted  
– I got the warning in my browser stating that the layout has been changed  
==\> **that confirms that the new hash was generated and sent**.  
==\> **Could you please confirm that you received the new hash?**  
– 12:36 : I reloaded the Staging layout in the browser  
==\> **Issue reproduced** : the dummy item does not appear  
– 12:38 : I reloaded the Staging layout in the browser  
==\> Issue reproduced: the dummy item does not appear  
– 12:40 : I reloaded once again the Staging layout in the browser  
==\> Same issue reproduced: the dummy item still does not appear  
– 12:42 : I restarted the Staging server, without making any change  
=\> this time, I got no warning in my browser about a layout change, and this is normal since I did not change anything.  
– 12:44 : I reloaded once again my Staging layout in the browser  
==\> Still the same issue reproduced: the dummy item still does not appear

Please let me know if I can do anything to help diagnose the issue.

Best regards

---

<div class="post-metadata">

### Author: ![Sliman\_Medini](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/sliman_medini/32/19_2.png) [@Sliman\_Medini](https://community.forestadmin.com/u/Sliman_Medini)
#### Post date: [October 6, 2021, 3:27pm UTC](https://community.forestadmin.com/t/new-layout-refresh-problem/3456/8 "2021-10-06T15:27:41Z")

</div>

Hi @Louis-Marie,

Ok, I understand better now.  
So we have a synchronize process that:

- produce the browser notification
- save the new schema on our side (I saw it, 06/10/2021 12:34:16)
- but does not add an enum value when it should.

I am able to see “Dummy item to test layout refresh” as an enum value for the layout of the environment Staging and for the team “Tests only”.

The last synchronisation was at 06/10/2021 12:34:16  
Can you confirm the value is still not here now? If this is the case, we have an issue about layout loading in the browser, and not a problem with synchronization.

Regards

---

<div class="post-metadata">

### Author: ![Louis-Marie](https://avatars.discourse-cdn.com/v4/letter/l/258eb7/32.png) [@Louis-Marie](https://community.forestadmin.com/u/Louis-Marie)
#### Post date: [October 6, 2021, 3:30pm UTC](https://community.forestadmin.com/t/new-layout-refresh-problem/3456/9 "2021-10-06T15:30:17Z")

</div>

Hi @Sliman_Medini

Yes, I confirm that the new item “Dummy item to test layout refresh” is still not visible in Staging, even after a browser refresh

Thanks

---

<div class="post-metadata">

### Author: ![Sliman\_Medini](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/sliman_medini/32/19_2.png) [@Sliman\_Medini](https://community.forestadmin.com/u/Sliman_Medini)
#### Post date: [October 6, 2021, 3:31pm UTC](https://community.forestadmin.com/t/new-layout-refresh-problem/3456/10 "2021-10-06T15:31:18Z")

</div>

Ok, was it with the team “Tests only” ?

---

<div class="post-metadata">

### Author: ![Louis-Marie](https://avatars.discourse-cdn.com/v4/letter/l/258eb7/32.png) [@Louis-Marie](https://community.forestadmin.com/u/Louis-Marie)
#### Post date: [October 6, 2021, 3:32pm UTC](https://community.forestadmin.com/t/new-layout-refresh-problem/3456/11 "2021-10-06T15:32:10Z")

</div>

I made all the tests in the team `Compliance` as indicated before.

---

<div class="post-metadata">

### Author: ![Sliman\_Medini](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/sliman_medini/32/19_2.png) [@Sliman\_Medini](https://community.forestadmin.com/u/Sliman_Medini)
#### Post date: [October 6, 2021, 3:39pm UTC](https://community.forestadmin.com/t/new-layout-refresh-problem/3456/12 "2021-10-06T15:39:13Z")

</div>

Ok, I’ve checked also the `Compliance` layout.  
The result is the same: the value `Dummy item to test layout refresh` is present in the enum of `Mail_template`.

So we have a different problem.  
The layout contains a new value but it’s not displayed.

I will try to investigate this and I will inform you.

Regards

---

<div class="post-metadata">

### Author: ![Sliman\_Medini](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/sliman_medini/32/19_2.png) [@Sliman\_Medini](https://community.forestadmin.com/u/Sliman_Medini)
#### Post date: [October 7, 2021, 10:03am UTC](https://community.forestadmin.com/t/new-layout-refresh-problem/3456/13 "2021-10-07T10:03:16Z")

</div>

Hi,

I’ve made a few tests and unfortunately I didn’t found something interesting.

- The `Dummy` value is present in the layouts of your staging.
- As soon as an enum value is added to the layout (Tested with a manual add), it appears in the UI.
- As soon as an enum value is added to the `forestadmin-schema.json` on a Staging, it appears on the UI after refresh.

I’ve performed a layout refresh on your staging/Compliance layout, can you check if the value is here?

Regards

---

<div class="post-metadata">

### Author: ![Louis-Marie](https://avatars.discourse-cdn.com/v4/letter/l/258eb7/32.png) [@Louis-Marie](https://community.forestadmin.com/u/Louis-Marie)
#### Post date: [October 7, 2021, 10:59am UTC](https://community.forestadmin.com/t/new-layout-refresh-problem/3456/14 "2021-10-07T10:59:58Z")

</div>

Hi @Sliman_Medini

Sorry, but the `Dummy` item is still not present in the UI.

I started the Staging server again, just in case, and unfortunately: nothing new.  
==\> The problem persists.

I looked at the network tab under my Browser when selecting the action, and got the answer:  
=\> the `Dummy` item is not present in the answer

Thanks

---

<div class="post-metadata">

### Author: ![Sliman\_Medini](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/sliman_medini/32/19_2.png) [@Sliman\_Medini](https://community.forestadmin.com/u/Sliman_Medini)
#### Post date: [October 7, 2021, 12:24pm UTC](https://community.forestadmin.com/t/new-layout-refresh-problem/3456/15 "2021-10-07T12:24:42Z")

</div>

Ok,

We may have to triple check that we are looking at the same layout: We look at the layout on the environment `Staging` on the team `Compliance`, right? Can you share the URL that gives you a layout without the `Dummy value`? Also the content of the response may be useful for us (You can send it via a private message)

Now (last refresh 12:59) the `Dummy` value is found in the layout cache:  
Inside the field `88710041-3715-11eb-b80c-43bf9bea8b65` named `Mail_template`.  
This field is present in the smart action named `Mail request user action`.  
This smart action is present on the collection `Users`

Here is the values of the enum:  
“Sus[…]EPA”,  
“Sus[…]ard”,  
“Fro[…]ice”,  
“Nee[…]ard”,  
“Cas[…]ths”,  
“Rem[…]ths”,  
“Dummy item to test layout refresh”,  
“Neg[…]ays”,  
“Neg[…]ays”,  
“Nev[…]unt”,  
“Ina[…]ths”,  
“Req[…]ess”

Do we aggree on the location of the problem?  
Sorry for the inconvenience

---

<div class="post-metadata">

### Author: ![Louis-Marie](https://avatars.discourse-cdn.com/v4/letter/l/258eb7/32.png) [@Louis-Marie](https://community.forestadmin.com/u/Louis-Marie)
#### Post date: [October 7, 2021, 2:17pm UTC](https://community.forestadmin.com/t/new-layout-refresh-problem/3456/16 "2021-10-07T14:17:23Z")

</div>

Hi @Sliman_Medini

> We look at the layout on the environment `Staging` on the team `Compliance` , right?

Yes, we agree on the location of the problem.  
But yes, now, the item appears.  
I don’t understand why it works now.  
I may reproduce it once again with another dummy one?

I will send you the response of this morning in a private message.

Thanks

---

<div class="post-metadata">

### Author: ![Louis-Marie](https://avatars.discourse-cdn.com/v4/letter/l/258eb7/32.png) [@Louis-Marie](https://community.forestadmin.com/u/Louis-Marie)
#### Post date: [October 7, 2021, 3:20pm UTC](https://community.forestadmin.com/t/new-layout-refresh-problem/3456/17 "2021-10-07T15:20:36Z")

</div>

For information, I will be out of office in the next days, so I had to rollback my tests.

The `Dummy` item has been removed at 17:16 in Staging.  
The UI has been updated accordingly.

Thanks

---

<div class="post-metadata">

### Author: ![Sliman\_Medini](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/sliman_medini/32/19_2.png) [@Sliman\_Medini](https://community.forestadmin.com/u/Sliman_Medini)
#### Post date: [October 8, 2021, 8:21am UTC](https://community.forestadmin.com/t/new-layout-refresh-problem/3456/18 "2021-10-08T08:21:27Z")

</div>

Hi Louis-Marie,

Thank you for the information.  
I’ve received and analyzed the data shared in private.  
I am thinking the issue is not coming from the layout but from the smart action hook. In another test, I will be interesting for us to have.

The shared infos were, if I understand well:

- the URL that loads the layout
- the payload answered by your server at the smart action form load or change.

In a further test, I you aggree to make it, it would be nice to share:

- the new value added
- the environment/team tested in the UI
- the request/response of the layout request
- the request/response of the smart action form request(s)
- the smart action hook code

Interesting info: to share a request/response, it’s possible to use “save HAR content” from the right-click menu in the network tab.

---

<div class="post-metadata">

### Author: ![Louis-Marie](https://avatars.discourse-cdn.com/v4/letter/l/258eb7/32.png) [@Louis-Marie](https://community.forestadmin.com/u/Louis-Marie)
#### Post date: [October 14, 2021, 5:31pm UTC](https://community.forestadmin.com/t/new-layout-refresh-problem/3456/19 "2021-10-14T17:31:27Z")

</div>

Hi @Sliman_Medini

> The shared infos were, if I understand well:
> 
> - the URL that loads the layout
> - the payload answered by your server at the smart action form load or change.

That’s correct.

I am back at the office and had the time to launch new tests.

All these tests have been conducted with the same specifications:

Team: `Compliance`  
Collection: `Users`  
Smart action: `Mail request user action`

New value added: `New dummy item - 14/10/2021`

**1. In `Development` environment**

– 14/Oct/2021:17:07:40 +0000: Server restarted  
==\> The new item appears. No problem

**2. In `Staging` environment**

– Changes merged from Development

– 14/Oct/2021:17:18 +0000: Staging server restarted  
– 14/Oct/2021:17:20 +0000: `Users` collection loaded (HAR content will be sent in a private message)  
– 14/Oct/2021:17:21 +0000: Action menu activated (HAR content will also be sent)  
==\> The new item does NOT appear. Problem was easily reproduced.

I will be glad to send you also the smart action hook code.

Thanks in advance

---

<div class="post-metadata">

### Author: ![Louis-Marie](https://avatars.discourse-cdn.com/v4/letter/l/258eb7/32.png) [@Louis-Marie](https://community.forestadmin.com/u/Louis-Marie)
#### Post date: [October 21, 2021, 7:51am UTC](https://community.forestadmin.com/t/new-layout-refresh-problem/3456/20 "2021-10-21T07:51:51Z")

</div>

Hi team,

Any news on this issue please?

Thanks in advance

[Next page](https://community.forestadmin.com/t/new-layout-refresh-problem/3456.md?page=2)
