Base solution for your next web application
Open Closed

Template email LOGO #4413


User avatar
0
Ricavir created

Hi,

I don't understand how logo image are being managed when an email is sent from application (let's say a subscription email). See attached screenshot. If I browse directly to TenantCustomization/GetTenantLogo of my website, nothing is shown.

Is it a bug ? Or do I have to configure something else ?

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

14 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    @Ricavir, tenant logo url is determined here <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/blob/master/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Core/Emailing/EmailTemplateProvider.cs#L30">https://github.com/aspnetzero/aspnet-ze ... der.cs#L30</a>.

    Can you show the code you are sending the email ?

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    Ricavir created

    This email was received automaticaly from built-in code of aspnetzero v4 (end subscription email). I will try again with latest aspnetzero v5 and give a feedback ASAP

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    alper created
    Support Team

    hi,

    GetTenantLogo expects a tenantId to be shown. See the source code... Put a breakpoint on the method entry to see the parameters.

    <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/blob/master/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Web.Core/Controllers/TenantCustomizationController.cs#L136">https://github.com/aspnetzero/aspnet-ze ... er.cs#L136</a>

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    Ricavir created

    I dug a little bit more on this issue and found the problem. In method GetTenantLogo, the URL that is set for defaultLogo is wrong : you should add "/Assets" to the URL.

    var defaultLogo = "/Assets/Common/Images/app-logo-on-" + skin + ".png";
    
    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    ismcagdas created
    Support Team

    @Ricavir are you using angular 5 version ?

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    Ricavir created

    yes

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    ismcagdas created
    Support Team

    I have created an issue here <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/issues/1016">https://github.com/aspnetzero/aspnet-ze ... ssues/1016</a>. We will test and fix this.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    alirizaadiyahsi created

    Hi @Ricavir, did you test this issue at latest asp.net zero?

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    Ricavir created

    Hi, no I've tested this on v5.1.0. Bug fix is planned for v5.4.0 release.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    alirizaadiyahsi created

    Actually it looks there is no bug. So I asked you if you tested in latest version.

    In latest version, logo url must include "skin" parameter.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    Ricavir created

    The issue was on URL composition

    Origin :

    var defaultLogo = "/Common/Images/app-logo-on-" + skin + ".png";
    

    Fix (adding /assets forlder in URL) :

    var defaultLogo = "/Assets/Common/Images/app-logo-on-" + skin + ".png";
    

    See attached screenshot

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    ismcagdas created
    Support Team

    @Ricavir is that change worked for you ? Because related controller and action are on the Host project but the Assets folder is in the Angular project. It might work if you are using Merged Angular project.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    Ricavir created

    Yes, it worked for me and I'm using merged project

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    ismcagdas created
    Support Team

    @Ricavir thanks. We should fix this and it should work both for merged and not merged solutions. We will use a different solution.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)