Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
I created a delete form to execute delete operation and the delete form need a parameter named file_name, so I added a new route in my moudle's routing.yml. But when I cleared the site cache I got an error. How can I solve it?
The error details: Symfony\Component\Routing\Exception\RouteNotFoundException: Route ''my_module_delete_the_file " does not exist.
I added the new route:
my_module_delete_the_file
path: '/admin/my_module/file/{file_name}/delete'
defaults:
_form: '\Drupal\my_module\Form\DeleteForm'
I want to get the new AMP module up and running on a new Drupal8 installation. I know alot about Drupal but I'm a newbie when it comes to using ssh and the command line. I've got as far as initializing the Composer Manager and applying the patch:
Hello,
I have installed simpleSAMLphp Auth module but I wonder how could I force the user to log-in using simpleSAML instead of their local log-in details so I could check that their Identity Provider account is still valid. I thought I could do so by using Rules module, but it doesn't let me (or I don't know how to do so) create a rule that is executed only one day a year.
I'm having trouble including the theme_handler service in a custom module's .install file
I inject:
$theme_handler = \Drupal::service('theme_handler');
And then when I include the following in my hook_install() function:
$theme_handler->enable(['desiredtheme']);
I get the following error when trying to install the module:
Fatal error: Call to a member function enable() on a non-object in (.install path) on line X