Upgrades Questions on upgrading to version 5.x.
Version 5.x > Upgrades > Cannot view new files after upgrade View modes: 
User avatar
Member
Member
allana-lincintegrated - 6/10/2011 2:38:14 AM
   
Cannot view new files after upgrade
I was able to upgrade our client's website from version 3.1 to 5.5 , involves 5 step upgrade which I was able to do without error (at least on SQL side), coz I only turn-on the website after last step.

Fix some issues which are not mentioned in upgrade instructions. (eg )

http://devnet.kentico.com/Blogs/Juraj-Ondrus/September-2009/Upgrading-from-version-4-0-to-4-1.aspx

NOW I'm almost done but got stuck with a really annoying issue..

It seems that I cannot open any new file upload (document type "File")..

there is no error during upload or creating the document, just cant open, only gives me XML error

XML Parsing Error: no element found
Location: http://localhost/CMSPages/GetFile.aspx?nodeguid=bc3d9a36-26e9-4b6c-8f53-caed1efb2902
Line Number 1, Column 1:
^

any idea?




User avatar
Member
Member
allana-lincintegrated - 6/10/2011 3:25:54 AM
   
RE:Cannot view new files after upgrade
Im trying to debug getFile.aspx .. it seems that file.OutputData is empty

but is file.DataLoaded says TRUE ...

User avatar
Member
Member
allana-lincintegrated - 6/10/2011 4:03:27 AM
   
RE:Cannot view new files after upgrade
Further ..

atInfo.AttachmentBinary is NULL, checked it straight on database and its also NULL


User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 6/10/2011 6:12:52 AM
   
RE:Cannot view new files after upgrade
Hi,

just an update -- the procedures run on first start of an application after the upgrade perform some changes in the DB as well, so we can't idnetify what exactly is a problem without repeating the whole upgrading process and running the application after each step.

Regards,
Zdenek

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 6/10/2011 5:06:17 AM
   
RE:Cannot view new files after upgrade
Hello,

First of all, the upgrade procedure assumes that the application is finally run, so it can automatically import new (upgraded) webparts and make some necessary changes.
Skipping that step in each upgrade step except the last one could lead to various issues.

If you have the original backup, we would recommend to run the upgrade procedures again (Yes, I know it's quite time consuming task).

Anyway, are you using any customizations for files?
What are the settings for file storage? Aren't you storing files in file system?

I'm also trying to find records about any similar issues connected with upgrading.

Thank you in advance for any further info.

Regards,
Zdenek

User avatar
Member
Member
allana-lincintegrated - 6/10/2011 8:19:38 AM
   
RE:Cannot view new files after upgrade
yes I have backup of the of original 3.1 version, but maybe i'll do that as last option.. it is really time consuming as you have mention plus another downtime for the website. so if it can be fixed without redoing the whole upgrade process again.. it would be great.

i checked the NewFile.aspx and it boils down to DocumentHelper.AddAttachment line, everything looks okie, its just the binary not saving.
the site is using database as storage. i also tried to switching to filesystem and try to add new file but its seems not to work either.


User avatar
Member
Member
allana-lincintegrated - 6/10/2011 8:24:19 AM
   
RE:Cannot view new files after upgrade
only one customization on login.aspx where I add 3 strike rule on login attempt and it will banned, all other customization were isolated and on different folder (webparts, modules) so im sure its not customization issue.

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 6/13/2011 7:37:28 AM
   
RE:Cannot view new files after upgrade
Hi,

Yes, from this description, it doesn't seem like any customization could have caused this issue.

Nevertheless, as I've mentioned earlier, it's hard to say what exactly went wrong without comparison with working instance that went through regular upgrade steps .

Maybe, before you go back to start, you could try to refresh class xml schema. Here is code example:

// get your document type dataclass info object
DataClassInfo dci = DataClassInfoProvider.GetDataClass("yourDoctypeCodeName");
// note it could be also possible to use GetDataClassFromDB("cms.file");

// set the dataclass table name to your custom created table name
dci.ClassTableName = "yourDBtablename";

// obtain class xml schema and form definition
string xmlXchema = CMS.DataEngine.TableManager.GetXmlSchema("yourDBtablename");
string xmlFormDefinition = FormHelper.GetXmlFormDefinitionFromXmlSchema(xmlSchema);

// assign the obtained strings to the class properties
dci.ClassXmlSchema = xmlSchema;
dci.ClassFormDefinition = xmlFormDefinition;

DataClassInfoProvider.SetDataClass(dci);

// Generate queries
SqlGenerator.GenerateDefaultQueries(dci, true, false);

But it's no guarantee, especially if you're missing some data in the DB.

Let me please know if I can be of any further help.

Regards,
Zdenek