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

ZMI is broken when using a Zope deployment other than root #647

Closed
sneridagh opened this issue Jun 9, 2019 · 5 comments

Comments

@sneridagh
Copy link
Contributor

commented Jun 9, 2019

CSS and JS resources are pointing (probably hardcoded) to the root and result in broken ZMI in a classic Zope non-root deployment.

Demo:
https://plonedemo.kitconcept.com/api

access ZMI admin//admin

Outcome:
image

Nginx conf:

    location ~ /api($|/.*) {
      rewrite ^/api($|/.*) /VirtualHostBase/https/plonedemo.kitconcept.com:443/Plone/VirtualHostRoot/_vh_api$1 break;
      proxy_pass http://plonedemoapi;
    }

Related: plone/Products.CMFPlone#2868

@sneridagh

This comment has been minimized.

Copy link
Contributor Author

commented Jun 9, 2019

The problem can be seen also in: https://volto.kitconcept.com/api/manage

@icemac

This comment has been minimized.

Copy link
Member

commented Jun 12, 2019

So the solution would be to make an actual URL of these paths before adding them to the HTML code.

@icemac icemac added the bug label Jun 12, 2019

@icemac icemac added this to To do in Zope 4 bugfix via automation Jun 12, 2019

@icemac icemac added this to the 4.0.1 milestone Jun 12, 2019

@icemac icemac added the help wanted label Jun 12, 2019

@sneridagh

This comment has been minimized.

Copy link
Contributor Author

commented Jun 12, 2019

Detecting the VHM config (if any) then add it to the URL I would say. In Plone is is done in several points. I can’t remember where, also current Zope might have changed it. There’s too much food in my plate right now If someone can take care of it will be awesome.

@sneridagh

This comment has been minimized.

Copy link
Contributor Author

commented Jun 12, 2019

Ok, I had a moment this morning to take a look how it was done before:
https://github.com/zopefoundation/Zope/blob/2.13/src/App/dtml/manage_page_header.dtml#L24

We have to bring back the &dtml-BASEPATH1; prefix to all the static resources in the templates as it was done before. I tested it in a production site and works well. The variable is still there too, ready to be reapplied.

It's a low hanging fruit, perfect for next week sprint @pbauer @mauritsvanrees @jensens @thet

@icemac icemac modified the milestones: 4.0.1, 4.0.2 Jun 18, 2019

@icemac icemac removed the help wanted label Jun 20, 2019

@icemac icemac moved this from To do to In progress in Zope 4 bugfix Jun 21, 2019

Zope 4 bugfix automation moved this from In progress to Done Jun 21, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.