Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images in navigation portlet shown with improper URL #1364

Closed
zopyx opened this issue Feb 4, 2016 · 9 comments
Closed

Images in navigation portlet shown with improper URL #1364

zopyx opened this issue Feb 4, 2016 · 9 comments

Comments

@zopyx
Copy link
Member

zopyx commented Feb 4, 2016

See screenshot taken from plone-demo.info.

It shows broken images inside the navigation portlet due to the fact the the src of the images broken. It seems to contain the physical path of the object instead of the correct address related to the VHOST.
out

Tested with Plone 5.0.2

@thet
Copy link
Member

thet commented Feb 4, 2016

Slightly related: #1322

@davilima6
Copy link
Member

Closed in plone/plone.app.portlets#79.

@fgrcon
Copy link
Member

fgrcon commented Aug 8, 2016

rendered: https://www.plone-demo.info/**plone**/images/image-5/@@images/image/icon
should be: https://www.plone-demo.info/images/image-5/@@images/image/icon

works now since: plone/plone.app.portlets@dd25cf7#diff-9696d73de0c15089bb62b2e4bd96d4db
thanks @davilima6 , @jensens

but: now renders (without virt host) as
....192.168.1.15:8080**/Plone/**/Plone/ordner-2/140-2012-09-07_img_0454.jpg/@@images/image/icon

should?:
....192.168.1.15:8080/Plone/ordner-2/140-2012-09-07_img_0454.jpg/@@images/image/icon

(sorry was my bug, did not test with virt host)
concurrent editing :-)

@davilima6
Copy link
Member

davilima6 commented Aug 8, 2016

@fgrcon: I actually confirm the double /Plone/Plone without Vhost. I made a PR now (plone/plone.app.portlets#82) with a fix.

I didn't test with Vhost (is it possible to try it without Apache/ngnix?), but in my new commit I use getURL, which I believe should be already informed by VHM.

@fgrcon
Copy link
Member

fgrcon commented Aug 9, 2016

@davilima6 you'r right. The Monster does the translation ... . There is a new pull request plone/plone.app.portlets#83 (even simpler code) which should work in both ways.
http://jenkins.plone.org/job/pull-request-5.1/529/ let's see what jenkins thinks about it :-)

I dont know, if there is a way testing vhosts without using a Web server. I run my different plone instances on virtual machines with debian - its quite simple to configure apache or nginx ...

@davilima6
Copy link
Member

davilima6 commented Aug 9, 2016

@fgrcon: I didn't understand #83. The only diff from #82 seems to be the var name (from icon_url to thumb_url) and, more importantly, the use of node/path instead of node/getURL (which I reference as item_url). The former is how it is now in master, since imageBase is node/path, so I don't see the fix.

@fgrcon
Copy link
Member

fgrcon commented Aug 9, 2016

@davilima6 : not quite the same:
with node/getURL :
I got :
...//192.168.1.15:8080/Plone/ordner-2/140-2012-09-07_img_0454.jpg**/view**/@@images/image/icon
...//ploneori.dev/Plone/ordner-2/140-2012-09-07_img_0454.jpg/view/@@images/image/icon

But I am somewhat confused. ,Im just doing some research myself. I branched back to 3.1.3 where i did my last modifications. I still cannot reproduce the bug - it worked a as intented !!

@davilima6
Copy link
Member

davilima6 commented Aug 9, 2016

I updated plone/plone.app.portlets#82 from node/getURL to node/item/getURL because the brain doesn't include the /view/ part. I think it should be ok now :) - aka it seems we need to add some tests.

@fgrcon
Copy link
Member

fgrcon commented Aug 9, 2016

@davilima6 👍 Looks great! Now there are correct absolute paths to the thumbs (with or without vhm) which should be safe - i guess the problem was somewhere with virtual host mapping. I closed plone/plone.app.portlets#83

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants