Problem/Motivation
When I try to edit a view that I'm editing when logged in elsewhere, I get the expected locked view error message. The message, however, renders as code, rather than formatted. This means that the release lock link is not clickable, and for someone who doesn't know HTML, this might be intimidating.
Steps to reproduce:
- Have two browsers open. Edit a view in one browser, and leave the view in edit mode.
- Go to the other browser, edit the view.
- Make a change to the view. You will see the locked view error message come up.
Proposed resolution
I believe this is the same issue as this one:
https://www.drupal.org/node/2309215
and can be resolved the same way.
My apologies if there is already an issue filed for this that I did not find in my search.
Comment | File | Size | Author |
---|---|---|---|
#9 | Screen Shot 2015-09-25 at 08.40.47.png | 37.55 KB | mr.baileys |
#1 | 2478845-1.patch | 816 bytes | olli |
Images__Content____d8or.png | 94.85 KB | rainbreaw |
Comments
Comment #1
olli CreditAttribution: olli commentedThe problem seems to be in formatInterval when there is more than one component (for example "5 days 31 min").
Comment #2
manauwarsheikh CreditAttribution: manauwarsheikh commentedSeems fine after applying latest patch, marking to RTBC.
Comment #3
RavindraSingh CreditAttribution: RavindraSingh as a volunteer and at Srijan | A Material+ Company commentedTest needs after updating code to
Comment #4
joelpittetSetting parent meta.
Comment #5
joelpittetCan you use SafeMarkup::escape() here? We are avoiding using SafeMarkup::set() as part of this issue #2280965: [meta] Remove every SafeMarkup::set() call. At the very least this needs to be documented why $output is considered safe.
Where is the $output coming from?
Comment #6
joelpittetSorry escape isn't a viable solution, I was looking just at the patch. Here's the context for the concatenation build up of output.
Comment #7
joelpittetI'm going to add this to the postponed list till we figure out this joining issue:
#2501975: Determine how to update code that currently joins strings in SafeMarkup::set()
Comment #8
akalata CreditAttribution: akalata commentedNo longer blocked, though the discussion in #2501975: Determine how to update code that currently joins strings in SafeMarkup::set() might be valuable to identify the best solution in this case.
Comment #9
mr.baileysLooks like this was fixed in head, as I'm no longer seeing the escaped locked message with current HEAD.
The only thing left might be to write a test, although I assume we are not going to test for double-escaping all over the place. It does seem that there is no test for the locked message itself though, so maybe we can add that (which will then implicitly also test for the double-escaping).
Comment #10
akalata CreditAttribution: akalata commentedThanks for finding that mr.baileys! With some research I found this was resolved in #2506479: Replace !placeholder with @placeholder for non URLs in t() in Views, except for t() output that is used as an attribute value. If you'd like to follow up on the test for the revision message, that should be a separate issue.