Skip to main content

Questions tagged [controller]

0 votes
0 answers
44 views

I created a module for Craft to get a simple contact form. To create the module I used the make module command. Now my problem is, that the controller is not found and I get a 404 message when I ...
FlorianG's user avatar
0 votes
0 answers
158 views

Got this error and not sure how can I fix this. // Function to get orders for a specific vendor public function getOrdersForVendor($vendorId) { $orders = $this->getAllOrdersFromWooCommerce(); ...
Nate's user avatar
  • 1
1 vote
1 answer
82 views

I don't get, how i should query for an entry by ID in Craft CMS 5. I have an entry in my "Article Comments" section: The Section contains the entry type "Comments Content". The ...
smaniren's user avatar
1 vote
1 answer
56 views

Trying to debug a form issue which is only happening on a live server (it works on our local environments). The form makes a fetch request (using Javascript) to a route in routes.php which goes to a ...
Jaytrix's user avatar
  • 337
1 vote
1 answer
146 views

I'm writing a plugin. I'd like it so that a request to view the page is processed via a Controller rather than goes straight to a template (following an MVC pattern). So a GET request to the URL of ...
Chuck Le Butt's user avatar
2 votes
2 answers
483 views

I'm trying to upload assets directly to a volume using the 'assets/upload' controller in a front-end form. There must have been some changes since Craft 3 and I'm running into 2 issues: Issue 1: ...
MetaMachine's user avatar
0 votes
0 answers
127 views

I'm working on a project where I use Craft CMS to manage user sessions and store user preferences such as site version and preferred language. However, for privacy reasons (GDPR compliance), I'm not ...
Romain P.'s user avatar
  • 1,927
1 vote
1 answer
115 views

I'm using Craft in headless mode. It's a multisite setup different languages. I know that's it's possible to query an element by it's uri. Is there a way to check if a full path or an absolute url ...
user14370's user avatar
1 vote
1 answer
73 views

I'm using Sprout Forms V3 on Craft 3. I'm trying to handle the submit within a controller. This choice is made to add a custom logic, to implement a Google reCAPTCHA (as the official Sprout's plugin ...
Romain P.'s user avatar
  • 1,927
1 vote
2 answers
488 views

I have a multi-pages form which is submitting using Sprig plugin. The action is targeting a controller in a custom module. Each step of the form is loading using the current step stored in session. ...
Romain P.'s user avatar
  • 1,927
1 vote
1 answer
2k views

I send a POST request from a headless frontend to a craft controller action but the request is not going trough because of: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the ...
Merc's user avatar
  • 283
1 vote
1 answer
1k views

I'm trying to listen to SSE events from a controller action. I am setting the headers in the controller action with: Craft::$app->response->headers ->set('Content-Type: text/event-...
Tudor-Radu Barbu's user avatar
0 votes
1 answer
71 views

We have a front-end registration form that was working as expected for months, and now mysteriously when someone registers they can't log in because their password is empty. Using a front-end password ...
Kirk Roberts's user avatar
0 votes
2 answers
716 views

I'm trying to set up a module with a controller as bit of a learning tool. The learning is not going well so far. Here is my setup: - modules - - site - - - playing - - - - Playing.php - - - - ...
supazu's user avatar
  • 576
0 votes
1 answer
177 views

I want to use the macro I defined in twig inside a controller or a module. Is that possible?
user's user avatar
  • 63

15 30 50 per page
1
2 3 4 5
10