In a fresh install of lumber (without docker), crud worked fine.
When trying to make the first smart action, from Create and manage Smart Actions - Documentation, it doesnt appear in Smart Actions tab of the model settings page. Tried npm start several times, clear browser cache, check and re-check
forest/MYMODEL.js file:
…
actions: [{name: ‘smart action name’}]
but without success. The only thing I see is
“No Smart Action
This collection does not have any Smart Action yet.”
Any hint?
Hi @tomlobato, and welcome to the ForestAdmin community!
Would you mind sharing with me the project name, collection, and smart action name with me so I can check if we’ve got any trace of this one on our end?
Thank you
@tomlobato thank you for sharing those in private.
I checked on our end and it seems that indeed, nor your development environment’s forestadmin-schema.json
file nor the production one contains the smart action.
On development environments, the forestadmin-schema.json
file is updated and sent when restarting your server.
As production environments are intended to follow a development environment on which you’d make all model and collection editions, the schema is not updated but only sent.
The correct flow would then be:
- Add your smart action on your development environment collection file.
- Restart your development environment (this should update the
forestadmin-schema.json
file and send it).
- You should then see the smart action on your development environment collection settings.
Then if you want to have your smart action available on your production environment:
- Push your code from the development application to the production one. (this should then manually add the smart action on both your collection and
forestadmin-schema.json
file)
- Restart your production environment application. (this should send the newly edited schema to our end and make the smart action available on your collection settings of your production environment)
I hope those explanations will help you make your smart action available
Hours could be saved on my end if the doc mentioned it! And it doesnt matter if, at some point of the whole doc, this is mentioned. It MUST be in every page that says to “restart the server”.
As a first contact with the platform, I will think twice before proceed.
Thank you!
@tomlobato I’m saddened to ear that you lost hours with this behavior.
Your feedback is really important to us. Thank you for sharing, we’ll try to update the documentation to make the difference between updating schemas on development and production environment clearer.
What means push in this context? Via git (which?), edit files (which, where?), some custom lumber command (which?)?
Hello @tomlobato !
In this context this means that once the smart action works the way you want it to in a development environment, we suggest you to reproduce the changes in your production environment so that you can take full advantage of them.
If you have created a git folder you can add your changes directly to it. Otherwise you just have to copy/paste the changes by hand from your development environment to your production environment.
Let me know if that helps !
lclisson, it is confusing the information you are bringing. You said to update dev env and then update manually the prod env. I just updated the prod env and the changes never came to the gui. Does Forest makes some check to only apply to prod if the same changes are on dev? Whats weird behavior would be this? If not, why the changes I already made on prod never showed up? Is it a bug? Its not making sense at all.
Hi !
No prod and dev are separate and you can have different schemas on both. It is what we advise people to do, along with using version control, to make sure they don’t have disparities between their environments.
Notice that new smart actions are hidden by default and you have yo enable them in the layout editor.
If they don’t show up there, can you try to use your working forest development app code in production ?
Thank you.
I know it needs to be enabled in the GUI, but it DIDNT appear to be enabled, get it?
It looks like lamatt_v send me a generic reply, without understanding the detail of the issue.
The detail is: changing model/X.js doesnt make the smart action comes to the GUI, I keep seeing
“No Smart Action
This collection does not have any Smart Action yet.”
We do what we can to help
This might seem like dumb questions, but I prefer to cross them off my list.
Are your smart actions defined the same way on both environments ?
Are they present on dev (and working) ?
Have you any error on your production environment and/or in your web console ?
One simple thing that people usually forget to do it to copy the updated .forestadmin-schema.json
to their production environment. Did you copy it @tomlobato ?