Questions tagged [debugging]
The debugging tag has no usage guidance.
33
questions
1
vote
3
answers
58
views
Debug Toolbar Not Displaying on frontend
I just updated a site to Craft 4 and the debug toolbar no longer shows on the frontend, but does show in the CP. Have not had this issue with other sites that were updated.
Any ideas?
0
votes
0
answers
34
views
Error when creating new entry! HTTP 404 – Not Found – yii\web\NotFoundHttpException
Any help is appreciated! I just downloaded and setup craft using composer. I went to create my first blog entry, and as soon as I click "New Entry" I get this error. Setup went smoothly and ...
2
votes
2
answers
578
views
Invalid field uid
I keep seeing this in the craft debug bar in the control panel
Invalid field UID: 22faa4bf-2fb5-415b-b4e9-2416fe728843
How can I investigate what this means and resolve it?
UPDATE:
I've searched the ...
2
votes
1
answer
2k
views
Debugging with dump()/dd() within Twig templates
This feels like it falls under silly/obvious questions, but I can't seem to find a decent answer anywhere, so I'm asking here:
How do I find out which methods for example, is available on an object? ...
2
votes
1
answer
182
views
Is it possible to display the debug bar while NOT logged in?
I'm trying to solve some possible performance issues caused in the logic of my site which checks for whether a user is logged in or not, to display or not display certain pieces of content.
Is it ...
1
vote
1
answer
89
views
What are the minimum permissions to show the Craft debug toolbar?
To help validate a process is in place, we would like to allow a tester to login and view the Craft debug toolbar to see the logs. Currently, we have given the tester Admin, but we would like to only ...
1
vote
1
answer
245
views
Debugging Craft CMS templates on Visual Studio Code
Is there a way to debug templates used in craft cms on visual studio code? I tried doing it but I just get this error:
"${workspaceFolder}' can not be resolved. Please open a folder."
Any ...
1
vote
1
answer
410
views
Error handling in Craft
So I'm used to JS where I can console.log() most errors to assess the best way to debug what's going on.
In Craft, as many of the sites I am working on are live and in production and I struggle (...
3
votes
1
answer
593
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
2
answers
439
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
1
answer
1k
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
1
answer
218
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
1
answer
297
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 ...
9
votes
3
answers
7k
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
1
answer
569
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
1
answer
107
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
1
answer
224
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
0
answers
515
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
1
answer
548
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
0
answers
253
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 ...
5
votes
2
answers
3k
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
1
answer
1k
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
4
answers
8k
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
1
answer
347
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
2
answers
1k
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
0
answers
755
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
1
answer
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
1
answer
2k
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
1
answer
125
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
2
answers
557
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
3
answers
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
3
answers
444
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 ...
20
votes
3
answers
17k
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?