Want to import just a few records into an existing site

Topics: Troubleshooting
Nov 27, 2012 at 6:01 PM

Most of the stuff I've found dealing with importing/exporting has to do with setting up recipes for new sites.

However, I have a need to import some data that users generated from a CustomForm I created on one site (i.e., just one content type) to another site.

When I use export I get my .xml file, but when I try to import it throws an error about Recipes.

Coordinator
Nov 27, 2012 at 6:15 PM

It would help to know the exact error you're getting.

Nov 27, 2012 at 7:55 PM
Edited Nov 27, 2012 at 7:56 PM

Error:

,201 [78] Orchard.Exceptions.DefaultExceptionPolicy - An unexpected exception was caught System.IO.DirectoryNotFoundException: Could not find a part of the path 'c:\...\...\...\...\Media\SiteName\favicon\SiteName\RecipeJournal'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost) at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost) at System.IO.Directory.CreateDirectory(String path) at Contrib.MediaFolder.Services.RemoteStorageProvider.CreateFile(String path) in d:\...\...\Documents\...\Orchard\Modules\Contrib.MediaFolder\Services\RemoteStorageProvider.cs:line 282 at Orchard.Recipes.Services.RecipeJournalManager.GetJournalFile(String executionId) at Orchard.Recipes.Services.RecipeJournalManager.ExecutionStart(String executionId) at Orchard.Recipes.Services.RecipeManager.Execute(Recipe recipe) at Orchard.ImportExport.Services.ImportExportService.Import(String recipeText) at Orchard.ImportExport.Controllers.AdminController.ImportPOST() at lambda_method(Closure , ControllerBase , Object[] ) at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass13.<InvokeActionMethodWithFilters>b__10() at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass13.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12() at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass13.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12() at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)

which is not obvious to me because the ContentForm I am trying to export has nothing to do with Contrib.MediaFolder. And none of the .xml file has anything related to that.

Coordinator
Nov 27, 2012 at 11:23 PM

The import process generates a log file that gets stored in Media. Any idea why it would think your site is under SiteName\favicon\SiteName?

Nov 28, 2012 at 12:45 AM

I am working on local using WebMatrix and downloading/publishing a 1.4 site (small changes to content made periodically). I set up 1.6 using a source enlistment on my dev box and am creating modules prior to upgrading the live site to 1.6. I wanted to import 1.4 content to 1.6 to test some stuff out.

Looking at the 1.4 site, under Setting>Media that "c:\" path is under "Remote Storage". When I redacted the path names I should have noted the first "SiteName" is the landlord site (www.landlord.com) and the second "SiteName" is the media path for the tenant (Tenant), so it should be "www.landlord.com\favicon\Tenant".

That Remote Storage input is from prior to 1.4 I think. I am going to change it temporarily to my local path and that should work. Thanks.

Nov 28, 2012 at 2:42 AM

Apparently, I made a mistake somewhere that causes this stuff to be saved in the 

~/Media/TenantName/favicon

folder.

Where could I have made that mistake? TYIA.

Coordinator
Nov 28, 2012 at 7:14 AM

I have no idea. Did you ever enter "favicon" as a setting somewhere? This looks super-weird.

Nov 28, 2012 at 10:03 PM
Edited Nov 28, 2012 at 10:04 PM

It must be because of what I entered in the "Remote Storage" text field. And if I recall, i just copied the path that was already set up. Prior to that I think the folders were set up by a module, but this had to be 1.1 or 1.2, so I may not have upgraded it properly.

Coordinator
Nov 28, 2012 at 10:39 PM

What's remote storage?

Nov 28, 2012 at 11:05 PM
Edited Nov 28, 2012 at 11:13 PM

It's probably part of a module that I cannot remember right now (it's been a while since I first set up Orchard).

It's located under Admin Dashboard > Settings > Media

Can't do images here, so this is a representation of that screen

 

Media
Upload allowed file types (list of extensions separated by spaces)

[TEXTBOX w/ types]

Remote Storage
Location of the Media folder

[TEXTBOX w/ file path I discussed]

[CHECKBOX] Enable direct route
Check if the files can be served directly by the web server
[BUTTON]Save
Coordinator
Nov 28, 2012 at 11:17 PM

Well you might want to hunt down that module and kill it, because it seems to be the cause of your problems.