Skip to content

Commit

Permalink
Issue #3041926 by jhodgdon, vadim.hirbu, anmolgoyal74, shwetaneelshar…
Browse files Browse the repository at this point in the history
…ma, Amber Himes Matz, benjifisher, BramDriesen: Convert automated_cron, ban, dblog, syslog, system, update, and user module hook_help() to topic(s)

(cherry picked from commit abc0df85ba12930d15398061fc80f88fb6775eec)
  • Loading branch information
alexpott committed Mar 21, 2020
1 parent a4d2481 commit a92ebde
Show file tree
Hide file tree
Showing 18 changed files with 270 additions and 5 deletions.
14 changes: 14 additions & 0 deletions modules/help_topics/help_topics/ban.banning_ips.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
label: 'Banning IP addresses'
related:
- user.overview
---
{% set ban = render_var(url('ban.admin_page')) %}
<h2>{% trans %}Goal{% endtrans %}</h2>
<p>{% trans %}Ban visitors from one or more IP addresses from accessing and viewing your site.{% endtrans %}</p>
<h2>{% trans %}Steps{% endtrans %}</h2>
<ol>
<li>{% trans %}In the <em>Manage</em> administrative menu, navigate to <em>Configuration</em> &gt; <em>People</em> &gt; <a href="{{ ban }}"><em>IP address bans</em></a>{% endtrans %}</li>
<li>{% trans %}Enter an <em>IP address</em> and click <em>Add</em>.{% endtrans %}</li>
<li>{% trans %}You should see the IP address you entered listed under <em>Banned IP addresses</em>. Repeat the above steps to ban additional IP addresses.{% endtrans %}</li>
</ol>
28 changes: 28 additions & 0 deletions modules/help_topics/help_topics/core.cron.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
label: 'Running and configuring cron'
related:
- core.maintenance
---
{% set cron = render_var(url('system.cron_settings')) %}
<h2>{% trans %}Goal{% endtrans %}</h2>
<p>{% trans %}Configure your system so that cron will run automatically.{% endtrans %}</p>
<h2>{% trans %}What are cron tasks?{% endtrans %}</h2>
<p>{% trans %}To ensure that your site and its modules continue to function well, a group of administrative operations should be run periodically. These operations are called <em>cron</em> tasks, and running the tasks is known as <em>running cron</em>. Depending on how often content is updated on your site, you might need to run cron on a schedule ranging from hourly to weekly to keep your site running well.{% endtrans %}</p>
<h2>{% trans %}What options are available for running cron?{% endtrans %}</h2>
<ul>
<li>{% trans %}If the core Automated Cron module is installed, your site will run cron periodically, on a schedule you can configure.{% endtrans %}</li>
<li>{% trans %}You can set up a task on your web server to visit the <em> cron URL</em>, which is unique to your site, on a schedule.{% endtrans %}</li>
<li>{% trans %}You can also run cron manually, but this is not the recommended way to make sure it is run periodically.{% endtrans %}</li>
</ul>
<h2>{% trans %}Steps{% endtrans %}</h2>
<ol>
<li>{% trans %}In the <em>Manage</em> administration menu, navigate to <em>Configuration</em> &gt; <em>System</em> &gt; <a href="{{ cron }}"><em>Cron</em></a>. Note the <em>Last run</em> time on the page.{% endtrans %}</li>
<li>{% trans %}If you want to run cron right now, click <em>Run cron</em> and wait for cron to finish.{% endtrans %}</li>
<li>{% trans %}If you have a way to configure tasks on your web server, copy the link where it says <em>To run cron from outside the site, go to</em>. Set up a task to visit that URL on your desired cron schedule, such as once an hour or once a week. (On Linux-like servers, you can use the <em>wget</em> command to visit a URL.) If you configure an outside task, you should uninstall the Automated Cron module.{% endtrans %}</li>
<li>{% trans %}If you are not configuring an outside task, and you have the core Automated Cron module installed, select a schedule for automated cron runs in <em>Cron settings</em> &gt; <em>Run cron every</em>. Click <em>Save configuration</em>.{% endtrans %}</li>
</ol>
<h2>{% trans %}Additional resources{% endtrans %}</h2>
<ul>
<li>{% trans %}<a href="https://www.drupal.org/docs/user_guide/en/security-cron-concept.html">Concept: Cron in the User Guide</a>{% endtrans %}</li>
<li>{% trans %}<a href="https://www.drupal.org/docs/user_guide/en/security-cron.html">Configuring Cron Maintenance Tasks in the User Guide</a>{% endtrans %}</li>
</ul>
17 changes: 17 additions & 0 deletions modules/help_topics/help_topics/core.extending.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
label: 'Extending and modifying your site functionality'
top_level: true
---
<h2>{% trans %}What is a module?{% endtrans %}</h2>
<p>{% trans %}A <em>module</em> is a set of PHP, JavaScript, and/or CSS files that extends site features and adds functionality. A set of <em>Core modules</em> is distributed as part of the core software download. Additional <em>Contributed modules</em> can be downloaded separately from the <a href="https://www.drupal.org/project/project_module">Download &amp; Extend page on drupal.org</a>.{% endtrans %}</p>
<h2>{% trans %}What is an Experimental module?{% endtrans %}</h2>
<p>{% trans %}An <em>Experimental</em> module is a module that is still in development and is not yet stable. Using Experimental modules on production sites is not recommended.{% endtrans %}</p>
<h2>{% trans %}What are installing and uninstalling?{% endtrans %}</h2>
<p>{% trans %}Installing a core or downloaded contributed module means turning it on, so that you can use its features and functionality. Uninstalling means turning it off and removing all of its configuration. A module cannot be uninstalled if another installed module depends on it, or if you have created content on your site using the module -- you would need to delete the content and uninstall dependent modules first.{% endtrans %}</p>
<h2>{% trans %}Extending overview{% endtrans %}</h2>
<p>{% trans %}See the related topics listed below for help performing tasks related to extending the functionality of your site.{% endtrans %}</p>
<h2>{% trans %}Additional resources{% endtrans %}</h2>
<ul>
<li>{% trans %}<a href="https://www.drupal.org/docs/user_guide/en/understanding-modules.html">Concept: Modules topic in the User Guide</a>{% endtrans %}</li>
<li>{% trans %}<a href="https://www.drupal.org/docs/user_guide/en/extend-chapter.html">Extending and customizing your site chapter in the User Guide</a>{% endtrans %}</li>
</ul>
24 changes: 24 additions & 0 deletions modules/help_topics/help_topics/core.maintenance.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
label: 'Maintaining and troubleshooting your site'
top_level: true
related:
- core.cron
- core.extending
- core.security
- system.cache
- system.config_error
- system.maintenance_mode
---
<h2>{% trans %}Maintaining and troubleshooting overview{% endtrans %}</h2>
<p>{% trans %}Here are some tasks and hints related to maintaining your site, and troubleshooting problems that may come up on your site. See the related topics below for more information.{% endtrans %}</p>
<ul>
<li>{% trans %}When performing maintenance, such as installing, uninstalling, or upgrading a module, put your site in maintenance mode.{% endtrans %}</li>
<li>{% trans %}Configure your site so that cron runs periodically.{% endtrans %}</li>
<li>{% trans %}If your site is not behaving as expected, clear the cache before trying to diagnose the problem.{% endtrans %}</li>
<li>{% trans %}There are several site reports that can help you diagnose problems with your site. There are also two core modules that can be used for error logging: Database Logging and Syslog.{% endtrans %}</li>
</ul>
<h2>{% trans %}Additional resources{% endtrans %}</h2>
<ul>
<li>{% trans %}<a href="https://www.drupal.org/docs/user_guide/en/prevent-chapter.html">Preventing and Fixing Problems chapter in the User Guide</a>{% endtrans %}</li>
<li>{% trans %}<a href="https://www.drupal.org/docs/user_guide/en/security-chapter.html">Security and Maintenance chapter in the User Guide</a>{% endtrans %}</li>
</ul>
2 changes: 1 addition & 1 deletion modules/help_topics/help_topics/core.security.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ top_level: true
<p>{% trans %}Keeping track of updates, updating the core software, and updating contributed modules and/or themes are all part of keeping your site secure. See the related topics listed below for specific tasks.{% endtrans %}</p>
<h2>{% trans %}Additional resources{% endtrans %}</h2>
<ul>
<li>{% trans %}<a href="https://www.drupal.org/docs/user_guide/en/security-chapter.html">Drupal 8 User Guide: Chapter 13. Security and Maintenance</a>{% endtrans %}</li>
<li>{% trans %}<a href="https://www.drupal.org/docs/user_guide/en/security-chapter.html">Security and Maintenance chapter in the User Guide</a>{% endtrans %}</li>
</ul>
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,22 @@ label: 'Configuring help search'
top_level: true
related:
- block.place
- system.cache
- core.cron
---
{% set extend_url = render_var(url('system.modules_list')) %}
{% set help_url = render_var(url('help.main')) %}
{% set cache_help = render_var(url('help.help_topic', {'id': 'system.cache'})) %}
{% set cron_help = render_var(url('help.help_topic', {'id': 'core.cron'})) %}
<h2>{% trans %}Goal{% endtrans %}</h2>
<p>{% trans %}Set up your site so that users can search for help.{% endtrans %}</p>
<h2>{% trans %}Steps{% endtrans %}</h2>
<ol>
<li>{% trans %}In the <em>Manage</em> administrative menu, navigate to <em><a href="{{ extend_url }}">Extend</a></em>. Verify that the Search, Help, Help Topics, and Block modules are installed (or install them if they are not already installed).{% endtrans %}</li>
<li>{% trans %}In the <em>Manage</em> administrative menu, navigate to <em>Configuration</em> &gt; <em>Search and metadata</em> &gt; <em>Search pages</em>.{% endtrans %}</li>
<li>{% trans %}Verify that a Help search page is listed in the <em>Search pages</em> section. If not, add a new page of type <em>Help</em>.{% endtrans %}</li>
<li>{% trans %}Check the indexing status of the Help search page. If it is not fully indexed, run Cron until indexing is complete.{% endtrans %}</li>
<li>{% trans %}In the future, you can click <em>Rebuild search index</em> on this page, or clear the site cache, in order to force help topic text to be reindexed for searching. This should be done whenever a module, theme, language, or string translation is updated.{% endtrans %}</li>
<li>{% trans %}Check the indexing status of the Help search page. If it is not fully indexed, <a href="{{ cron_help }}">run Cron</a> until indexing is complete.{% endtrans %}</li>
<li>{% trans %}In the future, you can click <em>Rebuild search index</em> on this page, or <a href="{{ cache_help }}">clear the site cache</a>, in order to force help topic text to be reindexed for searching. This should be done whenever a module, theme, language, or string translation is updated.{% endtrans %}</li>
<li>{% trans %}In the <em>Manage</em> administrative menu, navigate to <em>Structure</em> &gt; <em>Block layout</em>.{% endtrans %}</li>
<li>{% trans %}Click the link for your administrative theme (such as the core Seven theme), near the top of the page, and verify that there is already a search block for help located in the Help region. If not, follow the steps in the related topic to place the <em>Search form</em> block in the Help region. When configuring the block, choose <em>Help</em> as the search page, and in the <em>Pages</em> tab under <em>Visibility</em>, enter <em>/admin/help</em> to make the search form only visible on the main <em>Help</em> page.{% endtrans %}</li>
<li>{% trans %}In the <em>Manage</em> administrative menu, navigate to <em><a href="{{ help_url }}">Help</a></em>. Verify that the search block is visible, and try a search.{% endtrans %}</li>
Expand Down
19 changes: 19 additions & 0 deletions modules/help_topics/help_topics/system.cache.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
label: 'Clearing the site cache'
related:
- core.maintenance
---
{% set performance_url = render_var(url('system.performance_settings')) %}
<h2>{% trans %}Goal{% endtrans %}</h2>
<p>{% trans %}Clear the data in the site cache.{% endtrans %}</p>
<h2>{% trans %}What is the cache?{% endtrans %}</h2>
<p>{% trans %}Some of the calculations that are done when your site loads a page take a long time to run. To save time when these calculations would need to be done again, their results can be <em>cached</em> in your site's database. There are internal mechanisms to <em>clear</em> cached data when the conditions or assumptions that went into the calculation have changed, but you can also clear cached data manually. When your site is misbehaving, a good first step is to clear the cache and see if the problem goes away.{% endtrans %}</p>
<h2>{% trans %}Steps{% endtrans %}</h2>
<ol>
<li>{% trans %}In the <em>Manage</em> administrative menu, navigate to <em>Configuration</em> &gt; <em>Development</em> &gt; <em><a href="{{ performance_url }}"><em>Performance</em></a></em>.{% endtrans %}</li>
<li>{% trans %}Click <em>Clear all caches</em>. Your site's cached data will be cleared.{% endtrans %}</li>
</ol>
<h2>{% trans %}Additional resources{% endtrans %}</h2>
<ul>
<li>{% trans %}<a href="https://www.drupal.org/docs/user_guide/en/prevent-cache.html">Concept: Cache in the User Guide</a>{% endtrans %}</li>
</ul>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
label: 'Configuring error responses, including 403/404 pages'
related:
- system.config_basic
- core.maintenance
---
{% set log_settings_url = render_var(url('system.logging_settings')) %}
{% set information_url = render_var(url('system.site_information_settings')) %}
Expand All @@ -20,5 +21,4 @@ related:
<li>{% trans %}In the <em>Manage</em> administrative menu, navigate to <em>Configuration</em> &gt; <em>Development</em> &gt; <em><a href="{{ log_settings_url }}">Logging and errors</a></em>.{% endtrans %}</li>
<li>{% trans %}For a production site, select <em>None</em> under <em>Error messages to display</em>. For a site that is in development, select one of the other options, so that you are more aware of the errors the site is generating.{% endtrans %}</li>
<li>{% trans %}Click <em>Save configuration</em>. You should see a message indicating that the settings were saved.{% endtrans %}</li>
<li>{% trans %}If you have the Database Logging module installed, in the <em>Manage</em> administrative menu, navigate to <em>Reports</em> &gt; <em>Recent log messages</em> to see a report of the error and informational messages your site has generated.{% endtrans %}</li>
</ol>
21 changes: 21 additions & 0 deletions modules/help_topics/help_topics/system.maintenance_mode.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
label: 'Enabling and disabling maintenance mode'
related:
- core.maintenance
- system.cache
---
{% set maintenance_url = render_var(url('system.site_maintenance_mode')) %}
{% set cache_help = render_var(url('help.help_topic', {'id': 'system.cache'})) %}
<h2>{% trans %}Goal{% endtrans %}</h2>
<p>{% trans %}Put your site in maintenance mode to perform maintenance operations, and then return to normal mode when finished.{% endtrans %}</p>
<h2>{% trans %}What is maintenance mode?{% endtrans %}</h2>
<p>{% trans %}When your site is in maintenance mode, most site visitors will see a simple maintenance mode message page, rather than being able to use the full functionality of the site. Users with <em>Use the site in maintenance mode</em> permission who are already logged in will be able to use the full site, and the log in page at <em>/user</em> will also be accessible to anyone.{% endtrans %}</p>
<h2>{% trans %}Steps{% endtrans %}</h2>
<ol>
<li>{% trans %}In the <em>Manage</em> administrative menu, navigate to <em>Configuration</em> &gt; <em>Development</em> &gt; <a href="{{ maintenance_url }}"><em>Maintenance mode</em></a>.{% endtrans %}</li>
<li>{% trans %}Check <em>Put site into maintenance mode</em>, optionally change the <em>Message to display when in maintenance mode</em>, and click <em>Save configuration</em>. Your site will be in maintenance mode.{% endtrans %}</li>
<li>{% trans %}Perform your maintenance operations.{% endtrans %}</li>
<li>{% trans %}In the <em>Manage</em> administrative menu, navigate to <em>Configuration</em> &gt; <em>Development</em> &gt; <em><a href="{{ maintenance_url }}">Maintenance mode</a></em>.{% endtrans %}</li>
<li>{% trans %}Uncheck <em>Put site into maintenance mode</em> and click <em>Save configuration</em>. Your site will be back in normal operation mode.{% endtrans %}</li>
<li>{% trans %}Clear the site cache. See <a href="{{ cache_help }}">Clearing the site cache</a> for instructions.{% endtrans %}</li>
</ol>
17 changes: 17 additions & 0 deletions modules/help_topics/help_topics/system.module_install.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
label: 'Installing a module'
related:
- core.extending
- system.module_uninstall
---
{% set extend_url = render_var(url('system.modules_list')) %}
<h2>{% trans %}Goal{% endtrans %}</h2>
<p>{% trans %}Install a core module, or a contributed module that has already been downloaded.{% endtrans %}</p>
<h2>{% trans %}Steps{% endtrans %}</h2>
<ol>
<li>{% trans %}In the <em>Manage</em> administrative menu, navigate to <a href="{{ extend_url }}"><em>Extend</em></a>.{% endtrans %}</li>
<li>{% trans %}Enter a word from the module name or description into the filter box, to make the list of modules smaller. Locate the module you want to install.{% endtrans %}</li>
<li>{% trans %}Check the box next to the name of the module you want to install; you can also check more than one box to install multiple modules at the same time. If the checkbox is disabled for the module you are trying to install, expand the information to see why -- you may need to download an additional module that your module requires.{% endtrans %}</li>
<li>{% trans %}Click <em>Install</em> at the bottom of the page. If you chose to install a module with dependencies that were not already installed, or if you chose an Experimental module, confirm your choice on the next page.{% endtrans %}</li>
<li>{% trans %}Wait for the module (or modules) to be installed. You should be returned to the <em>Extend</em> page with a message saying the module or modules were installed.{% endtrans %}</li>
</ol>
19 changes: 19 additions & 0 deletions modules/help_topics/help_topics/system.module_uninstall.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
label: 'Uninstalling a module'
related:
- core.extending
- system.module_install
- system.maintenance_mode
---
{% set uninstall_url = render_var(url('system.modules_uninstall')) %}
{% set maintenance_topic = render_var(url('help.help_topic', {'id': 'system.maintenance_mode'})) %}<h2>{% trans %}Goal{% endtrans %}</h2>
<p>{% trans %}Uninstall a module. Your site should be in <a href="{{ maintenance_topic }}">maintenance mode</a> when you uninstall modules.{% endtrans %}</p>
<h2>{% trans %}Steps{% endtrans %}</h2>
<ol>
<li>{% trans %}In the <em>Manage</em> administrative menu, navigate to <em>Extend</em> &gt; <a href="{{ uninstall_url }}"><em>Uninstall</em></a>.{% endtrans %}</li>
<li>{% trans %}Enter a word from the module name or description into the filter box, to make the list of modules smaller. Locate the module you want to uninstall.{% endtrans %}</li>
<li>{% trans %}In the <em>Description</em> column, see if there are reasons that this module cannot be uninstalled. For example, you may have created content using this module (which you would need to delete first), or there may be another module installed that requires this module to be installed (you would need to uninstall the other module first).{% endtrans %}</li>
<li>{% trans %}If there are no reasons listed, the module can be uninstalled. Check the box in the <em>Uninstall</em> column, next to the module's name.{% endtrans %}</li>
<li>{% trans %}Click <em>Uninstall</em> at the bottom of the page. Verify the list of modules to be uninstalled and configuration to be deleted on the confirmation page, and click <em>Uninstall</em>.{% endtrans %}</li>
<li>{% trans %}Wait for the module to be uninstalled. You should be returned to the <em>Uninstall</em> page with a message saying the module was uninstalled.{% endtrans %}</li>
</ol>

0 comments on commit a92ebde

Please sign in to comment.