Skip to content
Snippets Groups Projects

Add query string to logo and favicon

2 unresolved threads

Closes #1934508

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
250 250 /** @var \Drupal\Core\File\FileUrlGeneratorInterface $file_url_generator */
251 251 $file_url_generator = \Drupal::service('file_url_generator');
252 252
253 // A dummy query-string is added to filenames, to gain control over
254 // browser-caching. The string changes on every update or full cache
255 // flush, forcing browsers to load a new copy of the files, as the
256 // URL changed.
257 // We need try-catch due to the installer not having a state yet.
  • Comment on lines +253 to +257

    From @alexpott's review in comment #88:

    the comment is not wrapped correctly and the last sentence is not grammatically correct. Maybe We need to catch WhateverException since theme_get_setting() is used during the installer before the state service is available.

  • Please register or sign in to reply
  • 250 250 /** @var \Drupal\Core\File\FileUrlGeneratorInterface $file_url_generator */
    251 251 $file_url_generator = \Drupal::service('file_url_generator');
    252 252
    253 // A dummy query-string is added to filenames, to gain control over
    254 // browser-caching. The string changes on every update or full cache
    255 // flush, forcing browsers to load a new copy of the files, as the
    256 // URL changed.
    257 // We need try-catch due to the installer not having a state yet.
    258 try {
    259 $query_string = \Drupal::service('asset.query_string')->get();
    260 }
    261 catch (Exception) {
    262 $query_string = '0';
    263 }
    Please register or sign in to reply
    Loading