Closed (fixed)
Project:
Drupal core
Version:
8.3.x-dev
Component:
system.module
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
24 May 2016 at 06:39 UTC
Updated:
23 Sep 2017 at 15:11 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
aneek commentedPatch to fix this.
Comment #3
aneek commentedComment #4
aneek commentedComment #6
visabhishek commentedUploading the patch.
Comment #8
aneek commentedHumm, this should not happen. Might be a issue with other scripts running in the CI.
Comment #9
rajeshwari10 commentedGiven a try to apply the same patch just to see whether it get pass or not.
Thanks!!
Comment #10
rajeshwari10 commentedGiven a try to apply the same patch just to see whether it get pass or not.
Thanks!!
Comment #12
aneek commented@rajeshwari10,
These should not come in this patch. Please remove and re-apply the patch.
Thanks!
Comment #13
sagar ramgade commentedPatch corrected as per comment #12.
Comment #14
aneek commentedComment #15
aneek commentedComment #17
imalabyaThe description should be enclosed in
$this->t()for proper translation when used in Classes. I guess this is the reason for failed tests.Din't add an interdiff since it's just a line of code.
Comment #18
dawehnerThank you for providing the patch. This is indeed the right permission label
Comment #20
dawehner.
Comment #21
alexpottSo this is a bit more complex than this. Unfortunately. We shoudl get the translated permission name from the permissions handler so a translator does not have to keep this in sync with whatever ever they've translated the 'access site in maintenance mode' (yep that's the machine name) permission title to be.
Comment #22
gábor hojtsy@alexpott asked me to look in here. IMHO we do use the pattern of looking up specific translations as well as inlining known strings like this in help text, so IMHO either works.
Comment #23
alauzon commentedI'm working on it during the Drupal North code sprint.
Comment #24
alauzon commentedHere is my patch. I did what alexpott suggested on #21:
Please review it and accept it if it is OK.
Comment #25
maxocub commentedThanks @alauzon for your first patch!
I added the DrupalNorth tag and put it in need review to trigger the tests.
Also, it is good practice to add an interdiff when you update an existing patch, that is a file showing only what changed since the previous patch. Here's a link for the doc: https://www.drupal.org/documentation/git/interdiff
Comment #27
pashupathi nath gajawada commentedPlease finf the updated patch.
Done the modifications suggested by Alex #21,
Updated the latest patch of Alauzon #24. by updating the permission label with
$permission_label = $permissions['Use the site in maintenance mode']['title'];.Comment #29
aneek commentedWhere
$permission_labelis used?Extra white space.
exception: [Notice] Line 77 of core/modules/system/src/Form/SiteMaintenanceModeForm.php:Please have a look at this.
Thanks!!
Comment #30
starshapedI believe this is actually the right patch to move this issue forward - it is essentially the patch from #24 so I haven't provided an interdiff.
Comment #32
maxocub commentedThere was a typo in there:
In think the tests should pass now.
Comment #34
quietone commentedApplied the patch to 8.2.x and tested. It works!
Does this need any testing?
Comment #35
erozqba commentedI have also applied the patch to 8.2.x and tested, its looks good to me and I don't think we need to add a test for this, so I'm changing the status.
Comment #36
erozqba commentedSorry, I changed the version by error.
Comment #37
alexpottWell we broke it so adding a test might seem like good idea. This was broken in #620446: Rewrite permission titles and descriptions so these types of bugs are hard to find. We just need an assert that the permission label appears on the page. Considering we're now making the text come from the permission system I think this is worth testing.
Also string changes can only happen in 8.3.0. This is so translations have a chance to keep up.
Comment #38
felribeiro commentedThe test to assert that the permission label appears on the page.
Comment #39
quietone commented@felribeiro, thanks for adding the test.
At first I thought the message in the assertion, "Found the permission message." was too brief. But after running the tests I see that it makes sense in context. And just one question, since
$this->urlis deprecated, does this need to be changed now or later?Comment #40
maxocub commentedIt's a bit out of scope I think, but since we're changing this line, why not.
Comment #41
quietone commentedI guess that answers my question. Thank you. Looks good to me, so RTBC.
Comment #42
alexpott@quietone, @maxocub you are both right - it is out-of-scope. But considering the line is changing seems ok to me.
Committed 73078ed and pushed to 8.3.x. Thanks!
Comment #44
rajeshwari10 commentedComment #46
maxocub commented