Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
system.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
6 Jan 2011 at 01:30 UTC
Updated:
29 Jul 2014 at 19:16 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mfbDRUPAL_NO_CACHE makes sense to me, to avoid a glut of cache entries.
Comment #2
rschwab commentedCan you provide steps to reproduce?
I'm seeing different help block content on different pages, for example at admin/structure/block I see:
"This page provides a drag-and-drop interface for assigning a block to a region, and for controlling the order of blocks within regions." etc etc
And on admin/structure/block/add I see:
"Use this page to create a new custom block."
Comment #3
mfbIs block caching active for you? Must be enabled and you cannot be uid 1
Comment #4
rschwab commentedYeah, with block caching enabled and using uid 11 (who has administrator role) I still see the correct help text as described above.
Was there a particular page you noticed this on?
Comment #5
mfbI can reproduce this bug on any page. Can you run this query to see what's in your cache_block table? Mine has empty string cached as the content so the help block is always empty:
Comment #6
catchThis looks like just an oversight to me, I can't see it regressing so I'd support it going in without tests.
Comment #7
catch#1: 1016582-system-help.patch queued for re-testing.
Comment #8
sunLooks also ready for me. However, writing a help.test for this is a matter of 15 minutes.
Comment #9
sunSorry for the noise. Also not major, just a stupid bug. Use http://api.drupal.org/api/drupal/modules--block--block.api.php/function/... to workaround it.
Comment #10
mfbI found something interesting about this bug, which explains why it's not (always) reproducible.
There are two ways for blocks to be added to the block table: by the install profile, or by the block module. The "minimal" and "standard" install profiles included with core both create the system help block with caching disabled! So, it's not easy to create a failing test, since the system help block is already working correctly in a default installation.
I'm sure it's possible to write a test but will take me more than 15 minutes (I already spent 45 minutes figuring out that the block is actually created by the install profile...) Therefore I'd like to nominate this bugfix to be committed without a test :)
Comment #11
sunComment #12
mfbOk here's a test which fails without the patch, I guess it just took another 15 minutes..
Comment #13
mfbThe test in this new, improved patch runs many times faster, and actually tests the bug "correctly" by using the testing profile :) yay for testing profile, we can both speed up the test, and test a bug which isn't found in the standard install profile!
Comment #14
sun1) TDD: Always confirm that a test catches a bug when fixing bugs.
2) In a final follow-up patch, I think we should be able find a different admin page that contains a shorter help text.
Comment #16
mfbOr just assertNoText?
Comment #17
mfbassertNoRaw that is
Comment #18
sunmmm, no, assertNoText/Raw() is insufficient. The assertion may pass in many situations we can't think of. Assertions should always follow the natural expression of an expectation. Our expectation is "that a different help text appears", not "that a certain help text does not appear on other pages".
Comment #19
mfbOk then use a different help block text. although, that's actually how I found this bug, the same help text appeared on every page..
Comment #20
sunThank you! :)
Comment #21
webchickUgh, that's a crappy bug! Thanks for the fix, and the test!
Committed to 8.x and 7.x. Thanks!