Opticon Stockholm is on Tuesday September 10th, hope to see you there!
Opticon Stockholm is on Tuesday September 10th, hope to see you there!
I would not recommend storing as complex objects as PageData in the DDS. It would force the DDS to create stores for all other nested complex types, and maybe somewhere in there lies your name problem. There is no need to store PageData or even PageReference objects (you are trying to duplicate data), just store the page guid (or id) and possibly the language branch. Then you have all you need to retrieve the PageData from DataFactory later.
Hi,
Thank you for your answer :)
I will try to do that. I am storing PageData object because it is the deleted page data (if it is deleted i do not have access to it's data, do I?)
Regards,
Dominik
No you won't. But if you need to trace removed pages perhaps you can try a different approach? Like saving only some log information which is important or moving the pages to an archive location rather than deleting them? Or just use the waste basket (use MoveToWastebasket rather than Delete for the PageData if you do it from code).
Hi,
I am playing with Dynamic Data Store (to see how it works) and I am stuck with that error: Invalid name format for storeName. Only characters a-z, 0-9, '.', and '_' are allowed for security reasons
I read somewhere on the forum that the name of the store is generated based on the namespace and type name. But I can't see anything in my code that can cause that error.
My code is something like this:
namespace EPiServerUtils.Common
public static void SaveSomePageData(object sender, PageEventArgs e)
{
PageData page = DataFactory.Instance.GetPage(e.PageLink);
DynamicDataStore store = DynamicDataStoreFactory.Instance.GetStore("MyStore");
if (store == null)
{
store = DynamicDataStoreFactory.Instance.CreateStore("MyStore", typeof(PageInformation));
}
PageInformation pageToStore = new PageInformation();
pageToStore.MyPageData = page;
pageToStore.MyPageLink = page.PageLink;
store.Save(pageToStore);
}
public class PageInformation
{
public PageData MyPageData { get; set; }
public PageReference MyPageLink { get; set; }
}
Can you see anything that may cause that error?
Thank you in advance for any help :)
Regards,
Dominik