Smart fields not displayed in production but shows up on development server

Hey guys,

I am facing a small issue. I have checked other articles but I didn’t find a solution. My issue is

  • My smart fields are appearing in local development but not in production.
  • This is only happening with one collection.


I have tried deleting my forestadmin-schema.json file but it does not help.

Kindly help me in this regards.

Best,
Tanish

Hello @tanish,

Did you push your development new code to production? What are those smart fields ? (Refund type, Payment Description, Organization, Organization Name am I right ?)

Your forestadmin-schema.json file is computed in the development environment only. Then once happy with your development environment changes you can push them to production including the forestadmin-schema.json.

In your case, you probably have forgotten to push the code that handle those smart fields but you have pushed the right forestadmin-schema.json (already containing the metadata for those fields) so the fields name appears in the UI but not their values, am I correct?

Kind regards,
Morgan

I have pushed my forestadmin-schema.json file to production multiple times, and I also checked and the missing files do exist in the file as well.

Yes, the issue is that the fields name appears in the UI but not their values.

Best,
Tanish

Hey again,

  • Does the code related to making smart fields have been pushed to production too ?
  • Can you spot any differences between production and development? (The issue should come from that)
  • Can you share a screenshot of the network call response when you look at your collection refunds in production?

To make things clear, if the data doesn’t show up in the UI it means that your backend doesn’t send them. So we need to find out why that’s the case.

Kind regards,
Morgan

1 Like

Yes

https://drive.google.com/file/d/1lAd6ye4_JsjgLkVFFeacLsm9cv3f012J/view?usp=sharing

Its weird because if I open a record, the data is retrievable but it is not retrievable in a collection view.

Let me know if you have any other questions.

Best,
Tanish

Hello @tanish,

In your video, with can see empty data attributes for the relationships Organization and PaymentId.

It means that the list route is not working as expected. Did you override the default route? (It should be a get route something like router.get('/refundsVTwo', ...)

In order to help us understand, can you also share one of your Smart Field implementations, please? (For example Organization)

Kind regards,
Morgan

I just realized that Smart fields are only not working for fields that rely on a relationship. That means that the lookup on the relationship is not executing in production in the smart field.

This is my schema for the refunds

All these smart fields use paymentId relationship lookup for retrieving values.

Hi @tanish :wave: Do you request the paymentId field on the refundv2 view?

Hi @tanish,

We released a fix on forest-express-mongoose this morning 8.7.4.
Could you try to use it to see if it fixes your issue ?