Answers.Body: <p>Wayne,</p>
  
  <p>Simple Donate is a CiviCRM + angular extension. So there was some issue with loading angular related files for the anonymous user.</p>
  
  <p>I would suggest below patch to your CiviCRM instance, <a href="https://github.com/civicrm/civicrm-core/pull/7111" rel="nofollow">https://github.com/civicrm/civicrm-core/pull/7111</a></p>
  
  <p>Here is the issue for more info: <a href="https://issues.civicrm.org/jira/browse/CRM-17393" rel="nofollow">https://issues.civicrm.org/jira/browse/CRM-17393</a></p>
  
  <p>Let me know if it works.</p>
  
  <p>Kurund</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-04T04:04:22.080Z
Answers.Text: Applying that patch did fix the issue, thanks for the assistance
Answers.UserDisplayName: Wayne Watson
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-04T08:36:28.813Z
Answers.Text: I have updated the PR, please use the above patch.
Answers.UserDisplayName: Kurund Jalmi
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-28T06:03:58.040Z
Answers.LastActivityDate: 2015-11-04T07:44:55.983Z
Answers.LastEditDate: 2015-11-04T07:44:55.983Z
Answers.UserDisplayName: Kurund Jalmi
Body: <p>I installed and configured the <a href="https://civicrm.org/extensions/simple-donate" rel="nofollow">Simple Donate extension</a> on Drupal 7.39 and Civicrm 4.6.3. The Simple Donate page displays and functions fine if you are logged into drupal, but for anonymous users an error message is displayed stating "id is not a valid integer" </p>
  
  <p>Looking at the backtrace it is showing the wrong domain_id for the contribution page (it shows 1, but it should be 5) and and then at the very bottom the final message is Previous:Exception:private</p>
  
  <p>Any assistance is greatly appeciated as I am sure that I am missing a setting somewhere, but not sure where.</p>
  
  <p>Here is the backtrace I see in the logs after trying to render the page as anonymous user:</p>
  
  <p>Oct 21 06:42:59  [info] $Fatal Error Details = Array
  (
      [message] => id is not a valid integer
      [code] =>
      [exception] => CiviCRM_API3_Exception Object
          (
              [extraParams:CiviCRM_API3_Exception:private] => Array
                  (
                      [error_field] => id
                      [type] => integer
                      [error_code] => 2001
                      [entity] => Contact
                      [action] => get
                      [is_error] => 1
                      [error_message] => id is not a valid integer
                  )</p>
  
  <pre><code>        [message:protected] =&gt; id is not a valid integer
          [string:Exception:private] =&gt;
          [code:protected] =&gt; 0
          [file:protected] =&gt; /var/www/html/mplace/sites/all/modules/civicrm/api/api.php
          [line:protected] =&gt; 45
          [trace:Exception:private] =&gt; Array
              (
                  [0] =&gt; Array
                      (
                          [file] =&gt; /var/www/html/mplace/sites/all/modules/civicrm/CRM/Mailing/Info.php
                          [line] =&gt; 165
                          [function] =&gt; civicrm_api3
                          [args] =&gt; Array
                              (
                                  [0] =&gt; Contact
                                  [1] =&gt; getvalue
                                  [2] =&gt; Array
                                      (
                                          [id] =&gt; user_contact_id
                                          [return] =&gt; email
                                      )
  
                              )
  
                      )
  
                  [1] =&gt; Array
                      (
                          [file] =&gt; /var/www/html/mplace/sites/all/modules/civicrm/Civi/Angular/Manager.php
                          [line] =&gt; 130
                          [function] =&gt; getAngularModules
                          [class] =&gt; CRM_Mailing_Info
                          [type] =&gt; -&gt;
                          [args] =&gt; Array
                              (
                              )
  
                      )
  
                  [2] =&gt; Array
                      (
                          [file] =&gt; /var/www/html/mplace/sites/all/modules/civicrm/Civi/Angular/Page/Main.php
                          [line] =&gt; 66
                          [function] =&gt; getModules
                          [class] =&gt; Civi\Angular\Manager
                          [type] =&gt; -&gt;
                          [args] =&gt; Array
                              (
                              )
  
                      )
  
                  [3] =&gt; Array
                      (
                          [file] =&gt; /var/www/html/mplace/sites/all/modules/civicrm/Civi/Angular/Page/Main.php
                          [line] =&gt; 58
                          [function] =&gt; registerResources
                          [class] =&gt; Civi\Angular\Page\Main
                          [type] =&gt; -&gt;
                          [args] =&gt; Array
                              (
                              )
  
                      )
  
                  [4] =&gt; Array
                      (
                          [file] =&gt; /var/www/html/mplace/sites/all/modules/civicrm/CRM/Core/Invoke.php
                          [line] =&gt; 312
                          [function] =&gt; run
                          [class] =&gt; Civi\Angular\Page\Main
                          [type] =&gt; -&gt;
                          [args] =&gt; Array
                              (
                                  [0] =&gt; Array
                                      (
                                          [0] =&gt; civicrm
                                          [1] =&gt; simple
                                      )
  
                                  [1] =&gt;
                              )
  
                      )
  
                  [5] =&gt; Array
                      (
                          [file] =&gt; /var/www/html/mplace/sites/all/modules/civicrm/CRM/Core/Invoke.php
                          [line] =&gt; 86
                          [function] =&gt; runItem
                          [class] =&gt; CRM_Core_Invoke
                          [type] =&gt; ::
                          [args] =&gt; Array
                              (
                                  [0] =&gt; Array
                                      (
                                          [id] =&gt; 417
                                          [domain_id] =&gt; 1
                                          [path] =&gt; civicrm/simple
                                          [title] =&gt; Simple Donation Page
                                          [access_callback] =&gt; Array
                                              (
                                                  [0] =&gt; CRM_Core_Permission
                                                  [1] =&gt; checkMenu
                                              )
  
                                          [access_arguments] =&gt; Array
                                              (
                                                  [0] =&gt; Array
                                                      (
                                                          [0] =&gt; make online contributions
                                                      )
  
                                                  [1] =&gt; and
                                              )
  
                                          [page_callback] =&gt; \Civi\Angular\Page\Main
                                          [breadcrumb] =&gt; Array
                                              (
                                                  [0] =&gt; Array
                                                      (
                                                          [title] =&gt; CiviCRM
                                                          [url] =&gt; /civicrm?reset=1
                                                      )
  
                                              )
  
                                          [is_public] =&gt; 1
                                          [is_ssl] =&gt; 1
                                          [weight] =&gt; 0
                                          [type] =&gt; 1
                                          [page_type] =&gt; 0
                                          [page_arguments] =&gt;
                                      )
  
                              )
  
                      )
  
                  [6] =&gt; Array
                      (
                          [file] =&gt; /var/www/html/mplace/sites/all/modules/civicrm/CRM/Core/Invoke.php
                          [line] =&gt; 54
                          [function] =&gt; _invoke
                          [class] =&gt; CRM_Core_Invoke
                          [type] =&gt; ::
                          [args] =&gt; Array
                              (
                                  [0] =&gt; Array
                                      (
                                          [0] =&gt; civicrm
                                          [1] =&gt; simple
                                      )
  
                              )
  
                      )
  
                  [7] =&gt; Array
                      (
                          [file] =&gt; /var/www/html/mplace/sites/all/modules/civicrm/drupal/civicrm.module
                          [line] =&gt; 489
                          [function] =&gt; invoke
                          [class] =&gt; CRM_Core_Invoke
                          [type] =&gt; ::
                          [args] =&gt; Array
                              (
                                  [0] =&gt; Array
                                      (
                                          [0] =&gt; civicrm
                                          [1] =&gt; simple
                                      )
  
                              )
  
                      )
  
                  [8] =&gt; Array
                      (
                          [function] =&gt; civicrm_invoke
                          [args] =&gt; Array
                              (
                                  [0] =&gt; simple
                              )
  
                      )
  
                  [9] =&gt; Array
                      (
                          [file] =&gt; /var/www/html/mplace/includes/menu.inc
                          [line] =&gt; 519
                          [function] =&gt; call_user_func_array
                          [args] =&gt; Array
                              (
                                  [0] =&gt; civicrm_invoke
                                  [1] =&gt; Array
                                      (
                                          [0] =&gt; simple
                                      )
  
                              )
  
                  [10] =&gt; Array
                      (
                          [file] =&gt; /var/www/html/mplace/index.php
                          [line] =&gt; 21
                          [function] =&gt; menu_execute_active_handler
                          [args] =&gt; Array
                              (
                              )
  
                      )
  
              )
  
          [previous:Exception:private] =&gt;
      )
  </code></pre>
  
  <p>)</p>
  
  <p>Oct 21 06:42:59  [info] $backTrace = #0 /var/www/html/mplace/sites/all/modules/civicrm/CRM/Core/Error.php(444): CRM_Core_Error::backtrace("backTrace", TRUE)</p>
  
  <h1>1 /var/www/html/mplace/sites/all/modules/civicrm/CRM/Core/Invoke.php(57): CRM_Core_Error::handleUnhandledException(Object(CiviCRM_API3_Exception))</h1>
  
  <h1>2 /var/www/html/mplace/sites/all/modules/civicrm/drupal/civicrm.module(489): CRM_Core_Invoke::invoke((Array:2))</h1>
  
  <h1>3 internal function: civicrm_invoke("simple")</h1>
  
  <h1>4 /var/www/html/mplace/includes/menu.inc(519): call_user_func_array("civicrm_invoke", (Array:1))</h1>
  
  <h1>5 /var/www/html/mplace/index.php(21): menu_execute_active_handler()</h1>
  
  <h1>6 {main}</h1>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-10-19T18:43:58.163Z
Comments.Text: Domain ID? So is this a CiviCRM multisite set up?
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-10-20T15:07:01.050Z
Comments.Text: No this is not a multisite setup, I was reading the wrong parameter, I was looking for the contribution_page_id for the configured contribution page and did not interpret the script correctly,  this makes more sense. so the domain_id is correct at 1.
Comments.UserDisplayName: Wayne Watson
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-10-20T21:25:33.703Z
Comments.Text: Can you pls update your question then. And  confirm what permissions you have set for Anon.
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-10-20T23:37:23.700Z
Comments.Text: Permissions for anonymous are: make Online Contributions  (if I go to the contribution form that is being used for simple donate as the anonymous user it works properly),  Ajax API - (this was originally turned off, but I also turned it on to test to see if that fixed the issue),  view profile and then a few other permissions that are not contributions related.
Comments.UserDisplayName: Wayne Watson
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-10-20T23:40:46.347Z
Comments.Text: In the backtrace there is a block that shows is_public = 1, is_ssl = 1, which I had assumed  referred to the contribution page, but perhaps that is the wrong assumption.
Comments.UserDisplayName: Wayne Watson
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-10-21T03:47:20.480Z
Comments.Text: Access Custom Fields can be required if you have them in the Profile on the contribution page - but think I am chasing the wrong goose for you
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-10-21T03:47:49.057Z
Comments.Text: if you have a backtrace then suggest you paste it here
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-10-21T13:48:28.773Z
Comments.Text: Here is what is in the log from this morning from when I try to render simple donation page as anonymous user - edited original post.
Comments.UserDisplayName: Wayne Watson
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-10-26T14:24:56.220Z
Comments.Text: I spent more time troubleshooting this and while I am still trying to determine why the specific cause of the issue appears to be coming from a call to the civicrm mailing info.php even though the contact id is not set.
Comments.UserDisplayName: Wayne Watson
Tags: <civicontribute><contribution-page>
Title: Problem with Simple Donate extension and anonymous users
ThreadText: # Problem with Simple Donate extension and anonymous users
  
  (Asked by: username_0 on 2015-10-19)
  
  I installed and configured the [Simple Donate extension](https://civicrm.org/extensions/simple-donate) on Drupal 7.39 and Civicrm 4.6.3. The Simple Donate page displays and functions fine if you are logged into drupal, but for anonymous users an error message is displayed stating "id is not a valid integer"
  
  Looking at the backtrace it is showing the wrong domain\_id for the contribution page (it shows 1, but it should be 5) and and then at the very bottom the final message is Previous:Exception:private
  
  Any assistance is greatly appeciated as I am sure that I am missing a setting somewhere, but not sure where.
  
  Here is the backtrace I see in the logs after trying to render the page as anonymous user:
  
  Oct 21 06:42:59 [info] $Fatal Error Details = Array
  (
  [message] => id is not a valid integer
  [code] =>
  [exception] => CiviCRM\_API3\_Exception Object
  (
  [extraParams:CiviCRM\_API3\_Exception:private] => Array
  (
  [error\_field] => id
  [type] => integer
  [error\_code] => 2001
  [entity] => Contact
  [action] => get
  [is\_error] => 1
  [error\_message] => id is not a valid integer
  )
  
  ```
          [message:protected] => id is not a valid integer
          [string:Exception:private] =>
          [code:protected] => 0
          [file:protected] => /var/www/html/mplace/sites/all/modules/civicrm/api/api.php
          [line:protected] => 45
          [trace:Exception:private] => Array
              (
                  [0] => Array
                      (
                          [file] => /var/www/html/mplace/sites/all/modules/civicrm/CRM/Mailing/Info.php
                          [line] => 165
                          [function] => civicrm_api3
                          [args] => Array
                              (
                                  [0] => Contact
                                  [1] => getvalue
                                  [2] => Array
                                      (
                                          [id] => user_contact_id
                                          [return] => email
                                      )
  
                              )
  
                      )
  
                  [1] => Array
                      (
                          [file] => /var/www/html/mplace/sites/all/modules/civicrm/Civi/Angular/Manager.php
                          [line] => 130
                          [function] => getAngularModules
                          [class] => CRM_Mailing_Info
                          [type] => ->
                          [args] => Array
                              (
                              )
  
                      )
  
                  [2] => Array
                      (
                          [file] => /var/www/html/mplace/sites/all/modules/civicrm/Civi/Angular/Page/Main.php
                          [line] => 66
                          [function] => getModules
                          [class] => Civi\Angular\Manager
                          [type] => ->
                          [args] => Array
                              (
                              )
  
                      )
  
                  [3] => Array
                      (
                          [file] => /var/www/html/mplace/sites/all/modules/civicrm/Civi/Angular/Page/Main.php
                          [line] => 58
                          [function] => registerResources
                          [class] => Civi\Angular\Page\Main
                          [type] => ->
                          [args] => Array
                              (
                              )
  
                      )
  
                  [4] => Array
                      (
                          [file] => /var/www/html/mplace/sites/all/modules/civicrm/CRM/Core/Invoke.php
                          [line] => 312
                          [function] => run
                          [class] => Civi\Angular\Page\Main
                          [type] => ->
                          [args] => Array
                              (
                                  [0] => Array
                                      (
                                          [0] => civicrm
                                          [1] => simple
                                      )
  
                                  [1] =>
                              )
  
                      )
  
                  [5] => Array
                      (
                          [file] => /var/www/html/mplace/sites/all/modules/civicrm/CRM/Core/Invoke.php
                          [line] => 86
                          [function] => runItem
                          [class] => CRM_Core_Invoke
                          [type] => ::
                          [args] => Array
                              (
                                  [0] => Array
                                      (
                                          [id] => 417
                                          [domain_id] => 1
                                          [path] => civicrm/simple
                                          [title] => Simple Donation Page
                                          [access_callback] => Array
                                              (
                                                  [0] => CRM_Core_Permission
                                                  [1] => checkMenu
                                              )
  
                                          [access_arguments] => Array
                                              (
                                                  [0] => Array
                                                      (
                                                          [0] => make online contributions
                                                      )
  
                                                  [1] => and
                                              )
  
                                          [page_callback] => \Civi\Angular\Page\Main
                                          [breadcrumb] => Array
                                              (
                                                  [0] => Array
                                                      (
                                                          [title] => CiviCRM
                                                          [url] => /civicrm?reset=1
                                                      )
  
                                              )
  
                                          [is_public] => 1
                                          [is_ssl] => 1
                                          [weight] => 0
                                          [type] => 1
                                          [page_type] => 0
                                          [page_arguments] =>
                                      )
  
                              )
  
                      )
  
                  [6] => Array
                      (
                          [file] => /var/www/html/mplace/sites/all/modules/civicrm/CRM/Core/Invoke.php
                          [line] => 54
                          [function] => _invoke
                          [class] => CRM_Core_Invoke
                          [type] => ::
                          [args] => Array
                              (
                                  [0] => Array
                                      (
                                          [0] => civicrm
                                          [1] => simple
                                      )
  
                              )
  
                      )
  
                  [7] => Array
                      (
                          [file] => /var/www/html/mplace/sites/all/modules/civicrm/drupal/civicrm.module
                          [line] => 489
                          [function] => invoke
                          [class] => CRM_Core_Invoke
                          [type] => ::
                          [args] => Array
                              (
                                  [0] => Array
                                      (
                                          [0] => civicrm
                                          [1] => simple
                                      )
  
                              )
  
                      )
  
                  [8] => Array
                      (
                          [function] => civicrm_invoke
                          [args] => Array
                              (
                                  [0] => simple
                              )
  
                      )
  
                  [9] => Array
                      (
                          [file] => /var/www/html/mplace/includes/menu.inc
                          [line] => 519
                          [function] => call_user_func_array
                          [args] => Array
                              (
                                  [0] => civicrm_invoke
                                  [1] => Array
                                      (
                                          [0] => simple
                                      )
  
                              )
  
                  [10] => Array
                      (
                          [file] => /var/www/html/mplace/index.php
                          [line] => 21
                          [function] => menu_execute_active_handler
                          [args] => Array
                              (
                              )
  
                      )
  
              )
  
          [previous:Exception:private] =>
      )
  
  ```
  
  )
  
  Oct 21 06:42:59 [info] $backTrace = #0 /var/www/html/mplace/sites/all/modules/civicrm/CRM/Core/Error.php(444): CRM\_Core\_Error::backtrace("backTrace", TRUE)
  
  # 1 /var/www/html/mplace/sites/all/modules/civicrm/CRM/Core/Invoke.php(57): CRM\_Core\_Error::handleUnhandledException(Object(CiviCRM\_API3\_Exception))
  
  # 2 /var/www/html/mplace/sites/all/modules/civicrm/drupal/civicrm.module(489): CRM\_Core\_Invoke::invoke((Array:2))
  
  # 3 internal function: civicrm\_invoke("simple")
  
  # 4 /var/www/html/mplace/includes/menu.inc(519): call\_user\_func\_array("civicrm\_invoke", (Array:1))
  
  # 5 /var/www/html/mplace/index.php(21): menu\_execute\_active\_handler()
  
  # 6 {main}
  
  **Tags:** civicontribute, contribution-page
  
  > **Comments:**
  > **username_1**: Domain ID? So is this a CiviCRM multisite set up?  
  > **username_0**: No this is not a multisite setup, I was reading the wrong parameter, I was looking for the contribution_page_id for the configured contribution page and did not interpret the script correctly,  this makes more sense. so the domain_id is correct at 1.  
  > **username_1**: Can you pls update your question then. And  confirm what permissions you have set for Anon.  
  > **username_0**: Permissions for anonymous are: make Online Contributions  (if I go to the contribution form that is being used for simple donate as the anonymous user it works properly),  Ajax API - (this was originally turned off, but I also turned it on to test to see if that fixed the issue),  view profile and then a few other permissions that are not contributions related.  
  > **username_0**: In the backtrace there is a block that shows is_public = 1, is_ssl = 1, which I had assumed  referred to the contribution page, but perhaps that is the wrong assumption.  
  > **username_1**: Access Custom Fields can be required if you have them in the Profile on the contribution page - but think I am chasing the wrong goose for you  
  > **username_1**: if you have a backtrace then suggest you paste it here  
  > **username_0**: Here is what is in the log from this morning from when I try to render simple donation page as anonymous user - edited original post.  
  > **username_0**: I spent more time troubleshooting this and while I am still trying to determine why the specific cause of the issue appears to be coming from a call to the civicrm mailing info.php even though the contact id is not set.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2015-10-28. Score: 1 | Accepted answer
  
  username_0,
  
  Simple Donate is a CiviCRM + angular extension. So there was some issue with loading angular related files for the anonymous user.
  
  I would suggest below patch to your CiviCRM instance, <https://github.com/civicrm/civicrm-core/pull/7111>
  
  Here is the issue for more info: <https://issues.civicrm.org/jira/browse/CRM-17393>
  
  Let me know if it works.
  
  username_2
  
  > **Comments:**
  > **username_0**: Applying that patch did fix the issue, thanks for the assistance  
  > **username_2**: I have updated the PR, please use the above patch.  
  
  ---
  
  