diff --git a/CRM/Utils/System/DrupalBase.php b/CRM/Utils/System/DrupalBase.php index 829b3870d152..115efaebebbe 100644 --- a/CRM/Utils/System/DrupalBase.php +++ b/CRM/Utils/System/DrupalBase.php @@ -673,9 +673,7 @@ public function getCurrentLanguage() { * @return bool */ public function isFrontEndPage() { - // Get the menu items. - $args = explode('?', $_GET['q']); - $path = $args[0]; + $path = CRM_Utils_System::getUrlPath(); // Get the menu for above URL. $item = CRM_Core_Menu::get($path);