How to Change the Title of a Page Dynamically in Preprocess

We have a content type called "store" and we plan to change the title of page to be "{title} review", something like if we put Amazon on the title, on the page it should be "Amazon Review"

We plan to use preprocess_page_title, and below are some of the code:

$node = Drupal::request()->attributes->get('node');

if (isset($node) && method_exists($node, 'getType') && $node->getType() == 'store') {
    var_dump($variables);
    $variables['title'] =  $variables['title'].' Review';
  }

$settings[update_free_access] = FALSE

I recently ran an update of a couple of modules, the site put itself in maintenance mode and when I ran the status report, it provided the following message:

Translation error. Why?

Failed to save file due to error "The specified file 'temporary://file665sUl' could not be copied because the destination directory is not properly configured. This may be caused by a problem with file or directory permissions."

Sub-theme CSS loading first when there is a sub-sub-theme

I have a base theme. I have a sub-theme. I have a sub-sub-theme.

On sites that have the base theme and sub-theme, the css loads in the correct order: base theme > sub-theme.

On sites that have the base theme, sub-theme, and a sub-sub-theme the css loads in the wrong order: sub-theme > base theme > sub-sub-theme.

I need the order to be: base theme > sub-theme > sub-sub-theme.

All three .libraries.yml files look like this:

Fatal error since MySQL update

I have a Drupal 8.7 site with the module https://www.drupal.org/project/private_message

I just updated my Ubuntu server and I kept a blank page in Drupal with this message :

The website encountered an unexpected error. Please try again later.

What should I do ?

Showing 3 bootstrap modals consecutively - D8

Hi I'm working on a D8 site, developing a custom module that needs to show (required by client) 3 consecutive forms inside modals (one button in modal 1 triggers modal 2 and a button in modal 2 triggers modal 3) I'm using bootstrap theme and using Drupal Modal Dialog Api, all works fine in modals 1 and 2, but for some weird reason, when I try to execute any ajax callback on modal 2 form, modal 2 disappears and it only shows a modal backdrop with the body of modal 1 (without the bootstrap modal wrappers). Have someone faced the same issue with bootstrap modals and Drupal Modal Dialog Api?

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x