1

I have a panelized front page which is accessible via base_url/home or base_url/.

If I call the front page normally drupal_is_front_page returns TRUE, but if I use a view with an exposed filter using ajax, drupal_is_front_page returns FALSE. The question is, is this a normal behaviour, or might there be a module or some custom code, which leads to this result?

If I follow the documentation of this function and check

$_GET['q'] == variable_get('site_frontpage', 'node')

this always leads to a TRUE, even if I use an exposed filter with ajax. So maybe drupal_static() delivers a wrong result...

My project is developed now over a few months and I think there had been times where this didn't occur, but I am not 100% sure. And if this is not the normal behaviour, how could I detect the code responsible for this behaviour?

3
  • It's normal - the path for AJAX requests is system/ajax, which isn't the front page – Clive Aug 30 '15 at 9:54
  • Yes from my personal understanding I would agree to this, so what is the alternative? Using $_GET['q'] == variable_get('site_frontpage', 'node') for an exposed filter using ajax? – pedral Aug 30 '15 at 10:04
  • drupal.stackexchange.com/questions/86939/… has a couple of ideas – Clive Aug 30 '15 at 15:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.