Does Drupal cache all or some hooks?

Hi,

So subject is the question.

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?

getting error on database

I'm getting this error when I try to modify a content if you can help me

Fatal error: Cannot use Composer\Plugin\Capability\CommandProvider

Hello,

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".

Any idea how I can fix it ?

Thanks.

How to change mass routes?

 I have below kind of custom API URL's in different modules XX.routing.yml

custom_module:route_1
 path: "api/v0/abc"

custom_module:route_2
 path: "api/v0/def"

etc..

about more than 100.

Now I need to change the URL to

php/api/v0/abc, php/api/v0/def, etc/

Can we achieve this via RouterSubscriber?

Using Dompdf to download html contents in pdf

Hi,

I am using Dompdf to download html contents in pdf. It works fine for english, but it does not detect Indian fonts.

The following is my code:

$html = mb_convert_encoding($contents, 'HTML-ENTITIES', 'UTF-8');

$dompdf = new Dompdf();
$dompdf->loadHtml($html);
$dompdf->render();

$dompdf->stream();

for Indian languages, it outputs "??????????????" . Also the font-size for Indian fonts is very small Could you please help me resolve the issue?

Thanks,

Help with Drupal 8 and LightOpenID

I am working on my first Drupal 8 website, and I am trying to learn it's framework and systems as I am entirely used to Drupal 7 development. I am trying to build a module that allows authenticated users on my website to link their Steam ID to their account.

There is a library called LightOpenID which is used for this (steam has light open ID support), but I am having difficulties getting it to work with Drupals routing system.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x