routing.yml for a custom form not working I have a form I'd like to use as a standalone page, which I'm defining in a module I've called "SREvent". I have created modules/srevent/src/Form/SREventListForm.php:

&lt;?php
/**
 * @file
 * Contains Drupal\srevent\Form\SREventListForm.
 */
namespace Drupal\srevent\Form;

use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\srevent\Entity\SREvent;
use Drupal\field_collection\Entity\FieldCollectionItem;
use Drupal\field_collection\Entity\FieldCollection;

class SREventListForm extends FormBase {    
    public function getFormId() {
        return 'srevent_list_form';
    }

    //used in getEvents()
    public $inactive = [];
    public $active = [];

    //function to get all appropriate entities
    function getEvents() {
        //....
    }

    /**
     * {@inheritdoc}
     */
    public function buildForm(array $form, FormStateInterface $form_state) {

        getEvents();

        //form builder logic

        return $form;
    }

    /**
     * {@inheritdoc}
     */
    public function validateForm(array &amp;$form, FormStateInterface $form_state) {
        return;
    }


    /**
     * {@inheritdoc}
     */
    public function submitForm(array &amp;$form, FormStateInterface $form_state) {
        return;
    }
}


In routing.yml, the route is as follows:

srevent.list_form:
  path: '/srevent/listform'
  defaults:
    _form: '\Drupal\srevent\Form\SREventListForm'
    _title: 'SREvent List'
  requirements:
    _access: 'TRUE'


There are other routing entries in this file as well, but none of those are giving me errors. I double checked for typos in the routing file as well as to make sure all indents are spaces and not tabs.

After flushing the cache repeatedly, /srevent/listform is still a 404.

This is how I set up all of my forms and have never seen this issue before, and every post I see on the topic tells me to set up exactly like this.

Is there something I'm missing? This is driving me crazy...
Try these steps one by one. 

Keep calm.

1) Check you are in the correct domain in your browser 


Ugh, I hate when this happens, wrong domain, lol. 


2) Check you're uploading or committing to the correct environment 


Download the file from the server to see if it indeed changed and make sure you're in the correct environment.


3) Check that your form (SREventListForm.php) is indeed inside the /Form folder.

Simplify your process

4) Back up your current module. Delete all the other routes except for the one that you're trying to dbug.

5) Simplify your form's code. Put some basic code in there.

6) Change your routes path