Problem/Motivation

The Internal Page Cache module has been committed as a new module. Some of its functionality might be described in the System module help.

Proposed resolution

Check whether the system module help now includes anything that is handled by Internal Page Cache instead. If so both need to be rewritten.

Remaining tasks

Make patch to update System and Internal Page Cache help so that they each describe what is in their own module, they reference each other where appropriate, and the Internal Page Cache help is brought into compliance with our help standards.

User interface changes

Better help.

API changes

None.

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue category Task, to evaluate and fix up help
Issue priority Just normal
Unfrozen changes Unfrozen because it only changes help text (strings/documentation).

Comments

jhodgdon’s picture

Also in the page_cache.info.yml file, the name of the module should be:

Internal Page Cache

This needs to be fixed in the page_cache_help() function in page_cache.module too.

Also the "Uses" bullet point 'Configuring Internal page cache' should not have I but i on internal.

fmb’s picture

Status: Active » Needs review
StatusFileSize
new5.98 KB

Here is a patch.

ifrik’s picture

Status: Needs review » Needs work

Thanks,
FMB for working on this.

I've just added a page on drupal.org https://www.drupal.org/documentation/modules/internal_page_cache
The about section should link to that with the usual wording "For more information, see the online documentation for the Internal Page Cache module.

Some small change to the wording "and then reused;" maybe we can better say "and then are re-used".
We can also get rid of the brackets around one of the sentences, because it's relevant information.
In the second use the link title should be "Performance page" to be consistent with the page title.

The System help only refers to the aggregation of CSS and Java script files. Maybe that use could be rewritten to say that both the aggregation and the internal caching can be configured on the Performance page if the Interal Page Cache module is installed.
In any case the Performance page there needs to check whether the module is enabled, otherwise the site breaks. See #2473105: Update hook_help texts that link to modules that can be uninstalled for the syntax.

For the formatting: The text that currently is in <p> tags, should just be in one or two <dd> tags, as appropriate.

fmb’s picture

StatusFileSize
new7.84 KB
new4.25 KB

The System help only refers to the aggregation of CSS and Java script files. Maybe that use could be rewritten to say that both the aggregation and the internal caching can be configured on the Performance page if the Interal Page Cache module is installed.

As far as I understand, CSS and JS aggregation is still handled by the System module.

In any case the Performance page there needs to check whether the module is enabled, otherwise the site breaks.

system_help() now refers to the Internal Page Cache module in the About section without a link, since this module actually has no UI of its own.

fmb’s picture

Status: Needs work » Needs review
ifrik’s picture

Issue tags: +drupaldevdays
ifrik’s picture

Thanks and sorry,

now that I look at it my proposal to include a reference to Internal caching into the about section doesn't really make sense.

FBM, I've taken it out myself so you don't have to edit it again.

jhodgon: can you review it to check the changes in the yml and function are okay?

Status: Needs review » Needs work

The last submitted patch, 7: Internal_Page_Cache_hook_help-2473729-7.patch, failed testing.

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 7: Internal_Page_Cache_hook_help-2473729-7.patch, failed testing.

Status: Needs work » Needs review
jhodgdon’s picture

Status: Needs review » Needs work

YML looks good.

A few things I think should be fixed in the hook_help:

a) For authenticated users, pages need to be assembled for each user individually, but anonymous users all get the exact same version of each page.

==> I don't think "exact same" is great... and this is a bit .. I don't know, I didn't think it read well. How about:

Because authenticated users have different roles and permissions, the same URL may result in different pages for different users, while all anonymous users have the same permissions, and pages should appear the same for everyone. Therefore, pages are not cached for authenticated users, only for anonymous users.

b) Configuring internal page cache [uses header]
Needs "the" ==> Configuring the internal page cache

c) On the Performance page, you can configure how long browsers and proxies may cache pages, that setting is also respected by the Internal Page Cache module.

This is a comma splice. You either need to put a conjunction like "and" after the comma, or make it a ; instead. I think a ; would be better here.

d) If the cache setting for browsers and proxies is on Performance due to the system module, then maybe we don't want to remove the help about it from the System module help? or maybe we need to mention this?

fmb’s picture

