Closed (duplicate)
Project:
Drupal core
Version:
8.0.x-dev
Component:
system.module
Priority:
Major
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
24 Aug 2013 at 02:14 UTC
Updated:
29 Jul 2014 at 22:48 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
star-szrThis seems Novice-able to me.
Comment #2
ivan zugec commentedHere's a first-pass at the patch.
Comment #4
ivan zugec commented#2: hook_help_404-2073121-2.patch queued for re-testing.
Comment #6
simanjan commented#2: hook_help_404-2073121-2.patch queued for re-testing.
Comment #7
star-szrNice, @Ivan Zugec!
Maybe a test-only version of the patch would be nice like on https://drupal.org/contributor-tasks/write-tests.
Extra blank line at the end of this test method :)
Comment #8
ivan zugec commentedThanks for the feedback, I'll fix it.
Comment #9
ivan zugec commentedComment #10
ivan zugec commented@Cotter, I have removed the extra blank line and created a separate patch just for the test.
Oh, and ignore comment #9 I slipped and clicked on the save button. :(
Comment #11
yingtho commentedI have testede it and it works as expected. But the test doesn't fail as expected due to the fact that the simpletest run on the admin page only get the content region and the rest of the region is empty. And therefor the test won't fail. I would mark this review "Reviewed and testede by the community" but not sure when the test doesn't work. What is the procedure?
Comment #12
webchickI agree a failing test would be nice here.
Tentatively raising to major. While this doesn't expose anything too badly in Drupal core, it's possible custom modules add sensitive, admin-specific help text and showing that to anonymous users would be un-good.
Comment #13
dsdeiz commentedNot sure how to make the test fail as well. I think this is because the tests uses the Stark theme and "System help" block isn't placed (at least when I tried it). Anyway, just re-rolling the patch.
Comment #14
olli commentedClosed #2140315: The implementation of block_help does not access check the path 'admin/structure/block'; anon users see the help text as a duplicate.
Comment #15
linl commentedSetting to "Needs review" so that testbot can run test for patch in #13.
Comment #16
olli commentedI tried this with simplytest and it does not seem to fix the problem for admin/structure/block.
Also, node system uses hook_help() to display submission guidelines on node/add and node/edit. I tried this and could see the guidelines on access denied page.
#1969270: 403/404 pages: drupal_get_http_header('Status') returns no status code at all looks related.
Comment #17
dawehnerIn general using current_path() is also probably wrong, you should better get it from the request object directly.
Comment #18
internetdevels commentedI'v replaced curent_path() and found way how to obtain Status. Not sure my fix is good but it works.
Comment #19
dawehnerCould it be that we want to show the help text just on 200? Note: \Symfony\Component\HttpFoundation\Response has some constants we could leverage
Let's make the test method public.
I think we should move this test to some help related test and maybe use a more generic path or even better a unit test.
Comment #20
star-szrWorking on this.
Comment #21
star-szrI tried to figure out how to do #19.1 but couldn't quite get there. @dawehner maybe you have a hint for us? :)
So here's an attempt at moving the test to a more logical place and expanding the coverage a bit to another one of the identified bug cases.
Edit: fixed typo.
Comment #22
star-szrForgot to include a test-only patch, and this should get things back to needs work anyway :)
Comment #25
dawehnerWhat about something like this?
Comment #26
sutharsan commentedAdded dawehner's #25 comment to #21 patch.
#19.3
I don't know how to make a unit test for this.
Comment #29
sutharsan commentedBack to needs review. Only the patch without the change failed.
[edit] typo
Comment #30
smira commentedrerolling
Comment #31
smira commentedrerolled patch to fix conflicts
Comment #32
webchickOh shoot. I'm really sorry but I already committed this in another issue. :( #2245783: Regression: Help blocks display on 403/404 page Somehow this issue got missed.