Description
Description of the problem
According to the docs the consent form should return to the page it was submitted when the return paramter is omitted:
{exp:consent:form consent='ee:cookies_functionality|ee:cookies_performance'}
However, the above code always returns to the homepage so you actually have to use:
{exp:consent:form return="{current_path}" consent='ee:cookies_functionality|ee:cookies_performance'}
which does give the desired result but is inconsistent with the documentation.
Debugging points to decrypt() returning '' in particular openssl_decrypt
How To Reproduce
Make a consent form like below and 'agree' and you will be taken to the homepage and not the page you were on.
{if ! consent:has_responded:ee:cookies_functionality} {exp:consent:form return="{current_path}" consent='ee:cookies_functionality|ee:cookies_performance'} {consents}<input type="hidden" name="{consent_short_name}" value="y">{/consents} <div class="consent"> <div class="wrapper"><p>We use cookies to help make our site work properly and to analyze how our site is used. Some are optional, but none contain your personal information. You can view our <a href="/cookie-policy">cookies policy</a>, manage your <a href="/account/cookie-preferences">cookie preferences</a>, or consent and dismiss this banner by clicking agree:</p><p> <button class="btn">Agree</button> </p> </div> </div> {/exp:consent:form} {/if}
Environment Details:
- Version: [e.g. 5.1.2]
- PHP Version [7.1]
- MySQL Version [5.6.43]
- OS: [Ubuntu Linux/CentOS]
- Web Server: [Apache]
Activity
Merging bug/190-consent-return, resolves ExpressionEngine#190