Compatibility issues with 7.x-4.x (#3):

  • access denied after returning to site (using paypal for payment),
  • form never submitted after successful payment (using paypal for payment).
  • can't download results

Comments

shrimphead created an issue. See original summary.

torotil’s picture

It works perfectly fine with webform-7.x-3.x -- as long as you use PHP-5.4 or newer.

peter panes’s picture

Then maybe there should be a mesage on the module page that this module doesn't yet work with webform 7.x-4.x.

The problems I'm having are:
-access denied after returning to site (using paypal for payment),
-form never submitted after successful payment (using paypal for payment).
-cant download results

SocialNicheGuru’s picture

Title: Make version apparent » Make version apparent - does not work with Webform 4.x (May 2016)

Thanks for this. I was wondering why it wasn't working for me. It's because I am using webform 4.x. Updated the title. This really should be stated somewhere.

SocialNicheGuru’s picture

Also wanted to chime in that I got the following error in my logs and a WSOD after
drush dis webform_paymethod_select
confirmed disabled

drush pm-uninstall webform_paymethod_select
confirmed uninstalled

drush rr --fiire-bazooka

I still got this error and WSOD:

HP Fatal error: Class 'PaymentLineItem' not found in webform_paymethod_select/src/PaymethodLineItem.php on line 11,

I had to delete the module for my site to come back up :(

katomat’s picture

I added a "3.x" to the dependency section on the description page. (Might be still too subtle, though.)

torotil’s picture

Issue summary: View changes
torotil’s picture

Title: Make version apparent - does not work with Webform 4.x (May 2016) » Does not work with Webform 4.x (May 2016)
Priority: Minor » Normal
torotil’s picture

Status: Active » Postponed (maintainer needs more info)

There is a sub-module named wps_test_method. This is a dummy payment method that allows to simulate nearly every scenario for webform_paymethod_select. Except for the results I can't reproduce any of the issues described.

louisnagtegaal’s picture

Hi,

I think the problem is that in the webform-module (version = "7.x-4.14")

webform/webform.module

access to a webform submission is checked in

function webform_confirmation_page_access($node)

It there is assumed that for anonymous users there is a token in the $_GET, line 576 of webform/webform.module
which is checked against the token for the current submission:

      $hash_query = !empty($_GET['token']) ? $_GET['token'] : NULL;
      $hash = webform_get_submission_access_token($submission);
      if ($hash_query === $hash) {
        return TRUE;
      }

But when I look in

little_helpers/src/Webform/Webform.php

at the function

public function getRedirect($submission = NULL)

(which is said to be "mainly a c&p of the relevant parts of * @see webform_client_form_submit()."

the only parameter added to the query-option for the redirect url is the 'sid', line 91:

	elseif ($redirect_url == '<confirmation>') {
	      $options = array();
	      if ($submission) {
        	$options['query']['sid'] = $submission->sid;
	      }
      	      return array('node/' . $node->nid . '/done', $options);
    	}

A possible solution would be to add the lines:

	global $user;
        if ((int) $user->uid === 0) {
          $options['query']['token'] = webform_get_submission_access_token($submission);
        }

(see webform/webform.module line 3382) after line 94 of little_helpers/src/Webform/Webform.php so that the token is include for anonymous users.

Would you agree this is a viable solution? Of course the patch should be applied to https://www.drupal.org/project/little_helpers and not here, but it seems a solution for this problem.

torotil’s picture

Hi, thanks for the analysis. Would you mind telling me what "this problem" is in your case? It seems that this bug-report became a catch-all for "[whatever] doesn't work with webform4". Without ever spelling out any way to reproduce any of the issues.

torotil’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

I'm closing this. Because it has become a wildcard issue for too many different bugs - most of them are fixed already.

If you experience a bug with using webform4 and webform_paymethod_select and find this issue: Please post a new bug-report instead of commenting here and include steps to reproduce your bug!