Questions tagged [debugging]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
1answer
51 views

How can I debug `craft\web\User::_validateUserAgentAndIp()` warnings

On a production site, we're seeing a ton of the following warning in our web.log files for (seemingly) every request, creating a ton of noise in the logs and making it hard to spot "real" issues: &...
2
votes
2answers
209 views

How can I print the name of every template being rendered in HTML comments, when in devMode?

Is there a plugin or setting that prints the name of every template being rendered in HTML comments? I noticed this type of feature in a Drupal project and it was useful for debugging. This is useful ...
1
vote
1answer
486 views

Random Fatal errors header already sent

So i am developing a site on Mamp Pro locally. All good. Its version controlled with github. When deployed to staging server it was fine initially. Last Friday deployed again and now i keep getting ...
1
vote
1answer
61 views

How to add a custom panel to the debug bar?

I'm working on porting a Yii2 component to Craft CMS as a plugin. This Yii2 component provides a debug bar custom panel that I'd like to enable in Craft CMS too. In classic Yii2 applications, this is ...
1
vote
1answer
56 views

Discount Code applies to cart successfully but doesn't do anything. Am I missing something?

Standard 10 dollars off discount setup. Although it says it is applied, it doesn't give me any kind of a discount. None of the discounts work, I've made multiple and tried different options but it ...
7
votes
3answers
3k views

Craft 3: how to show the Yii Debug Toolbar?

I'm using Craft 3 RC and I am logged as an admin. How can I display the Yii debug toolbar on front-end and Control Panel requests? By default, I don't see this toolbar.
1
vote
1answer
229 views

Yii Toolbar triggering mixed content warning in CP

I've enabled Show the debug toolbar on the Control Panel in my Craft Admin account in a local development environment that uses SSL. As soon as I enable it, I get the following error each time I load ...
2
votes
1answer
95 views

What's the template command to print available tokens?

I'm trying to dump a list of available template tokens, and their contents. There's a command that's available in dev mode, but I haven't found it's documentation.
0
votes
1answer
140 views

Error after downgrading from Pro to Personal

We developed a website under the trail Pro license. But now on the production server, we downgraded Craft to Personal. Since then we can't save entries and get a warning about it. The logfile gives ...
0
votes
0answers
442 views

Error uploading images on admin panel ( Failed to load resource: net::ERR_EMPTY_RESPONSE )

I have a problem uploading images on the CP. Small images success, but one with a 2Mb site fails with the error below. File was renamed to only ASCII chars, but problem still occures. PHP settings: ...
1
vote
1answer
515 views

Debugging an error (“An unknown error occurred”)

I keep getting an error when I am in the CP. The stack trace of the error that is logged is below: 2016/08/02 01:12:05 [error] [exception.Craft\HttpException.404] exception 'Craft\HttpException' in /...
1
vote
0answers
237 views

Showing Profiling Summary Report data in the frontend

I'm trying to debug why certain pages on a site are slow using the 'Profiling Summary Report' data that is logged to the console when devMode is enabled. For easy viewing, I've tried to output the ...
3
votes
2answers
2k views

“Unknown dump tag”

I'm using Craft 2.6.2776. According to the templating docs, Craft extends the built-in Twig templating functions, which it links to. Among those functions is dump(). Here's the relevant part of my ...
2
votes
1answer
758 views

Empty .getParam() does not return an array with dump()

craft.request.getQuery() returns: array (size=5) 'tags' => string 'anxiety' (length=7) 'maxPrice' => string '' (length=0) 'sessions' => array (size=4) 0 => string 'email' ...
3
votes
3answers
4k views

Assets (images) return a 404 on the front-end

I have the following issue which I can't seem to wrap my head around. All images assets uploaded to Craft return a 404 not found on the front-end. Everything works fine in the admin CP though (...
1
vote
1answer
272 views

Craft CMS plugin action debugging with IntelliJ

I have xDebug and IntelliJ setup to debug Craft and can run a debug profile where it stops on a breakpoint in index.php and interprets all the variables, etc. in IntelliJ console. However, it never ...
4
votes
2answers
883 views

How do I set up PhpStorm for plugin development

Can someone explain how to set up PhpStorm so that I can use it to develop/debug a plugin? I have local webserver set up craft files in the usual place above the webroot The new project wizard gives ...
1
vote
0answers
516 views

Debugging Validation Errors In Craft

Is it obvious why the task validation errors are not getting output in my log: public function runStep($step) { try { $entry = craft()->entries->getEntryById($this->_entryIds[...
0
votes
1answer
39 views

Outputting siteUrl consumes next closing tag

I'm running Craft Pro 2.3.2640. Here is the code: <span>{{ siteUrl }}</span> Here is the output: //localhost:3001/%3C/span%3E The opening tag stays intact. I am also struggling to ...
1
vote
1answer
1k views

Best practices in debugging an 'Unknown error'

How can I debug an 'Unknown error' message that I get with every request in Craft? Logging says: ****************************************************************************************************** ...
2
votes
1answer
112 views

JSON response displayed as plain text on submission when creating/editing an entry

I am running Craft Pro 2.2.2601. When I submit an entry, I am getting back JSON rather than being redirected to a success page. For example, I just go to: /admin/entries/pages/new I fill out some ...
3
votes
2answers
403 views

All fields disappearing except 'Title' after saving

All other fields disappear except the 'Title' field after I save a large block of text with a lot of links in the body (richtext) field. I can't seem to pinpoint it on to anything specific, this is ...
3
votes
3answers
1k views

Debugging Craft plugin actions

I'm new to php development, so I'm probably doing something silly... I have setup Craft running in a Vagrant VM on Windows 8. I am using XDebug and Eclipse as my IDE. It all works beautifully! ...
0
votes
3answers
416 views

DevMode Reveals Info to Everyone [closed]

DevMode is awesome, but I wanted to post this as a bit of a heads up. I'll preface to say yes, you shouldn't be developing live and yes, the docs do include a warning(yet very small and not really ...
19
votes
3answers
13k views

How can I check on the value of a template variable?

If I'm used to PHP's var_dump() and print_r() to check the value of a variable, how can I evolve to inspect things in Craft where Twig's dump isn't available?