New answers tagged

1

Is it possible that the original licence was purchased with a different Pixel & Tonic ID? You could try and claim the licence by pasting your existing licence key (which you'll find in /config/license.key in your Craft installation directory) into the "claim a licence using a key" field. If you don't have any luck there, the P&T support ...


1

"After pushing the exec widget all the codebase changes, fields, sections are moved to the Staging environment." You skipped a step... Assuming you are properly using Project Config, you'll want to run craft up after deploying your files.


0

There are two distinct problems here, the first with the formatting of your POST request body and the second with the location / routing of your contoller. You were getting the first error because your POST request contained invalid JSON, which means Yii2 returns an error before the request even reaches your controller. When you simplified your request for ...


1

Your controller looks ok, though I would clean it up a bit and use more expressive variable names to reduce the surface area for bugs: $templateVariables = [ 'status' => true, 'message' => 'Sucess' ]; return $this->renderTemplate( 'craft-handle/test.twig', $templateVariables ); Now you will have access to the variables status and ...


3

When trying to figure out how to do something the core does programmatically, a good place to start is the core itself. In particular, you want to look at Craft's controllers which handle all interactions with the UI and Craft's services which provide a lot of methods for common tasks. In this case, you're looking for craft\controllers\SectionsController::...


Top 50 recent answers are included