We have this example.settings.local.php file, which gives a bunch of suggestions for developer settings.

One of them is:

// Disable the render cache, by using the Null cache back-end defined by the
// development.services.yml file above.
$settings['cache']['bins']['render'] = 'cache.backend.null';

We need to add a note saying that you cannot do this until after Drupal is installed. If you try to install with this line in your settings.local.php file, you will get a fatal error saying that the cache.backend.null service doesn't exist, and the install will be left in an unusable state where you'll need to wipe out the database manually and start over.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhodgdon’s picture

Title: Suggested seeting in example.settings.local.php for render doesn't work in install » Suggested setting in example.settings.local.php for render doesn't work in install
astrocling’s picture

Assigned: Unassigned » astrocling

I am going to work on this

astrocling’s picture

Assigned: astrocling » Unassigned
Status: Active » Needs review
FileSize
947 bytes

I think that this will work for what you are looking for. Please see patch

jhodgdon’s picture

Status: Needs review » Needs work

Thanks! I think the wording is fine... Your patch has blank spaces at the ends of some lines, though, and the rest of this file is commented with // not /** comments, so I think we should stay consistent.

By the way, most programming editors have options to either highlight or remove end-of-line spaces. If you plan to continue contributing Drupal patches (and I hope you will), you might want to find that setting in your editor.

astrocling’s picture

Status: Needs work » Needs review
FileSize
989 bytes
1.06 KB

Thanks for looking at it jhodgdon. I have removed the whitespace as requested and made some changes to align my patch more with the rest of the document. I did leave the /** commenting in because it does align more with the way the rest of the file is commented. Though towards the beginning of the file the commenting, which is one or two lines, uses the // comment format, later in the file when the comments get to be multiline they reverted to the /** commenting format.

I think that the way it is in this patch conforms well to the structure that is currently present. Being relatively new to contributing to Drupal, would changing the other comments be appropriate, or would that be more appropriate for another issue ticket?

jhodgdon’s picture

Please do not set patches to "do not test", because testing will at least verify that the patch applies and that you did not introduce any PHP errors in the file(s) you patch.

I see what you mean about the comment style being inconsistent in this file. It probably should be changed to all /** */ comments... probably best to file a separate issue. Want to do that?

Anyway... Can you please upload a new patch without the "do not test" in the name, so it can be tested? Thanks!

astrocling’s picture

Ok Here is the patch, without the do not test appended. I was misguided there, and under the impression that documentation changes shouldn't be run through the automated testing process.

I will create another issue for the commenting style, and I might just go ahead and fix it.

Damien Tournoud’s picture

That looks like a long documentation... of a bug?

I would rather fix the bug, or condense this documentation. Our example setting files are already much too long.

jhodgdon’s picture

Damien: It might be a bug and might not, but ... for now it doesn't work. I am not sure how to condense the note except to just say "Don't use this until after your site is installed."

Damien Tournoud’s picture

@jhodgdon: I think that would be enough. I don't think we should heavily document bugs.

jhodgdon’s picture

Status: Needs review » Needs work

OK, let's condense this down then.

astrocling’s picture

Assigned: Unassigned » astrocling

I will make the change and post a new patch.

astrocling’s picture

Assigned: astrocling » Unassigned
Status: Needs work » Needs review
FileSize
758 bytes

Here is the new patch with the reduced wording. I didn't do a diff since the change is pretty well documented and small.

Status: Needs review » Needs work

The last submitted patch, 13: Drupal-cache_bin_render_doc-2321407-13.patch, failed testing.

astrocling’s picture

Resubmitting to attempt to resolve failed test.

jhodgdon’s picture

Status: Needs work » Reviewed & tested by the community

You do not need to upload a patch again. All you need to do is hit the "retest" link. If you do upload a patch, you need to set the status to "needs review" in order to trigger a test.

Also, you can click "view" under the test summary to see the full results. If you look at the results for the patch in #13, you'll see that there was a "too many connections" database error causing a number of test failures, which has nothing to do with this patch.

Anyway... This patch is fine, thanks! I'll go ahead and set to RTBC; if others disagree they can change the status.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll
git ac https://www.drupal.org/files/issues/Drupal-cache_bin_render_doc-2321407-15.patch
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   758  100   758    0     0   1373      0 --:--:-- --:--:-- --:--:--  4767
error: patch failed: sites/example.settings.local.php:21
error: sites/example.settings.local.php: patch does not apply
astrocling’s picture

Status: Needs work » Needs review
FileSize
778 bytes

Here is the new patch for the reroll. Please let me know if there is anything else.

jhodgdon’s picture

Status: Needs review » Needs work

Hm. There seem to be a lot of + signs in this patch at the beginnings of lines?

astrocling’s picture

Status: Needs work » Needs review
FileSize
703 bytes

That is totally my mistake, I know why that happened. Thanks for your patience.

Here is the corrected patch.

jhodgdon’s picture

Looks OK now. Thanks! ... Well I guess there should be a "the" in there: " Do not use this setting until after site is installed." => "the site"?

astrocling’s picture

Fixed. I missed that as well.

jhodgdon’s picture

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 5a8dddc and pushed to 8.0.x. Thanks!

  • alexpott committed 5a8dddc on 8.0.x
    Issue #2321407 by astrocling | jhodgdon: Fixed Suggested setting in...

The last submitted patch, 20: Drupal-cache_bin_render_doc-2321407-20.patch, failed testing.

Status: Fixed » Needs work

The last submitted patch, 22: Drupal-cache_bin_render_doc-2321407-22.patch, failed testing.

jhodgdon’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.