Select the search type
  • Site
  • Web
Search
You are here:  Support/Forums
Support

Bring2mind Forums

Bring2mind.DNN.Modules.DMX.Common.Globals.ImportDirectory
Last Post 02/12/2008 10:10 PM by Peter Donker. 7 Replies.
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
A B
New Member
New Member
Posts:20


--
01/23/2008 8:23 PM

Does anyone know how to correctly use the Bring2mind.DNN.Modules.DMX.Common.Globals.ImportDirectory function?

I can get it to import a folder successfully, however the title for every imported item is set to the title of TemplateEntry (the function's 2nd argument).  I'm thinking it may have something to do with the functions last argument for which I'm passing an empty collection, does anyone know what this argument is for?

Thanks

Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
01/23/2008 10:15 PM

Hi Chris,

I've rechecked the code, and I think you're using it correctly but there might be a bug in the method. I'll repair it for 04.02.00.

Peter

A B
New Member
New Member
Posts:20


--
02/07/2008 10:51 PM
I can confirm that this is working for importing files in 04.02.00. Thanks Peter

There still appears to be an issue with using this function to import a hierarchy of files though as folders are imported as an empty folder with a blank name. I'm not sure if this function is suppose to import recursively, but if it's not it probably shouldn't create folders with a blank name.
Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
02/08/2008 10:00 AM
I'll look into that Chris. The folder names should definitely not be blank. Are you using multiple languages in your portal?
Peter
A B
New Member
New Member
Posts:20


--
02/08/2008 10:02 PM
The only language being used is en_US.

Thanks
Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
02/11/2008 12:07 PM
OK. Do you see anything entered into DMX_ShortTexts relating to the collections? I.e. link on EntryId and typekey="ENT" subtype="TITLE" and locale should be empty.

Peter
A B
New Member
New Member
Posts:20


--
02/11/2008 11:53 PM
There's no row in DMX_ShortTexts for the collection.

I setup a test import on a folder containing an empty folder "a" and a file "b.txt". The text file imports correctly (creates a row in DMX_Entries with a corresponding row in DMX_ShortTexts with the Text "b"), but the directory doesn't (creates a row in DMX_Entries without a corresponding row in DMX_ShortTexts).

I'm now seeing an error generated from this function call: Violation of PRIMARY KEY constraint 'PK_DMX_EntryPermissions'. Cannot insert duplicate key in object 'dbo.DMX_EntryPermissions'. Sorry I didn't mention this earlier, but my setup to call the function is quite complicated so error messages aren't always apparent.

The DMX_EntryPermissions table looks good for the 2 new entries (both have 2 rows with portalId=0, RoleId=0, UserId=-10 and PermissionId 1 and 2). One thing of note is that the LastVersionId in the DMX_Entries table for the new Collection is one less then the EntryId (86 vs 87).
Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
02/12/2008 10:10 PM
Hi Chris,

Thanks, I'll look into this. This is very helpful (and detailed).

Peter
You are not authorized to post a reply.