Geta / geta-optimizely-contenttypeicons

Override to the built in "ImageUrlAttribute" that is used to specify preview images for the different contenttypes in your Optimizely project.
2 stars 5 forks source link

Thumbnails are displayed different on Opitmizely integeration environment DXP (v12) #4

Closed drendotnet closed 2 years ago

drendotnet commented 2 years ago

Hi,

I installed Geta.Optimizely.ContentTypeIcons package v.1.0.0 in our .net 5 application, the defined thumbnails look well on my local machine, but not on the integration environment

Local:

image

Integration environment, it shows just rectangles:

image

The src Url look same locally or on INT. I see no errors in console log and this happens in multiple browsers.

Its configured like this in my Startup class

  services.AddContentTypeIcons(x =>
            {
                x.EnableTreeIcons = false;
                x.ForegroundColor = "#ffffff";
                x.BackgroundColor = "#dc0032";
                x.FontSize = 40;
            });

Do you you have any experience with that? What can I try?

Thank you!

valdisiljuconoks commented 2 years ago

Hi,

Can you check if you have .zip file in modules directory in INT env?

QuirijnLangedijk commented 2 years ago

Hi @valdisiljuconoks,

Were running into the same issue. We've checked and the zip file exists on our int env

drendotnet commented 2 years ago

Hi,

Can you check if you have .zip file in modules directory in INT env?

Hi @valdisiljuconoks, yes it exists on the integration environment

Dandroid5000 commented 2 years ago

Hi, just flagging that we are having the same issue

daniariesan commented 2 years ago

Same issue here, code is deployed in a linux environment (thinking of lower/uppercase letters issue here in a path for a font or another needed resource). We have the zip file in the modules directory, too.

marisks commented 2 years ago

Thanks! I'll check this issue today/tomorrow.

marisks commented 2 years ago

Found the issue. The issue is that System.Drawing does not work on Linux. I have made the PR that adds the support: https://github.com/Geta/geta-optimizely-contenttypeicons/pull/6

There is one downside though. Optimizely 12 is using ImageSharp library 1.x but we need 2.x to work with images. It means that for the Linux version to work, one should install ImageSharp 2.x explicitly in their project. And that might have some issues if Optimizely is using APIs that have changed from 1.x to 2.x.

daniariesan commented 2 years ago

Optimizely 12, at latest version, seems to use ImageSharp 2.x, Is it possible please to publish a new version with this fix? Thanks

marisks commented 2 years ago

I have uploaded the new version 2.0.0 to the feed. Once it will be published, you can try it. There is one thing though. Optimizely haven't upgraded all packages to use the right version of dependencies so that ImageSharp 2.x is used. So you have to explicitly install EPiServer.CMS.AspNetCore.Templating and EPiServer.Framework 12.4.2 in your project.

The notes about it are added to the changelog. https://github.com/Geta/geta-optimizely-contenttypeicons/blob/master/CHANGELOG.md#notes