Questions tagged [controller]

The tag has no usage guidance.

9 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
458 views

Craft 3 Plugin - Only default action works

I'm working on a Cloudflare integration plugin for Craft 3. I set up the plugin with settings, which works fine so far. Now I intended to verify the Cloudflare credentials using an AJAX call. I set ...
1
vote
0answers
24 views

How can I override the Response status text from a controller?

I'm trying to set the statusText in a response, from a module controller. E.g.: <?php namespace modules\appmodule\controllers; use Craft; use craft\web\Response; class StatusController extends ...
1
vote
0answers
349 views

Unable to call a service method from controller in my custom plugin

I know there are similar questions here, but I don't see a definitive answer, nor one that works for me. I've generated a plugin via pluginfactory.io, which has some controllers and a single service. ...
1
vote
0answers
44 views

Find category through ajax using ElementCriteriaModel

I'm trying to run a controller action with ajax in a new plugin I'm making. The action needs to return all categories from a group, so nothing impossible here. When I run the actionUrl in the ...
1
vote
0answers
1k views

var_export does not handle circular references” when devMode = true and logDumpMethod = print_r

Here is a similar question that was asked but doesn't resolve my issue Question has changed, see UPDATE below I'm new here so I couldn't just tag a comment onto this post asking this question: I ...
0
votes
0answers
46 views

How to hook into root controller to redirect any route based on some criteria?

We have a use case where if our user account has a certain flag that they are redirected to a specific page. Is there a way to hook into the root controller or some sort of router mechanism such that ...
0
votes
0answers
17 views

Injecting filename into all templates?

I found a topic about getting the current filename for templates here: How can I make a template output its own filename? but I am curious, is there some way I can get the server to implement this ...
0
votes
0answers
40 views

Is it possible to use craft()->runController with variables in Craft 2

I'm trying to run a plugin 1 controller from plugin 2. I can get it to run and re-direct to plugin 1's controller but as it is not being run with posted variables I need to be able to tell plugin 1's ...
0
votes
0answers
399 views

Plugin Development (Craft 3): Pass variables with redirection

I'm building out a Craft 3 plugin and can't see who to pass variables with redirection from a controller. For example, I have a controller that I want to pass back to the defined redirect value ...