Join Discord
Communities
Powered by
V13 - Create a new node ComponentComposer / Migrat...
# help-with-umbraco
s
SiempreSteve
10/17/2024, 12:58 PM
Trying to create a new node via a ComponentComposer on release. I thought I could use a migration. The issue is the SaveAndPublish works - sort of. The Node is created but is marked as published but not in cache. What am I doing wrong here?
SiempreSteve
10/17/2024, 12:59 PM
https://cdn.discordapp.com/attachments/1296457322767319092/1296457433681625140/message.txt?ex=67125b93&is=67110a13&hm=9ad63e190dca720c86493bc4b4a6f41c0505e8010e4f1ad51bd364e36dc2224e&
SiempreSteve
10/17/2024, 12:59 PM
You can ignore _contentLocatorService this is my homebrew content service locator - it just checks for the checkoutnode and it's returning that fine.
s
Sebastiaan
10/17/2024, 1:02 PM
You can't do it in one go, you need to handle the publish in a second migration - example code here:
https://github.com/umbraco/The-Starter-Kit/blob/v14/dev/src/Umbraco.SampleSite/Migrations/PostMigrationNotificationHandler.cs
s
SiempreSteve
10/17/2024, 1:11 PM
Ah! OK - I can cope with that. Thanks for the pointer Sebastiaan.
s
Sebastiaan
10/17/2024, 1:12 PM
ah just saw that was the v14 branch, but same for v13!
Sebastiaan
10/17/2024, 1:12 PM
https://github.com/umbraco/The-Starter-Kit/blob/v13/dev/src/Umbraco.SampleSite/Migrations/PostMigrationNotificationHandler.cs
3
Views
Previous
Next