d) If the cache setting for browsers and proxies is on Performance due to the system module, then maybe we don't want to remove the help about it from the System module help? or maybe we need to mention this?

There is a mention of it the About section of the System module since comment #4, are you OK with that?

I rephrased a), since in my opinion caching has more to do with sessions than roles and permissions.

fmb’s picture

Status: Needs work » Needs review
kiruba karan’s picture

This particular line is not good to read. It could be something like this.

+++ b/core/modules/page_cache/page_cache.module
@@ -16,18 +16,14 @@ function page_cache_help($route_name, RouteMatchInterface $route_match) {
+      $output .= '<dd>' . t('Unlike authenticated users, anonymous users usually share the same session and set of permissions. Therefore, the same URL results in the same page for all anonymous users. This is why pages can be cached for anonymous users, whereas they will have to be rebuilt for every authenticated user.') . '</dd>';

$output .= '

' . t('The particular page content rendered is the same for every anonymous user visiting it as they share the same set of permissions. Where as the content could change based on the user for an authenticated user based on his role. This is why pages can be cached for anonymous users, whereas they will have to be rebuilt for every authenticated user') . '

';

kiruba karan’s picture

Status: Needs review » Needs work
fmb’s picture

Mmmh, looks like I did not take ifrik's modifications into account before working on the patch. I will do better by next week, hopefully with a better explanation about caching for anonymous users.

fmb’s picture

Status: Needs work » Needs review
StatusFileSize
new6.88 KB
new5.99 KB
  • Reintegrated ifrik's modifications in #7.
  • Reintroduced a brief explanation about the Internal Page Cache module in system_help(), following jhodgdon's advice in #12 (d).
  • Wrote a simpler explanation about page caching in page_cache_help().
ivarlaks’s picture

StatusFileSize
new36.91 KB
ivarlaks’s picture

StatusFileSize
new34.73 KB

Here's the fresh screenshot > forgot to apply the patch when taking the first screenshot :)

Only local images are allowed.

ivarlaks’s picture

jhodgdon’s picture

Status: Needs review » Needs work

This looks pretty good!

However, the change in the System module is not quite OK. We have a standard that says all Uses headers should be -ing verbs, so changing it from "Managing the cache" to "Performance" is not right. Maybe it should be "Configuring performance" or something like that?

Also in that section
<a href="!bandwith-optimization">aggregate</a>
This is not a good link text for accessibility. The link goes to the Performance page. The link text should be "Performance page". So the text needs rewriting -- it should say something like "On the Performance page, you can ...".

Also in that section, you should make Internal Page Cache module into a link (you'll need to check whether the module is installed using a moduleExists() call, see other hook_help for examples of this).

parth_gohil’s picture

I am working on the documentation change.

darol100’s picture

Assigned: Unassigned » darol100

I'm assigned this to myself to work on it.

darol100’s picture

Assigned: darol100 » Unassigned
Status: Needs work » Needs review
StatusFileSize
new2.35 KB

@jhodgdon.

I think system help page should have links to the areas that what they are talking about it. So I wrote patch that contains links to the. In addition, this patch contain #22 suggestions.

Status: Needs review » Needs work
darol100’s picture

Assigned: Unassigned » darol100

I would reroll it.

darol100’s picture

@jhodgdon.

I think system help page should have links to the areas that what they are talking about it. So I wrote patch that contains links to the. In addition, this patch contain #22 suggestions.

Please ignore the #25 patch. I upload the wrong patch. Here the correct patch.

darol100’s picture

Status: Needs work » Needs review
darol100’s picture

darol100’s picture

Assigned: darol100 » Unassigned
fmb’s picture

I think system help page should have links to the areas that what they are talking about it. So I wrote patch that contains links to the. In addition, this patch contain #22 suggestions.

darol100: the current issue is mainly about the Internal Page Cache module. I think it would be better to discuss this matter in a new one.

darol100’s picture

@FMB,

So should we remove the links from the System hook_help ? And open it on a different issue ? I guess we probably would have to re-roll this patch ?

jhodgdon’s picture

Status: Needs review » Needs work

Hm. Some changes to the System module help may be fine, such as if you wanted to make a link to the internal page cache module.

But most or all of the changes in this patch are definitely (a) out of scope for this issue and (b) not in line with the standards we have for Help pages. We do not want the headers in the Uses section to be links.

Please reverse these changes, and if there is a change to make to the System module help that is in scope of this issue (documenting the internal page cache), you can make it in this patch.

fmb’s picture

Status: Needs work » Needs review
StatusFileSize
new7.06 KB
new3.39 KB
ifrik’s picture

Status: Needs review » Needs work

Thanks,

the help text for the Internal Page Cache looks good, and both links link to the correct pages.
The Performance page is provided by the system module which is required by Drupal core, so it can't be disabled. Therefore this help text don't need to check for it.

There's only one small thing left:
the link in the second use the link is using @ instead of !

fmb’s picture

Status: Needs work » Needs review
StatusFileSize
new7.06 KB
new1.67 KB
jhodgdon’s picture

Status: Needs review » Needs work

This looks great, thanks!

+++ b/core/modules/system/system.module
@@ -89,8 +89,8 @@ function system_help($route_name, RouteMatchInterface $route_match) {
+      $output .= '<dt>' . t('Handling performance') . '</dt>';

My only suggestion is here: I think that this heading should probably be "Configuring for performance" or something like that -- the verb should be "Configuring" not "Handling", since that's our standard way to say "setting up the site" or "managing settings" in docs and UI text (see https://www.drupal.org/node/604342 ).

darol100’s picture

+++ b/core/modules/system/system.module
@@ -89,8 +89,8 @@ function system_help($route_name, RouteMatchInterface $route_match) {
+      $output .= '<dd>' . t('On the <a href="!performance-page">perfomance page</a>, the site can be configured to aggregate CSS and JavaScript files, making the total request size smaller. Note that, for small to medium-sized websites, the <a href="!page-cache">Internal Page Cache module</a> should be installed so that pages are efficiently cached and re-used.', array('!performance-page' => \Drupal::url('system.performance_settings'), '!page-cache' => (\Drupal::moduleHandler()->moduleExists('page_cache')) ? \Drupal::url('help.page', array('name' => 'page_cache')) : '#')) . '</dd>';

Here is a typo, it should said performance instead of "perfomance".

darol100’s picture

Status: Needs work » Needs review
StatusFileSize
new7.54 KB

Here is an updated version of the patch with #38 and #39 corrections.

darol100’s picture

StatusFileSize
new0 bytes

Wrong Interdiff... sorry

jhodgdon’s picture

Status: Needs review » Needs work

Good catch, and thanks for reviewing and the new patch darol100!

So... you prompted me to think "Oh no, I missed some typos!" -- I figured I'd better give this a really really careful read-over, and (sorry!) I found three very small things to fix and then I think we're done:

a) In the new line in system.module, the link to "Performance page" is changed to lower-case "performance page". It should be capitalized, since the page is capitalized. That's here:

t('On the <a href="!performance-page">performance page</a>, the site can be configured...

b) punctuation, just after that:

...small to medium-sized websites...

Should be:

small- to medium-sized websites

The reason is that it's "small-sized to medium-sized", presumably...

c) "re-used" should be "reused". No hyphen. That's also in system.module in that same line. Oh, it's also in page_cache.module.

darol100’s picture

Here is an updated version of the patch with #42 corrections.

darol100’s picture

Status: Needs work » Needs review
jhodgdon’s picture

Status: Needs review » Needs work

Great, thanks! There's still one "re-used" in page_cache.module though:

Pages requested by anonymous users are stored the first time they are requested and then are re-used.

Fix that and I think we're done.

darol100’s picture

Status: Needs work » Needs review
StatusFileSize
new7.54 KB

@jhodgdon, sorry about that. Here is the patch with the page_cache changes.

jhodgdon’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

Thanks! Looks good now.

Added beta eval to issue summary (this is just help docs).

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

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

Thanks for adding the beta evaluation to the issue summary.

  • alexpott committed 5c30cf2 on 8.0.x
    Issue #2473729 by FMB, darol100, ifrik, ivarlaks, jhodgdon: Review the...

Status: Fixed » Closed (fixed)

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