OpenEMM 2011: Cannot view images in mails & previews [fixed]

Use this forum for questions regarding adoption and functionality of OpenEMM

Moderator: moderator

friedbrain
Posts: 62
Joined: Tue Aug 25, 2009 8:17 am

OpenEMM 2011: Cannot view images in mails & previews [fixed]

Post by friedbrain »

I have a similar problem to https://forum.openemm.org/post4170.html but I am using OpenEMM 2011 with Tomcat:

I see the image in the template view but nor in the preview or the actual email. In the catalina.out I only see SQL selects while clicking on preview.

My guess is as follows:

The template view uses this URL style:
http://<my-hostname>/openemm/sc?compID=19

Email and preview are using this:
http://<my-hostname>/image?ci=1&mi=5&name=logo.jpg

When I put an image directly in the webapps folder I also get nothing in IE9 or an error message in Firefox.
When I put it one folder deeper into openemm the very same image suddenly appears.

In the server.xml of the corresponding Tomcat I see this passage:

Code: Select all

<Context docBase="openemm" path="" reloadable="true" />
I think this restricts the access to the folder openemm.

When I search the OpenEMM folder for image? I get several cms_image? occurrences but only this for the plain image?:

Code: Select all

fname = '<%= company.getRdirDomain() %>/image?ci=<%= company.getId() %>&mi=<%= tmpMailingID %>&name=' + fname;
in webapps/openemm/fckeditor-2.6.4.1/editor/filemanager/browser/emm/browser.jsp.

Other occurrences are in these classes:
webapps/openemm/WEB-INF/classes/org/agnitas/backend/Data.class
webapps/openemm/WEB-INF/classes/org/agnitas/web/MailingComponentsAction.class
and the openemm-2011.sql

Is there a special reason why image is called in the root folder and not in the openemm folder?

When I call

Code: Select all

http://[i]<my-hostname>[/i]/openemm/image?ci=1&mi=5&name=logo.jpg
instead I can see the image.

Is this a bug?
Last edited by friedbrain on Thu Jan 31, 2013 12:57 pm, edited 1 time in total.
maschoff
Site Admin
Posts: 2628
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: OpenEMM 2011: Cannot view images in mails & previews

Post by maschoff »

Please make sure to adjust settings in file emm.properties for use of classic templates and settings in file cms.properties for use of CM templates and adjust rdir_domain in company_tbl.

I do not understand how you link your images. In general there are two possibilities:
1. Save images on your web server and link to them directly
2. Upload images via tab "graphics components" and include them via tag agnIMAGE or agnIMGLINK
OpenEMM Maintainer
friedbrain
Posts: 62
Joined: Tue Aug 25, 2009 8:17 am

Re: OpenEMM 2011: Cannot view images in mails & previews

Post by friedbrain »

maschoff wrote:Please make sure to adjust settings in file emm.properties for use of classic templates
I did not find a parameter for that.
maschoff wrote:and settings in file cms.properties for use of CM templates
No parameter there neither.
maschoff wrote:adjust rdir_domain in company_tbl.
With or without the openemm folder? I already set it without the openemm subfolder.
maschoff wrote:2. Upload images via tab "graphics components" and include them via tag agnIMAGE or agnIMGLINK
This with agnIMAGE.
friedbrain
Posts: 62
Joined: Tue Aug 25, 2009 8:17 am

Re: OpenEMM 2011: Cannot view images in mails & previews

Post by friedbrain »

friedbrain wrote:
maschoff wrote:adjust rdir_domain in company_tbl.
With or without the openemm folder? I already set it without the openemm subfolder.
As the links in the mail also didn't work I've just tried it with the openemm subfolder included and both work now.
maschoff
Site Admin
Posts: 2628
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: OpenEMM 2011: Cannot view images in mails & previews [fi

Post by maschoff »

I am curious: What do you mean by openemm subfolder, i.e. which path do you use?
OpenEMM Maintainer
friedbrain
Posts: 62
Joined: Tue Aug 25, 2009 8:17 am

Re: OpenEMM 2011: Cannot view images in mails & previews [fi

Post by friedbrain »

I use
<hostname>/openemm
for rdir_domain in company_bbl.

This references to the openemm subfolder in the webapps folder which is the Tomcat web server root in the default configuration delivered with OpenEMM 2011:

Code: Select all

<Engine name="Catalina" defaultHost="OpenEMM">
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
      <Host name="OpenEMM"  appBase="webapps" autoDeploy="true" unpackWARs="false" xmlValidation="false" xmlNamespaceAware="false">
        <Alias>localhost</Alias>
        <Valve className="org.apache.catalina.valves.FastCommonAccessLogValve"
               resolveHosts="false" directory="${catalina.base}/logs/access/" rotatable="true" buffered="true"
               prefix="" suffix="-access_openemm.log" fileDateFormat="yyyyMMdd"
               pattern='%a %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"' />
        <Context docBase="openemm" path="" reloadable="true" />
      </Host>
    </Engine>
docBase="openemm"
Post Reply