bug fix url direct access #2936
This commit is contained in:
parent
3cdde357d5
commit
931c6ba216
|
@ -35,13 +35,15 @@ function decoupled_page_attachments(array &$attachments) {
|
|||
$redirect = false;
|
||||
$current_path = \Drupal::service('path.current')->getPath();
|
||||
$route_name = \Drupal::routeMatch()->getRouteName();
|
||||
// $route_parameters = \Drupal::routeMatch()->getParameters()->all();
|
||||
// ksm($route_parameters);
|
||||
$current_language = \Drupal::languageManager()->getCurrentLanguage()->getId();
|
||||
$is_front = \Drupal::service('path.matcher')->isFrontPage();
|
||||
if (!$is_front) {
|
||||
$redirect = true;
|
||||
}
|
||||
if(preg_match('/^\/?user\/.*/', $current_path)){
|
||||
$redirect = false;
|
||||
}
|
||||
|
||||
$entity_type = null;
|
||||
$entity_bundle = null;
|
||||
$entity_id = null;
|
||||
|
|
Loading…
Reference in New Issue