Answers.Body: <p>Just speculating here, but seems like google is getting the links either from the pages and/or some unknown static web pages.</p>
  
  <p>A possible, but not so great solution is:</p>
  
  <p>a. Create and register a new CiviCRM fatal handler</p>
  
  <p>b. If you detect the user agent is googlebot and/or some other friendly search engines, redirect to main page of site, maybe with a CMS message</p>
  
  <p>c. If not, keep fatal message as is (unless you want to redefine this also)</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-24T01:59:39.637Z
Answers.LastActivityDate: 2015-05-26T17:15:55.843Z
Answers.LastEditDate: 2015-05-26T17:15:55.843Z
Answers.UserDisplayName: Donald Lobo
Answers.Body: <p>It sounds like Googlebot is trying to (unsuccessfully) fill out your event reg form or perform some kind of AJAX action. It has also been known to play with query string parameters. Check if you have any kind of search page or event listing functionality on your site. Reviewing your reports in Google Webmaster Tools may help as well. One fix is to add a line to your robots.txt file informing Googlebot not to crawl an event/register page if it is missing a query string, like this:</p>
  
  <pre><code>User-agent: Googlebot
  Disallow: /civicrm/event/register
  </code></pre>
  
  <p>Also <a href="https://stackoverflow.com/questions/19113788/google-disable-certain-querystring-in-robots-txt">check out this SE question</a> about reigning in Googlebot's sometimes odd behavior.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-26T15:48:27.537Z
Answers.LastActivityDate: 2015-05-26T15:48:27.537Z
Answers.LastEditDate: 2017-05-23T12:38:59.763Z
Answers.UserDisplayName: Nicholai
Body: <p>Over the last few years every few days a fatal error is triggered by a Googlebot. Seems harmless and unnecessary but it is possibly affecting ranking.</p>
  
  <p>The errorreport extension (ca.bidon.reporterror) reports:</p>
  
  <pre><code>HTTP_FROM: googlebot(at)googlebot.com
  REDIRECT_QUERY_STRING:q=civicrm/event/register&amp;snippet=4&amp;type=
  but also sometimes:
  REDIRECT_QUERY_STRING:q=civicrm/event/register
  </code></pre>
  
  <p>The logfile in ConfigAndLog says:</p>
  
  <pre><code>May 17 19:16:31  [info] $backTrace = #0 /home/account/domains/ourdomain.nl/public_html/crm/sites/all/modules/civicrm/CRM/Core/Error.php(363): CRM_Core_Error::backtrace("backTrace", TRUE)
  #1 /home/account/domains/ourdomain.nl/public_html/crm/sites/all/modules/civicrm/CRM/Utils/Request.php(95): CRM_Core_Error::fatal("Could not find valid value for id")
  #2 /home/account/domains/ourdomain.nl/public_html/crm/sites/all/modules/civicrm/CRM/Event/StateMachine/Registration.php(52): CRM_Utils_Request::retrieve("id", "Positive", Object(CRM_Event_Controller_Registration), TRUE)
  #3 /home/account/domains/ourdomain.nl/public_html/crm/sites/all/modules/civicrm/CRM/Event/Controller/Registration.php(47): CRM_Event_StateMachine_Registration-&gt;__construct(Object(CRM_Event_Controller_Registration), TRUE)
  #4 /home/account/domains/ourdomain.nl/public_html/crm/sites/all/modules/civicrm/CRM/Core/Invoke.php(307): CRM_Event_Controller_Registration-&gt;__construct("Event Registration", TRUE, "null", NULL, "false")
  #5 /home/account/domains/ourdomain.nl/public_html/crm/sites/all/modules/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:15))
  #6 /home/account/domains/ourdomain.nl/public_html/crm/sites/all/modules/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:3))
  #7 /home/account/domains/ourdomain.nl/public_html/crm/sites/all/modules/civicrm/drupal/civicrm.module(489): CRM_Core_Invoke::invoke((Array:3))
  #8 [internal function](): civicrm_invoke("event", "register")
  #9 /home/account/domains/ourdomain.nl/public_html/crm/includes/menu.inc(519): call_user_func_array("civicrm_invoke", (Array:2))
  #10 /home/account/domains/ourdomain.nl/public_html/crm/index.php(21): menu_execute_active_handler()
  #11 {main}
  </code></pre>
  
  <p>I have 27 full examples of this now. Probably I'm not the only one experiencing this. What would be a cause of this? And what would be a start of a solution?</p>
  
