0

after registering for an even using PayPal - Website Payments Standard (with the CiviCore processor) the transaction worked and email was fired but the user sees this instead of the thank you page. this is the visible error: Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred. Could not find valid value for id

using CiviCRM 5.41.2 on top of Wordpress 5.8.1 the line in question seems to be:

$is_monetary = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Event', $id, 'is_monetary');

$id is defined:

$id = CRM_Utils_Request::retrieve('id', 'Positive', $controller, TRUE);

stack:

Exception trace
#   Function    Location
0   CRM_Utils_Request::retrieve('id', 'Positive', Object(CRM_Event_Controller_Registration), true)  /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Event/StateMachine/Registration.php:27
1   CRM_Event_StateMachine_Registration->__construct(Object(CRM_Event_Controller_Registration), true)   /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Event/Controller/Registration.php:27
2   CRM_Event_Controller_Registration->__construct('Event Registrati…', true, 'null', null, 'false')    /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:308
3   CRM_Core_Invoke::runItem(Array) /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:69
4   CRM_Core_Invoke::_invoke(Array) /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36
5   CRM_Core_Invoke::invoke(Array)  /var/www/html/wp-content/plugins/civicrm/civicrm.php:1178
6   CiviCRM_For_WordPress->invoke() /var/www/html/wp-content/plugins/civicrm/includes/civicrm.basepage.php:354
7   CiviCRM_For_WordPress_Basepage->basepage_handler(Object(WP))    /var/www/html/wp-includes/class-wp-hook.php:303
8   WP_Hook->apply_filters(null, Array) /var/www/html/wp-includes/class-wp-hook.php:327
9   WP_Hook->do_action(Array)   /var/www/html/wp-includes/plugin.php:518
10  do_action_ref_array('wp', Array)    /var/www/html/wp-includes/class-wp.php:763
11  WP->main('')    /var/www/html/wp-includes/functions.php:1291
12  wp()    /var/www/html/wp-blog-header.php:16
13  require('/var/www/html/wp…')    /var/www/html/index.php:17
14  {main}   
Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.
Could not find valid value for id

Return to home page.

logs: https://paste.ubuntu.com/p/fVWgvKK4cc/

the link after registartion/paypal looks like https://example.org/civicrm/event/register?_qf_ThankYou_display=1&qfKey=CRMEventControllerRegistrationNUMBERSANDLETTERS_NUMBERS&PayerID=NUMBERSANDLETTERS

the Test-drive works as expected. Example Link that works in test drive: https://example.org/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fevent%2Fregister&_qf_ThankYou_display=1&qfKey=CRMEventControllerRegistrationNUMBERSANDLETTERS_NUMBERS&PayerID=NUMBERSANDLETTERS I'm not sure where to go from here.

More logs!!! "ID is:" after each conditional in retrieve -> CRM/Utils/Request.php
and more before the throw.

      error_log("_SESSION is: " . print_R($_SESSION, true));
      error_log("_GET is: " . print_R($_GET, true));
      error_log("_POST is: " . print_R($_POST, true));
      error_log("_REQUEST is: " . print_R($_REQUEST, true));
      error_log("_SERVER is: " . print_R($_SERVER, true));
      error_log("ID is: " . print_R($value, true));

https://paste.ubuntu.com/p/sKd2Qkxknc/

16
  • you may need to add some info to your Q about your type of PayPal account and whether you are using core civi Payment Processor or eg Omnipay one. (not sure how PayPal gets set up so last point may be irrelevant)
    – petednz - fuzion
    Commented Sep 30, 2021 at 5:15
  • Check if a redirect is happening in before loading the thank you page. This is often the cause of this error message - i.e. loss of session data. Commented Sep 30, 2021 at 7:40
  • Thank you @petednz-fuzion I updated the Q.
    – James
    Commented Sep 30, 2021 at 18:53
  • @ChristianWach what other values do you expect to see in the query string?
    – James
    Commented Sep 30, 2021 at 18:55
  • I don't think its missing a value in test drive it works but the link is different. I think it may be a route or WP vs CiviCRM thang. Example Link that works in testdrive: example.org/wp-admin/…
    – James
    Commented Sep 30, 2021 at 19:11

1 Answer 1

0

It turns out adding a '/' at the end of the Permalink Settings was made it work. I'm not sure how this ever worked. From

/%category%/%post_id%/%postname%

To

/%category%/%post_id%/%postname%/

https://mysite.org/wp-admin/options-permalink.php

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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