I usually do this kind of stuff into the proxy method:
Search with a regex expression or xpath all occurrence of old references in the legacy umbraco.config.
Get the new Id of the reference in the new Umbraco cache. The legacy nodeId is supposed to be stored into a property in the new instance for the mirroring.
Update de XML source of uMirror with the new nodeId.
Example for an umbracoRedirect property, not exactly your case but similar:
/***************************************************/
/* Read the legacy umbraco.config */
/***************************************************/
string SourceFilePath = HttpContext.Current.Server.MapPath("\\App_Data\\umirror\\umbraco.config");
string umbracoconfig = System.IO.File.ReadAllText(SourceFilePath);
XDocument xml = XDocument.Parse(umbracoconfig);
/***************************************************/
/* Get umbraco content */
/***************************************************/
XmlDocument XmlContent = ((XmlDocument)content.Instance.XmlContent.Clone());
/***************************************************/
/* Update value */
/***************************************************/
foreach (XElement index in xml.XPathSelectElements("//umbracoRedirect").Where(r => !string.IsNullOrEmpty(r.Value)).ToList())
{
if (XmlContent.SelectSingleNode("//* [legacyId = " + index.Value + "]") != null)
index.Value = XmlContent.SelectSingleNode("//* [legacyId = " + index.Value + "]").Attributes["id"].Value;
}
...
Maintaining localLink
First of all, fantastic package!
Since the nodeId is changed during the initial sync. How would you go about maintaining the localLink references that the RTE stores for hyperlinks?
Hi Dan, sorry for the delay, I was out os office.
I usually do this kind of stuff into the proxy method:
Example for an umbracoRedirect property, not exactly your case but similar:
is working on a reply...