Questions tagged [devmode]

Config setting which allows the developer greater visibility of Errors/Warnings, more detailed logging and access to developer tools such as Twig's dump() function.

Filter by
Sorted by
Tagged with
0 votes
1 answer
25 views

.env / config data not loading on repeated / simultaneous requests

I'm having this strange issue on php7.4 and php8.1 on windows11 (apache2.4) where my craft sites loose or fail to load the .env data on some requests and only when under load / handling requests in ...
3 votes
1 answer
82 views

DevMode set to true, but doesn't appear to work locally

I'm having trouble getting DevMode to work locally. I'm using nitro. I have this set in my .env file... ENVIRONMENT=dev ... and my general.php file looks like... <?php /** * General Configuration ...
2 votes
1 answer
101 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,369
1 vote
1 answer
61 views

Show dev mode and Yii toolbar on secondary site

I am unclear on how to turn on dev mode as well as the Yii toolbar when viewing a secondary site in Craft.
  • 608
1 vote
1 answer
101 views

Limit DevMode to admin users?

Is there an easy way to enable devMode only to users logged in with specific permissions?
  • 608
1 vote
2 answers
307 views

Enable plugin in devMode

Is is possible to enable certain plugins only in devMode? (or via some other configuration option)?
1 vote
1 answer
372 views

devMode false, Internal Server Error

Wanted to test 404 error page on our beta site. Set devMode to "false" in general.php. When I do this and try to view inner pages on the website, we receive an "internal server error". All inner pages ...
  • 61
2 votes
1 answer
197 views

Profiling Summary Report in the console

I've noticed a few blog posts referring to the Profiling Summary Report. In the blog posts the author shows examples of it showing on Chrome's devtools. I'm in dev mode but can't see this on my Chrome ...
  • 21
1 vote
1 answer
1k views

Craft 3 devMode doesn't turn off

I've been working on a site locally in devMode. I moved it from Craft 2 to Craft 3. I set devMode to false in config/general.php file and in admin it doesn't show the devMode bar at the top, but ...
1 vote
2 answers
637 views

'devMode' enabled on the frontend yet its set to false

I have recently migrated a website to the live server. In the craft/config/general.php my 'devMode' is set to false. In the backend of the website I am not seeing the yellow and black banner to ...
1 vote
2 answers
101 views

Issue Devmode is still enable in multi-environment config file

I have an issue with a site I have just put live. devMode is still enabled even though the config site sets it as false for .com. Code snippet: '*' => array( 'devMode' => 'false', ...
  • 2,023
1 vote
1 answer
236 views

DevMode Class 'Exception\RuntimeException' not found

We started getting this error inconsistently on our site, and now it's constant unless we turn devMode off. We have no idea what may be causing it, but it only happens on one page. With devMode turned ...
  • 173
2 votes
1 answer
246 views

Is it possible to output Profiling Summary Report (devMode)

Is it possible to output Profiling Summary Report when in devMode? Looking to print this out onto a template: Time: 0.36980s Memory: 20,563Kb Total Queries: 19
  • 1,685
1 vote
1 answer
977 views

How to turn off application log in dev mode

I have been searching through the admin panel on our staging site trying to find where to turn off the application log. I know that you can turn off dev mode, and that will turn off the log, but I ...
1 vote
0 answers
574 views

devMode & PHP7.1 [closed]

I would like to use Craft's devMode but when I set it to true I get the following error: unserialize(): Unexpected end of serialized data. I believe this might be something to do with PHP7 for which ...
  • 11
0 votes
2 answers
58 views

DevMode causing stuck entry saves

Ok so this is part I need help part heads up for others. The back story... I a client messaged me saying that they couldn't save posts anymore for specific entries. I noticed the ones that were having ...
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 ...
  • 3,833
4 votes
2 answers
2k views

How can I check from a plugin config file if devMode is enabled?

Using the Pixel & Tonic Contact Form plugin, I added a config file (config/contactform.php) to override plugin settings from the CP. I would like to change some settings if devMode is enabled : ...
1 vote
1 answer
316 views

Push Notification plugin will not send iOS alerts when Craft CMS devMode is set to false

The Push Notification plugin will send out alerts ONLY if devMode is set to true. I can't leave my production environment in development mode so I'm trying to figure out why the alerts won't send ...
  • 383
1 vote
1 answer
419 views

Queries in devMode

When I look at the console log when devMode is enabled, I notice there's a lot going on, and I'm not sure if what I'm seeing is normal or not. There are dozens of [trace][system.db.CDbCommand]\...
  • 339
1 vote
2 answers
557 views

User Registration Form Redirect not working Craft 2.5

I'm using the following code but the redirect is not working. After the user registers it takes them back to the home page and not to volunteer/identity. I put a message on the homepage to display if ...
6 votes
1 answer
457 views

Make dump() available when devMode is disabled

Is there a way to make the dump() function available in my plugin templates when devMode is disabled?
  • 2,957
0 votes
0 answers
99 views

Issue with external JS when toggling between entry types

I'm working on a custom plugin / fieldtype, and it requires first an external JS library, and then it needs to be initialized in-page. I.e: <script src="//remote.path.to/my_script.js"></...
  • 616
1 vote
1 answer
382 views

Slow saving when devMode false, but not while true

All of a sudden, saving entries became really slow (up to a minute). Regardless of entry type. I came across this question: Saving entries in admin panel Problem is when I turn on devMode saving ...
0 votes
1 answer
153 views

Devmode entry variable NULL

When I'm using devmode to dump out a twig variable the site will no longer work saying that entry = NULL. This only happens when I have some twig logic at the top of my template e.g. {% set ...
1 vote
1 answer
395 views

DevMode not showing detailed Internal 500 Errors

I've noticed lately, maybe after the last Craft update or two, that internal 500 errors no longer show information or error traces. I simply get a message like: Internal Server Error Undefined offset:...
4 votes
3 answers
1k views

Cache issues making site super slow in production but not in dev mode

We have a site that is performing very poorly with very long load times and I'm guessing it may be related to caching but have no idea how/why. The site's homepage was loading very slowly while in ...
  • 699
3 votes
2 answers
1k views

Is it possible to disable dev output in a template when devMode is true?

For example the template just outputs JSON, which breaks when Craft's devMode logging is added.
  • 1,503
2 votes
1 answer
706 views

Config variable does not exist

I'm trying to set up caching and have it disabled for my local environment using {% cache unless craft.config.devMode %}. This works fine on non-local environments, but on my local environment I'm ...
1 vote
1 answer
655 views

Javascript console logs in devMode not always showing?

Im only recently noticed that sites with devMode turned on add some helpful information about queries and other logs into the console. See this screenshot: but im also noticing that some of our ...
1 vote
2 answers
178 views

Dev mode giving multiple errors but everything works

I use for example {{ craft.config.baseUrl }} where baseUrl is a custom variable in general.php This works fine. But when I enable devMode it gives a template error 'craft variable unknown'. I also ...
  • 1,456
1 vote
1 answer
18k views

"PHP Warning: var_export does not handle circular references" when devMode = true

When devMode is true, both the front end and admin of my site give me the PHP warning: "var_export does not handle circular references". I've tried disabling plugins, with no luck.
0 votes
3 answers
438 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 ...
  • 1,517
25 votes
4 answers
14k views

Access environment information in template

Is there a way to check what environment craft is running on - ie, dev or not dev - via the template. For example: {%if env is 'dev'%} hello dev {% else %} hello world {% endif %}
7 votes
3 answers
313 views

Avoid notice of variable's not being set within dev mode

With dev mode on, I'm getting a warning there is no entry.title, which I know about already because that's what I'm testing for: {% if entry.title | length == 0 %} {% set entry = craft.entries....