<p>This might not help but I've had a similar problem with a couple of my own modules and then with LInkVault that I went around in circles with. It suddenly stopped allowing non logged in users from downloading files. I contacted support who spotted the issue and fixed it in minutes. They gave this message:</p>

<p>Link Vault’s FrontEndController class has the allowAnonymous property set to true so that can’t be part of the problem</p>

<p>then a few minutes later:</p>

<p>Apparently, a recent Craft update added some logic in the craft\web\Controller::init() method that converts boolean allowAnonymous values to an integer which was part of the check that determines whether guests should be able to access a controller action. Link Vault’s front end controller had its own init() method but it wasn’t calling the parent’s init() method. So that is fixed now.</p>

<p>I leave this here in case it's any help either to this specific problem or anyone else with modules that run in to this issue.</p>

CC BY-SA 4.0
2019-10-29T01:36:39.990Z
Hmmm, seeing this in the version of the SproutForms plug's EntryController

/** @property null|\barrelstrength\sproutforms\elements\Entry $entryModel */
class EntriesController extends BaseController
{
...    protected $allowAnonymous = [
        'save-entry'
    ];

     public $form;

    public function init()
    {
        $response = Craft::$app->getResponse();
        $headers = $response->getHeaders();
        $headers->set('Cache-Control', 'private');
    }
carbonjoetunis
CC BY-SA 4.0
2019-10-30T12:04:37.613Z
Yep, upgraded everything and all is well now. Thanks
carbonjoetunis
CC BY-SA 4.0
2019-10-28T21:50:19.750Z
2019-10-28T21:50:19.750Z
Jeff Pullinger
<p>I have a basic Contact form built in a site I manage for a client. But for some reason, the form fails to submit if I'm (or the user using the site) isn't logged into the site (CMS). But this site is a basic marketing site, so visitors to the site do not have Craft CMS user accounts. Any idea what could be happening here? The logs don't help. </p>

CC BY-SA 4.0
2019-10-29T00:01:50.933Z
Can you post what version of Craft and Sprout Forms you are working with and update to the latest, if that's an option. (EDIT: I see you did in a support ticket!) Can you share any more details about how how the form fails to submit? Perhaps try disabling Captchas to reduce variables. Are you using Form Template overrides? Can you try submitting with a test page using just the output of the displayForm() tag and see if the behavior is the same?
Ben Parizek
CC BY-SA 4.0
2019-10-29T01:30:15.143Z
Real quick, here are my version:  Craft Pro 3.3.0.1 and Sprout Forms 3.2.4
carbonjoetunis
CC BY-SA 4.0
2019-10-30T02:31:48.677Z
Can you upgrade to the latest to confirm the issue wasn't addressed in a recent update? As of this note: Craft 3.3.13 and Sprout Forms 3.5.1
Ben Parizek
CC BY-SA 4.0
2019-10-30T12:04:23.617Z
I actually updated everything last night and it all started working. And the code it was breaking on (exception thrown) seemed to be related to the craft\web\Controller code with regard to guest entries or something (noted in the Answer below). So all good now.
carbonjoetunis
<plugin-sproutforms>
Can only submit my Sprout Form form if I'm logged into my site
# Can only submit my Sprout Form form if I'm logged into my site

(Asked by: username_0 on 2019-10-28)

I have a basic Contact form built in a site I manage for a client. But for some reason, the form fails to submit if I'm (or the user using the site) isn't logged into the site (CMS). But this site is a basic marketing site, so visitors to the site do not have Craft CMS user accounts. Any idea what could be happening here? The logs don't help.

**Tags:** plugin-sproutforms
> **Comments:**
> **username_1**: Can you post what version of Craft and Sprout Forms you are working with and update to the latest, if that's an option. (EDIT: I see you did in a support ticket!) Can you share any more details about how how the form fails to submit? Perhaps try disabling Captchas to reduce variables. Are you using Form Template overrides? Can you try submitting with a test page using just the output of the displayForm() tag and see if the behavior is the same?  
> **username_0**: Real quick, here are my version:  Craft Pro 3.3.0.1 and Sprout Forms 3.2.4  
> **username_1**: Can you upgrade to the latest to confirm the issue wasn't addressed in a recent update? As of this note: Craft 3.3.13 and Sprout Forms 3.5.1  
> **username_0**: I actually updated everything last night and it all started working. And the code it was breaking on (exception thrown) seemed to be related to the craft\web\Controller code with regard to guest entries or something (noted in the Answer below). So all good now.  

---

## 1 answers

### Answer by username_2 on 2019-10-28. Score: 1

This might not help but I've had a similar problem with a couple of my own modules and then with LInkVault that I went around in circles with. It suddenly stopped allowing non logged in users from downloading files. I contacted support who spotted the issue and fixed it in minutes. They gave this message:

Link Vault’s FrontEndController class has the allowAnonymous property set to true so that can’t be part of the problem

then a few minutes later:

Apparently, a recent Craft update added some logic in the craft\web\Controller::init() method that converts boolean allowAnonymous values to an integer which was part of the check that determines whether guests should be able to access a controller action. Link Vault’s front end controller had its own init() method but it wasn’t calling the parent’s init() method. So that is fixed now.

I leave this here in case it's any help either to this specific problem or anyone else with modules that run in to this issue.

> **Comments:**
> **username_0**: Hmmm, seeing this in the version of the SproutForms plug's EntryController  /** @property null|\barrelstrength\sproutforms\elements\Entry $entryModel */ class EntriesController extends BaseController { ...    protected $allowAnonymous = [         'save-entry'     ];       public $form;      public function init()     {         $response = Craft::$app->getResponse();         $headers = $response->getHeaders();         $headers->set('Cache-Control', 'private');     }  
> **username_0**: Yep, upgraded everything and all is well now. Thanks  

---

