1

I installed and configured the Simple Donate extension 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}

  • 1
    Domain ID? So is this a CiviCRM multisite set up? – petednz - fuzion Oct 19 '15 at 18:43
  • 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. – Wayne Watson Oct 20 '15 at 15:07
  • Can you pls update your question then. And confirm what permissions you have set for Anon. – petednz - fuzion Oct 20 '15 at 21:25
  • 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. – Wayne Watson Oct 20 '15 at 23:37
  • 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. – Wayne Watson Oct 20 '15 at 23:40
1

Wayne,

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.

Kurund

  • Applying that patch did fix the issue, thanks for the assistance – Wayne Watson Nov 4 '15 at 4:04
  • I have updated the PR, please use the above patch. – Kurund Jalmi Nov 4 '15 at 8:36

Your Answer

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

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