In the last version of webform 7.x-4.0-beta3 the function webform_get_submission has only two parameters and no more parameter "reset" to reset the drupal cache. In the documentation for this module in the web this parameter is always existing.
Will the parameter "reset" exist in the future? Which alternative could be used to be sure to get the submission right from database instead from cache?

CommentFileSizeAuthor
#3 2205757-backward-compatibility.patch772 bytesstefan.r
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quicksketch’s picture

Category: Feature request » Support request
Status: Active » Fixed

Will the parameter "reset" exist in the future? Which alternative could be used to be sure to get the submission right from database instead from cache?

Because webform_get_submission() uses drupal_static(), you can reset the static cache by using drupal_static_reset('webform_get_submission'). This function was introduced in D7 specifically to prevent the need for reset parameters all over the place.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

stefan.r’s picture

I realize these pesky reset parameters are annoying, but we don't want to accidently break other custom modules using this function in a 3.x->4.x upgrade.

May be worth either putting back the param for backward compatibility or clearly spelling out the API change in the docs.

stefan.r’s picture

Status: Closed (fixed) » Needs review

Status: Needs review » Needs work

The last submitted patch, 3: 2205757-backward-compatibility.patch, failed testing.

stefan.r’s picture

Category: Support request » Feature request
Status: Needs work » Active

Not sure why those tests failed? This patch shouldn't affect them...

Either way, if we don't want the patch and get rid of the $reset parameter, we should at least update the docs:

https://drupal.org/node/1609324

stefan.r’s picture

Version: 7.x-4.0-beta3 » 7.x-4.x-dev
Status: Active » Needs review
stefan.r’s picture

DanChadwick’s picture

Status: Needs review » Closed (won't fix)

This won't be committed for the reason quicksketch said, but it would be wonderful if you would write a note in the 3 to 4 upgrade page: https://www.drupal.org/node/1609324