Image Gallery

Topics: General, Troubleshooting
Feb 22, 2015 at 5:57 PM
I have installed the image gallery and added it to "page" content type. Then created a gallery and selected it on the page. All works fine on my local but the image gallery does not show when I publish the web site to my server.

Any ideas what I may be doing wrong?
Developer
Feb 22, 2015 at 10:16 PM
At least two things to check:
  1. Is the gallery shape itself being rendered but simply not the images (are the images being requested but return 404)?
  2. Anything suspicious in App_Data/Logs? E.g. exceptions thrown from part drivers?
Feb 24, 2015 at 12:20 AM
sfmskywalker wrote:
At least two things to check:
  1. Is the gallery shape itself being rendered but simply not the images (are the images being requested but return 404)?
  2. Anything suspicious in App_Data/Logs? E.g. exceptions thrown from part drivers?
1) I inspected the html, and the image gallery is not even generated. No 404 errors.

2) not sure, I'll check and get back you.
Feb 24, 2015 at 12:40 AM
Edited Feb 24, 2015 at 12:43 AM
ToddForsberg wrote:
2) not sure, I'll check and get back you.
The file, "orchard-error-2015.02.23.log", in App_Data\Logs is blank (zero-bytes).

Also, I have tested in Chrome, FF, and IE; all with the same results.
Feb 24, 2015 at 1:26 AM
I found that the logging was set to <priority value="ERROR" />. I changed it to <priority value="ALL" />.

I reloaded the page and inspected the log. The only line that I saw that looked like it could pertain to this is:

2015-02-23 17:16:06,274 [19] Orchard.Environment.Extensions.ExtensionManager - (null) - No suitable loader found for extension "Mello.ImageGallery"

Why would this work locally but not on the server?

BTW: I have been using VS publish feature. Should I just try to copy the whole thing via ftp to server?
Feb 24, 2015 at 2:02 AM
I am trying to just upload the whole project via ftp to see if that makes any difference.

In the meantime I found another msg similar. I'm not sure if this is the same issue or not.

FYI: I'm using arvixe hosting (Windows Server 2012 R2).
Feb 24, 2015 at 8:51 PM
FTP upload was a complete failure. So many errors.
Feb 25, 2015 at 3:28 AM
VS publish should work just fine. Which Version of Orchard do you use? Which Version of the .net Framework is active on your hosting env?
Feb 25, 2015 at 3:59 AM
You can have this error: "No suitable loader found..." when you install a theme / module that is not precompiled. Then, it's dynamicaly compiled at run time. So, maybe your module fails to compile on your server. Dynamic compilation is a great feature, you can update some code without building the solution with VS, but it's not recommended on a production site. E.g on Azure Websites, dynamic compilation doesn't work correctly...

If not already done, integrate the project of this module in your solution through the Modules folder, then check the References of your module, in the module project properties see if it's the same .net version as others projects in the solution... Then, rebuild all

For publishing, there are different way, in the root folder there is a "ClickToBuild.cmd" command that provide a web package with all the binary files but also with the sources files (.cs, .csproj). This command run all the unit tests and can fail in some Orchard versions. You can also use the dev console in the Visual Studio tools and go to the Orchard root folder and run "build precompiled", normally this will provide a precompiled package with only the necessary files (bin/*.dll, no sources files...)

Finally, you can right click on the Orchard.Web project (in your solution). Note: I assume you have the full source code, not only the web package. Then, you provide a publish name, you can choose the file system option (if you don't have publish profile), select a destination directory and publish. You will get a precompiled package ready to be used on your server

Best,
Feb 25, 2015 at 2:31 PM
benschi11 wrote:
VS publish should work just fine. Which Version of Orchard do you use? Which Version of the .net Framework is active on your hosting env?
Orchard: 1.8.1
.NET: 4.5
Feb 25, 2015 at 2:32 PM
jtkech wrote:
You can have this error: "No suitable loader found..." etc..
Thank you for your response. I will look into this tonight.
Feb 26, 2015 at 10:37 PM
I tried the pre-compile option in the publish settings -- no change. I have not tried the ClickToBuild.cmd yet.
Feb 27, 2015 at 1:42 AM
Just tried to integrate the Mello.ImageGallery module in an Orchard 1.8.1 version, it fails to compile

I've dowloaded this module and put its content in the "Modules" folder. In Visual Studio, I've right click on the "Modules" folder to "Add an existing project - Here, you have to go to the Mello.ImageGallery folder and select its *.csproj file - Then, when this module was integrated in the solution, I've done a rebuild and it failed to compile. Here's what you have to do to update this module

In the properties of this module, change the .net version from 4 to 4.5, this to be the same as the other projects in the solution

This module has a Lib folder with some .dll, and some project references of this module point to these local .dll, this in place of pointing to the right projects in the solution. So, for each one, click on the "References" of this module, select and delete the reference, then right click on "References" and click on "Add a reference", here you can choose a project and add it. You have to do that for: Orchard.Core, Orchard.Framework and Orchard.MediaLibrary. Note that this last one is deprecated but still in the slution for compatibility

Idem for the ICSharpCode.SharpZiplib reference, delete it and re-add it. But here you have to browse from the Orchard root folder to the lib/msbuild/ICSharpCode.SharpZipLib.dll file

Finally, some System.Web references point to some asp.net mvc4 assemblies locally installed. So, delete them and re-add them. Here you have to browse from the Orchard root folder to the lib/aspnetmvc/ folder. This concerns System.Web.Mvc, System.Web.WebPages and System.Web.WebPages.Razor

Then, you can clean and rebuild all the solution

About my test for publishing by right clicking on the Orchard.Web project, I didn't check any option, I've just selected a destination directory. Then, the package provided in this destination directory was precompiled

But, first try to rebuild all correctly and publish as you was doing it before

Best,
Feb 28, 2015 at 7:35 PM
Edited Feb 28, 2015 at 7:36 PM
I'm very new to Orchard and also somewhat new to .NET... I'm not sure if I understand exactly how to correct this. I really do appreciate your help and I really like Orchard, but for now I may just look to find a different module or code it myself. Thanks again!

PS: I will continue to monitor this post for future info.