Bug reports
Version 3.x > Bug reports > File Import bug View modes: 
User avatar
Member
Member
jonathanchauncey-fdle.state.fl - 8/26/2008 9:11:02 AM
   
File Import bug
When using the file import module, if kentico does not have proper access to the files (they are read only) it will add the information to the database but will not upload the file (it shows failed in the file import screen).

This means that if you try to upload a set of files and it fails the database objects are created, and then if you upload again it creates a duplicate object.

Also my co-webmaster notice that if you place all the files in a folder in the cmsimport folder and then tell kentico to upload those files to a specified folder within kentio it creates a folder object (with the same name as the folder you placed the files in the cmsimport folder) and a file object under it for ever file in the folder.

For example:

cmsimport\foo is my folder with all of my pdf files that I want to upload into my sitefiles\docs folder in kentico. I want these files to be uploaded into sitefiles\docs\foo. However, what happens is this

sitefiles\docs\foo (new guid)\file1
sitefiles\docs\foo (different guid as the first)\file2

where foo has a different guid and therefore the files are not nested appropriately.

If this does not make sense I can elaborate further.

Thanks
Jonathan Chauncey
Webmaster
Florida Department of Law Enforcement

User avatar
Member
Member
gary.chan-e-crusade - 8/27/2008 1:43:39 AM
   
RE:File Import bug
Hi Jonathan,

I experienced same problem
http://devnet.kentico.com/Forums.aspx?ForumID=17&Thread=00004500

And the duplicate foo folder happens only when you have error while file import failed. The duplicate folder problem goes away when import works.

Up till now I still have no idea what caused the problem and how it was fixed, and the import error problem happens again two days ago.

Any idea how to solve it?

Regards,
Gary

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 8/28/2008 8:54:52 AM
   
RE:File Import bug
Hi Gary and Jonathan,

I think I have reproduced the issue, but I am not sure if I have set the environment right.

Here is what I have set up:
- I have denied "write" permissions to the whole web project directory for the ASP.Net account.
- CMS is set to store files only in file system
- Some files placed in the CMSImportFiles folder under some sub-folder

Now, I ran the file import. I got a message that the access to the disk is denied which is correct. I have checked selected location and I noticed that the sub-folder was created for each file that should be imported. There is only information in the content tree. If I view any of the files, it does not contain binary data. Is that right? When I allow the account to write to the disk, everything works fine.

Unfortunately this seems to be a bug in current version. For some reason are the records added to the DB about the files even there is no permission to write to the disk and the multiple creation of it is also strange.

We are very sorry for this inconvenience. We will fix it in the next version.

Best Regards,
Juraj Ondrus

User avatar
Member
Member
gary.chan-e-crusade - 8/31/2008 10:34:35 PM
   
RE:File Import bug
Hi Juraj,

Did you get the same file import error message as mine?

Some files can't be imported to given target. ([DataConnection.ExecuteQuery]: Query: INSERT INTO CMS_VersionHistory ( [NodeSiteID], [DocumentID], [DocumentNamePath], [NodeXML], [ModifiedByUserID], [ModifiedWhen], [VersionNumber], [VersionComment], [ToBePublished], [PublishFrom], [PublishTo], [WasPublishedFrom], [WasPublishedTo] ) VALUES ( @NodeSiteID, @DocumentID, @DocumentNamePath, @NodeXML, @ModifiedByUserID, @ModifiedWhen, @VersionNumber, @VersionComment, @ToBePublished, @PublishFrom, @PublishTo, @WasPublishedFrom, @WasPublishedTo); SELECT @@identity AS [VersionHistoryID]: caused exception: INSERT statement conflicted with COLUMN FOREIGN KEY constraint 'FK__CMS_Versi__Modif__72C60C4A'. The conflict occurred in database 'KenticoCMSDev', table 'CMS_User', column 'UserID'. The statement has been terminated.)


- I asked our System Admin to make sure "write" permission was granted
- CMS set to store files in database and file system (actually tried db only as well as file system only, same problem.)
- File import failed (error message given above)
- "CMS Desk > Content > New > File" always works


Sounds like something else caused the problem?


Regards,
GC

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 9/1/2008 1:44:49 AM
   
RE:File Import bug
Hi again,

No, I did not get this error. I assume that you are using 3.1 version, right? If yes, this is related to another bug. I am sorry for this. It was already fixed in the 3.1a version so you can upgrade.

But as I can see, you have the source code license, the fix is very simple. Could you please send us an e-mail to support@kentico.com and please refer to this forum or to me. Thank you.


Best regards,
Juraj Ondrus

User avatar
Member
Member
James.Arnott-Gibson - 11/3/2008 9:13:41 AM
   
RE:File Import bug
Jonathan,
Did you get any response back to this issue? In looking at the security on the directory on my test machine, I am not seeing any access issues, everyone has full access. Still the file does not upload.

Thanks,
James Arnott
Senior Web Developer
Gibson Corp