I have a custom module that creates a custom page with some content. I need to have an edit button next to the content being displayed so that the people assigned the role of Editor is able to edit it. I have looked for online examples but found nothing helpful.
I have custom theme. There are two two hooks there (in mytheme.theme):
mytheme_preprocess_html() and mytheme_preprocess_node().
When I set $settings['cache']['bins']['render'] = 'cache.backend.null' - both hooks are working.
When I remove this setting - mytheme_preprocess_html() continues to work fine everytime, but mytheme_preprocess_node() works only one time on page reload after clearing cache.
Is it normal or how to get all hooks working all the time regardless of cache setting?
I succesfull installed the Drupal codebase with "composer create-project drupal/recommended-project".
Then I have "Fatal error: Cannot use Composer\Plugin\Capability\CommandProvider as CommandProvider because the name is already in use in phar:///usr/local/bin/composer/src/Composer/Plugin/PluginManager.php(196) : eval()'d code on line 10" after the "./composer.json has been updated" when I try to install DrupalConsole and Drush with "composer require drupal/console drush/drush".