Adding a template to existing document type still gives a 404
Hi
My site is running Umbraco 10.7. I have quite a few nodes that do not have a templete. This is because up until now, the didnt actually have pages on the site, they were just used as related content in pickers and things.
But now we have decided that each of these nodes should have its own page, so i have added a default template to the document type.
However, they only appear on the frontend when i click the green "Save and Publish" button on each node. If I call SaveAndPublish from the content service, they dont appear (i still get a 404). A successful publish event appears in the history for that node, so the SaveAndPublish is doing the publish, but something else is not happening (cache maybe?) when i call SaveAndPublish vs clicking the button.
There are too many of these nodes for someone to manually click the green button on each. I need to do this programatically. Is there something I am missing? Is there a way of doing this?
Adding a template to existing document type still gives a 404
Hi
My site is running Umbraco 10.7. I have quite a few nodes that do not have a templete. This is because up until now, the didnt actually have pages on the site, they were just used as related content in pickers and things.
But now we have decided that each of these nodes should have its own page, so i have added a default template to the document type.
However, they only appear on the frontend when i click the green "Save and Publish" button on each node. If I call SaveAndPublish from the content service, they dont appear (i still get a 404). A successful publish event appears in the history for that node, so the SaveAndPublish is doing the publish, but something else is not happening (cache maybe?) when i call SaveAndPublish vs clicking the button.
There are too many of these nodes for someone to manually click the green button on each. I need to do this programatically. Is there something I am missing? Is there a way of doing this?
Many thanks
Ah OK.
I was essentially doing this:
But it seems the "default template" does not apply by default on the server.
The client side posts a templateAlias value as part of the Save and Publish action.
So now im doing something like this and it seems to be working:
is working on a reply...