3

I have a Drupal 7 page where some of my content blocks don't show up, if there is a query added to the URL.

Say my block is main_content, and it is shown all all pages except the listed ones, where no page is listed; the block appears correctly on on www.mydomain.com, but not on www.mydomain.com?gclid=xxx.

This is an issue for me because Google AdWords banners are linking to my page with a query attribute, and then the page does not display correctly.

What could be the issue here?

  • Does this happen for every page or only the frontpage? Do you use context or panels? – Mike Jan 3 '13 at 23:04
  • I managed to fix this issue. I'm very new to Drupal and I'm administrating a site that someone else built. The problem was in template.php in a function called 'views_views_pre_execute'. Some code was checking for drupal path alias and some custom queries was built. I changed: '$path = substr(drupal_get_path_alias(request_uri()),1);' into 'drupal_get_path_alias($_GET['q']);' and now it works. – Johan Dahl Jan 4 '13 at 9:22
0

I managed to fix this issue. I'm very new to Drupal and I'm administrating a site that someone else built. The problem was in template.php in a function called 'views_views_pre_execute'. Some code was checking for drupal path alias and some custom queries was built. I changed: '$path = substr(drupal_get_path_alias(request_uri()),1);' into 'drupal_get_path_alias($_GET['q']);' and now it works.

|improve this answer|||||

Not the answer you're looking for? Browse other questions tagged or ask your own question.