-2

Maybe someone jumped already in this problem before while installing apps on this incredible usable App Module? I failed to install application called "Tutorial Razor Basics" on 2sxc App Module. I got some errors defined below. Other applications installed without problems.

Problem definition:

Error: The import failed. See the messages below for more information.

Warning: File 'Preview for Manage Content not Data.jpg' not copied because it already exists

Error: Could not import the app / package: An error occurred while updating the entries. See the inner exception for details.

Log from DNN Logs: System.NullReferenceException: Object reference not set to an instance of an object. at ToSic.SexyContent.ImportExport.XmlImport.<>c.b__29_4(<>f__AnonymousType243 t) in C:\projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\SexyContent\ImportExport\XmlImport.cs:line 456 at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable1 source, Func2 predicate) at ToSic.SexyContent.ImportExport.XmlImport.ImportXmlTemplates(XElement root) in C:\projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\SexyContent\ImportExport\XmlImport.cs:line 456 at ToSic.SexyContent.ImportExport.XmlImport.ImportXml(Int32 zoneId, Int32 appId, XDocument doc, Boolean leaveExistingValuesUntouched) in C:\projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\SexyContent\ImportExport\XmlImport.cs:line 293 at ToSic.SexyContent.ImportExport.XmlImport.ImportApp(Int32 zoneId, XDocument doc, Nullable1& appId) in C:\projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\SexyContent\ImportExport\XmlImport.cs:line 219 at ToSic.SexyContent.ImportExport.ZipImport.ImportZip(Stream zipStream, HttpServerUtility server, PortalSettings portalSettings, List`1 messages) in C:\projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\SexyContent\ImportExport\ZipImport.cs:line 129

DNN Configuration:

I tried to install module on the following DNN configuration: Win 7 DNN 8.0.3 2sxc module version 08.05.00 (RC version cloned from git-hub. Maybe this is why it failed to install?) SQL 2014 Express

Enhancements:

Some enhancements could be made to "Applications Management UI". It is not a criticism but like a nice things to have: 1) Install a bunch of zips as it takes some time when you want to install several apps in one go. It could be made something like DNN has before when you could install a bunch of zips from particular Install/Modules folder. 2) List of apps could have additional fields "Version". And maybe a "Path" field identifying where the App is stored on the disk. To save some place, "Path" could be added on the app details view which opens when clicking on app item in app list on the grid). 3) Logging of install process. It would be easier to identify what app was failing and where. Especially when installing your own buggy apps ;) We can use of cause DNN logging but it takes some time to filter out exact problem. Good SoC(Separation of Concerns) practice?

Thank you a lot for your time guys from "2sic internet solutions" creating this wonderful product. Danke schön!

Best Regards, Jonas

Jonas
  • 7

1 Answers1

0

I checked last night code of this module trying to figure out where problem lies. It seems that import module XmlImport.cs (~\DesktopModules\ToSIC_SexyContent\SexyContent\ImportExport\XmlImport.cs) on SexyContent module fails when installing app "Tutorial Razor Basics" templates in private method ImportXmlTemplates(). It fails when parsing application manifest file App.config when importing templates for this application. It builds a list of parsed templates objects where some of them are null. This is where problem basically lies. After amending some fixes seems that I can now import applications without problem. Application Import method gives now more logging information about success or failure when importing templates. I post those import results for future development for others if needed as it might help to identify which parameters are not correct in App.config file:

The import has been done. See the messages below for more information. (Toggle success messages)

File 'Preview for Manage Content not Data.jpg' not copied because it already exists

trouble with template 'Basic Content - Image Left' - either type, static or guid are null

trouble with template 'Basic Content - Image Left' - either type, static or guid are null

trouble with template 'Basic Content - Image Left' - either type, static or guid are null

Template 'Basic Content - Image Left' successfully imported.

trouble with template 'Basic Content - Sliding Preview' - either type, static or guid are null

Template 'Basic Content - Sliding Preview' successfully imported.

trouble with template 'Basic Content with Image Preview and slide-effect' - either type, static or guid are null

trouble with template 'Basic Content with Image Preview and slide-effect' - either type, static or guid are null

trouble with template 'Basic Content with Image Preview and slide-effect' - either type, static or guid are null

Template 'Basic Content with Image Preview and slide-effect' successfully imported.

trouble with template 'Basic Content with Lightbox Preview' - either type, static or guid are null

trouble with template 'Basic Content with Lightbox Preview' - either type, static or guid are null

trouble with template 'Basic Content with Lightbox Preview' - either type, static or guid are null

Template 'Basic Content with Lightbox Preview' successfully imported.

Template 'Learn Looping with @foreach' successfully imported.

Template 'Learn Replacing Text' successfully imported.

Template 'Learn to use variables' successfully imported.

Template 'Simple If Statement' successfully imported.

Jonas
  • 7
  • wow - that's a great analysis. Please tell me - is the app in the catalog defect, or is the import-routine the problem? Can you re-export your app now into a working, importable app, or does the problem stay? - many thx! – iJungleBoy Sep 03 '16 at 08:39
  • Hi Daniel, Yes, app is now working. I guess some templates still were not imported because of those null values but I was to tired to look deeper at 3 am in the morning ;) – Jonas Sep 04 '16 at 09:56
  • Hi Daniel, Yes, app is now working. Problem was found in an import routine. I basically added try catch in a foreach loop. I guess some templates still were not imported because of those null values(array of objects having some set to null) but I was to tired to look deeper at 3 am in the morning ;). I can send you a source code for that import file if you would like. Let me know your email. mine is jonas.sarunas at email.lt Great product BTW Kind Regards, Jonas – Jonas Sep 04 '16 at 10:04
  • just sent you a mail asking you to send it to info ... 2sxc.org – iJungleBoy Sep 06 '16 at 12:52