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
Fix broken links in RichTextValue.output transformations #17
Conversation
…o an ISite object. This broke relative links and for subsites also internal absolute links. Fixes: #7
In plone.app.contenttypes I've seen code doing: It would be easier if we suggest people to use @pbauer any ideas on this? |
…urrent context. This correctly transforms relative links. See: plone/plone.app.textfield#17
Branch: refs/heads/master Date: 2015-12-21T00:59:29+01:00 Author: Johannes Raggam (thet) <thetetet@gmail.com> Commit: plone/plone.app.event@ed5b5d4 Change the behaviors text getter to use output_relative_to with the current context. This correctly transforms relative links. See: plone/plone.app.textfield#17 Files changed: M CHANGES.rst M plone/app/event/dx/behaviors.py
whats the state here? |
Have to close this. The RichTextValue cannot access its context, so the RichTextValue's output method has to get passed the correct context: |
…eferences for correct relative link resolving. Also see: plone/plone.app.textfield#17
Fix issue, where the RichTextValue.output was transforming relative to an ISite object. This broke relative links and for subsites also internal absolute links. Fixes: #7
Obsoletes branch: https://github.com/plone/plone.app.textfield/pull/thet-fix-issue7
@davisagli - Referring to the discussion in #7
Using
output_relative_to
isn't an option, as all templates are using just output. I don't really like the code for obtaining the context, but it was the only one I could come up with.RFC, NOT READY TO MERGE!
No tests yet, as I want to discuss this issue first. I even have to reconstruct the testcases to provide examples, what was broken when. Wait for it.