Issue Bug Closed

#88341Clean URL Problem with image

Hans-Georg Althoff 05/13/19, 11:44 updated 09/04/19, 14:19

Description

Version 9.5.6
In an extension I have the following code line

<f:image class="detail" src="{plant.image.originalResource.publicUrl}" alt="Bild" width="294" onclick="popup('{plant.image.originalResource.publicUrl}');return false;"/>

with the code for popup

function popup(url) {
    var newImg = new Image();
    newImg.src = url;
    var args ='width='+ newImg.width +',height=' + newImg.height + ',status=no,scrollbars=yes,resizable=yes,location=no';

    fenster = window.open(url, 'popup',args);
    fenster.focus();
    return false;
}

If I click on the picture, a URL will be generated, which looks like
http://www.mydomain.de/Garten/fileadmin/…./picture.jpg

I get a 404 error, because the URL is wrong. The URL should not have “Garten” inside. It should be start with fileadmin.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.