-
Notifications
You must be signed in to change notification settings - Fork 8
07 Migration Guide
This guide helps developers upgrade from Meta Momentum V2.x to V3.0 (Umbraco 14+).
V3.0 introduces breaking changes:
- Configuration moved from
appsettings.jsonto Data Type settings - Removed
services.AddMetaMomentum()from Startup - Replaced HTML Partial with Tag Helpers
- Removed
FacebookAppId(no longer used by Facebook)
- Umbraco 14.0 or higher
- .NET 8 or higher
- Meta Momentum V2.x currently installed
Update the Meta Momentum package to V3.x:
Update-Package MetaMomentum
appsettings.json:
{ "MetaMomentum": {
"SiteName": "My Company",
"TwitterName": "@mycompany",
"FacebookId": "123456789" // Removed in V3
}
}Startup.cs or Program.cs:
public void ConfigureServices(IServiceCollection services) {
services.AddMetaMomentum(); // Remove in V3
}-
Open the Umbraco backoffice
-
Go to Settings → Data Types
-
Open your Meta Momentum Data Type
-
Scroll to Advanced Settings
-
Enter values:
-
OG Site Name: Copy from old
SiteNamesetting -
Twitter Name: Copy from old
TwitterNamesetting -
FacebookId: Remove (no longer used by Facebook)
-
OG Site Name: Copy from old
-
Remove the
MetaMomentumsection fromappsettings.json -
Remove
services.AddMetaMomentum()fromStartup.csorProgram.cs
@Html.Partial("MetaMomentum/RenderMetaTags", Model.Value("metaMomentum"))Add to _ViewImports.cshtml:
@addTagHelper *, MetaMomentum
@using MetaMomentum.ModelsReplace the partial with Tag Helper:
<meta-momentum meta-values="@(Model.Value<MetaValues>("metaMomentum"))"></meta-momentum>-
Build your solution
-
Run the site and open a content page
-
View page source and verify meta tags are present:
-
<title>tag -
<meta name="description">tag -
<meta property="og:*">tags -
<meta name="twitter:*">tags
- Test with social debuggers:
✅ Good News: Existing content data is fully compatible with V3.0.
- No database migration required
- Existing meta values continue to work
- Content editors don't need to re-enter data
| V2.x | V3.0 | Action Required |
|---|---|---|
appsettings.json config |
Data Type settings | Move values to Data Type |
services.AddMetaMomentum() |
Not needed | Remove from Startup |
@Html.Partial("MetaMomentum/RenderMetaTags") |
<meta-momentum> Tag Helper |
Update views |
FacebookId setting |
Removed | Delete from config |
Symptom: No meta tags appear in page source
Solutions:
- Verify
@addTagHelper *, MetaMomentumis in_ViewImports.cshtml - Check the property alias matches:
Model.Value<MetaValues>("metaMomentum") - Rebuild the solution
- Clear Umbraco cache (Settings → Published Status → Reload)
Error: The type or namespace name 'MetaValues' could not be found
Solution: Add to _ViewImports.cshtml: @using MetaMomentum.Models
Symptom: Social tags missing site name or Twitter handle
Solution:
- Open Data Type settings in backoffice
- Scroll to Advanced Settings
- Enter OG Site Name and Twitter Name
- Save the Data Type
Question: Should I remove FacebookAppId?
Answer: Yes. Facebook deprecated this requirement. You can safely remove it from your configuration. The tag will no longer be rendered in V3.0.
Reference: Yoast - Facebook App ID Warnings
If you need to rollback to V2.x:
-
Downgrade package:
Update-Package MetaMomentum -Version 2.2.0 - Restore configuration:
- Add back
MetaMomentumsection toappsettings.json - Add back
services.AddMetaMomentum()to Startup
- Revert views:
- Replace Tag Helpers with
@Html.Partial("MetaMomentum/RenderMetaTags")
- Rebuild and test
If you encounter issues during migration:
- Check the Troubleshooting Guide
- Review GitHub Issues
- Open a new issue with:
- Your Umbraco version
- Meta Momentum versions (from → to)
- Error messages or unexpected behavior
- Steps to reproduce