globaleaks / globaleaks-whistleblowing-software

GlobaLeaks is a free and open-source whistleblowing software enabling anyone to easily set up and maintain a secure reporting platform.
https://www.globaleaks.org
Other
1.25k stars 274 forks source link

Channel image aspect ratio rendered to 2:1 instead of 1:1 on squared images within channel button #4303

Closed giacomouberti closed 1 week ago

giacomouberti commented 2 weeks ago

What version of GlobaLeaks are you using?

5.0.20

What browser(s) are you seeing the problem on?

Chrome

What operating system(s) are you seeing the problem on?

macOS

Describe the issue

After the update to V5 all channel picture that were previously uploaded as a squared image are now displayed with a forced 2:1 aspect ratio resulting in a stretched picture to fill the button with the channel name.

On the channel page before the questionnaire the image is displayed correctly

Proposed solution

No response

evilaliv3 commented 2 weeks ago

@giacomouberti : would you please provide some information to better reproduce the issue? e.g. a screenshot or the image that need to be tested?

thanky you.

We are traing to train our users to provide complete tickets to be able to support you all more fastly.

giacomouberti commented 2 weeks ago

Sure @evilaliv3, here's a screenshot from a demo site we're using

Screenshot 2024-11-11 alle 14 32 16

and here's the html rendered code of one of the card

<div class="select-card">
        <div class="row">
          <div class="col-md-12 title">SAFEGUARDING</div>
        </div>

          <div class="row ng-star-inserted">
            <div class="col-md-4">

                <img alt="context picture" width="500" height="500" class="context-image ng-star-inserted" loading="lazy" fetchpriority="auto" ng-img="true" src="/s/09d47ac0-6415-40d5-9293-93c137123f45">
              <!----></div>
          </div>
        <!----><!----></div>

Here's a link to the image https://demo.wb.teseoerm.com/s/09d47ac0-6415-40d5-9293-93c137123f45

evilaliv3 commented 2 weeks ago

Thank you @giacomouberti

It is effectively a regression on release 4.

We are proceeding issuing a patch that will be included in the minor release 5.0.25 that we we will be issuing today.

evilaliv3 commented 2 weeks ago

Thank you @giacomouberti

would you please retry with release 5.0.25?

giacomouberti commented 2 weeks ago

Hi there @evilaliv3, I just installed the updated release but now the image appears like a missing source and indeed in the rendered html this is the output missing, in fact, the source

<div class="select-card">
        <div class="row">
          <div class="col-md-12 title">DEMO WHISTLEBLOWING</div>
        </div>

          <div class="row ng-star-inserted">
            <div class="col-md-4">

                <img alt="context picture" class="context-image ng-star-inserted">
              <!----></div>
          </div>
        <!----><!----></div>

In the console on the client side you get the error "TypeError: Cannot read properties of undefined (reading 'toString')"

The image isn't visible even from the backend in the context settings

Screenshot 2024-11-11 alle 23 02 42 Screenshot 2024-11-11 alle 23 02 53

When you choose one of the context on the questionnaire's page the picture is displayed regularly

Screenshot 2024-11-11 alle 23 22 20
evilaliv3 commented 1 week ago

@giacomouberti : The issue on the loading of images was a different issue appeared in 5.0.25.

Now both the two issues should be fixed in release 5.0.26