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

Make ZMI URL manipulation opt-in #580

Closed
dataflake opened this issue May 1, 2019 · 6 comments

Comments

@dataflake
Copy link
Member

commented May 1, 2019

Currently the ZMI uses a Javascript snippet in manage_page_footer to set the URL in the browser URL bar to the URL of the right-hand frame. Under Zope 2, the main URL was always stable unless you explicitly opened a frame separately. Frank has explained his reasoning and it makes sense for some use cases, but this issue is not about questioning that choice.

Today I found myself patching manage_page_footer for a customer so their experience moving from Zope 2 to Zope 4 will be smoother and they are not faced with unexpected behavior. They use the ZMI a lot.

I would really like that URL manipulation to be opt-in instead of the default. I'm not sure where or how to store such a preference. A new configuration key for the Zope configuration seems too heavy for this.

@dataflake dataflake added the question label May 1, 2019

@dataflake dataflake added this to the 4.0 final milestone May 1, 2019

@dataflake dataflake self-assigned this May 1, 2019

@dataflake dataflake added this to To do in Zope 4 final release via automation May 1, 2019

@jugmac00

This comment has been minimized.

Copy link
Member

commented May 2, 2019

I would really like that URL manipulation to be opt-in instead of the default.

I am +1 on this.

When you say "Zope configuration" I assume you talk about wsgi.conf / wsgischema.xml?

I would not mind a new configuration key, as also other default behaviours get set there, for example also default-zpublisher-encoding.

As a plus, the new option can be documented there.

If you really think that is too heavy weight, you could set an environment variable - @icemac did this recently to make sending queued emails configurable in mailhost cf zopefoundation/Products.MailHost@ae3907b

But actually this was a different story, as that's a separate package - where wsig.conf/ wsgischema.xml would have been a very odd place, as Zope does not depend on mailhost anymore.

Thinking about this again, I am all in for the new configuration key - let's keep configuration in one place, where it even gets nicely documented. Principle of least asthonishment.

@dataflake

This comment has been minimized.

Copy link
Member Author

commented May 2, 2019

Adding Zope configuration keys is somewhat heavyweight because it needs...

  • a definition in the schema .xml file (and documentation in there)
  • it must be added to the skeleton configuration (with documentation) that feeds mkwsgiinstance
  • it must be handled in code so it's picked up and then stored somewhere where the ZMI can read and use it
  • it must be unit tested

and last but not least

  • support must be added to plone.recipe.zope2instance, including documentation and tests.
@d-maurer

This comment has been minimized.

Copy link
Contributor

commented May 3, 2019

@icemac

This comment has been minimized.

Copy link
Member

commented May 6, 2019

From the discussion a new configuration key for the Zope configuration seems the best way to go forward, so the feature is tested and documented.

The alternatives @d-maurer listed are not really appealing to me.
Another possibility could be to remove the feature but this would destroy the use case of someone else.

@drfho

This comment has been minimized.

Copy link
Contributor

commented May 6, 2019

it makes sense for some use cases

the use cases are 1. settting bookmarks and 2. copy/paste URLs from the browser eg. into a ticketing system. Of course with Zope2 we somehow got used to that problem. That's why it is not critical and it should be okay to postpone it by commenting the line
https://github.com/zopefoundation/Zope/blob/master/src/App/dtml/manage_page_footer.dtml#L7
until we add it as a configurable feature 'Bookmarkable URLs' to 4.1.?

@dataflake

This comment has been minimized.

Copy link
Member Author

commented May 6, 2019

I'll make it into a configuration option. Asking people to dive into the egg and edit a file is completely unacceptable.

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