Tags: <civievent>
Title: Googlebot & Could not find valid value for id
ThreadText: # Googlebot & Could not find valid value for id
  
  (Asked by: username_0 on 2015-05-17)
  
  Over the last few years every few days a fatal error is triggered by a Googlebot. Seems harmless and unnecessary but it is possibly affecting ranking.
  The errorreport extension (ca.bidon.reporterror) reports:
  HTTP_FROM: googlebot(at)googlebot.com
  REDIRECT_QUERY_STRING:q=civicrm/event/register&snippet=4&type=
  but also sometimes:
  REDIRECT_QUERY_STRING:q=civicrm/event/register
  
  The logfile in ConfigAndLog says:
  May 17 19:16:31  [info] $backTrace = #0 /home/account/domains/ourdomain.nl/public_html/crm/sites/all/modules/civicrm/CRM/Core/Error.php(363): CRM_Core_Error::backtrace("backTrace", TRUE)
  #1 /home/account/domains/ourdomain.nl/public_html/crm/sites/all/modules/civicrm/CRM/Utils/Request.php(95): CRM_Core_Error::fatal("Could not find valid value for id")
  #2 /home/account/domains/ourdomain.nl/public_html/crm/sites/all/modules/civicrm/CRM/Event/StateMachine/Registration.php(52): CRM_Utils_Request::retrieve("id", "Positive", Object(CRM_Event_Controller_Registration), TRUE)
  #3 /home/account/domains/ourdomain.nl/public_html/crm/sites/all/modules/civicrm/CRM/Event/Controller/Registration.php(47): CRM_Event_StateMachine_Registration->__construct(Object(CRM_Event_Controller_Registration), TRUE)
  #4 /home/account/domains/ourdomain.nl/public_html/crm/sites/all/modules/civicrm/CRM/Core/Invoke.php(307): CRM_Event_Controller_Registration->__construct("Event Registration", TRUE, "null", NULL, "false")
  #5 /home/account/domains/ourdomain.nl/public_html/crm/sites/all/modules/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:15))
  #6 /home/account/domains/ourdomain.nl/public_html/crm/sites/all/modules/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:3))
  #7 /home/account/domains/ourdomain.nl/public_html/crm/sites/all/modules/civicrm/drupal/civicrm.module(489): CRM_Core_Invoke::invoke((Array:3))
  #8 [internal function](): civicrm_invoke("event", "register")
  #9 /home/account/domains/ourdomain.nl/public_html/crm/includes/menu.inc(519): call_user_func_array("civicrm_invoke", (Array:2))
  #10 /home/account/domains/ourdomain.nl/public_html/crm/index.php(21): menu_execute_active_handler()
  #11 {main}
  
  I have 27 full examples of this now. Probably I'm not the only one experiencing this. What would be a cause of this? And what would be a start of a solution?
  
  **Tags:** civievent
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2015-05-24. Score: 1
  
  Just speculating here, but seems like google is getting the links either from the pages and/or some unknown static web pages.
  
  A possible, but not so great solution is:
  
  a. Create and register a new CiviCRM fatal handler
  
  b. If you detect the user agent is googlebot and/or some other friendly search engines, redirect to main page of site, maybe with a CMS message
  
  c. If not, keep fatal message as is (unless you want to redefine this also)
  
  
  ---
  
  ### Answer by username_2 on 2015-05-26. Score: 0
  
  It sounds like Googlebot is trying to (unsuccessfully) fill out your event reg form or perform some kind of AJAX action. It has also been known to play with query string parameters. Check if you have any kind of search page or event listing functionality on your site. Reviewing your reports in Google Webmaster Tools may help as well. One fix is to add a line to your robots.txt file informing Googlebot not to crawl an event/register page if it is missing a query string, like this:
  User-agent: Googlebot
  Disallow: /civicrm/event/register
  
  Also check out this SE question about reigning in Googlebot's sometimes odd behavior.
  
  
  ---
  
  