redux-framework icon indicating copy to clipboard operation
redux-framework copied to clipboard

Can't disable developer mode after setting dev_mode = False

Open badr0333 opened this issue 12 years ago • 20 comments

I am not using redux as a plugin, i have embedded it into my theme.I can't disable dev mode even though i set dev_mode = false.I am using version 3.3.6.9.

badr0333 avatar Sep 09 '14 16:09 badr0333

It's dev_mode => false;

Also, please upgrade to the latest version.

kprovance avatar Sep 09 '14 16:09 kprovance

I have done the same but the notification that says "Developer Mode Enabled" and ad in header it still there.

badr0333 avatar Sep 09 '14 16:09 badr0333

Please help you have closed the thread without solving the problem :/

badr0333 avatar Sep 09 '14 16:09 badr0333

I cannot reproduce. Where are adjusting this setting? And did you upgrade?

kprovance avatar Sep 09 '14 16:09 kprovance

I am setting dev_mode => false; in framework.php.I can't upgrade because i am working on it already.If i do then i have to make alot of changes.BTW the version i am using is close to the current version and it has no changes in changelog regarding developer mode so i guess it doesn't matter.

badr0333 avatar Sep 09 '14 16:09 badr0333

That's your problem. You need to make that adjustment in your config file.

kprovance avatar Sep 09 '14 16:09 kprovance

Opps sorry that was config.php i changed it for development purposes.And i figured out something else :)

badr0333 avatar Sep 09 '14 16:09 badr0333

You should never make changes to the framework.php. They will all be lost on updating. That's why arguments should be set in the config. Those in framework are defaults, overidden by those set in config.

kprovance avatar Sep 09 '14 16:09 kprovance

I guess you need to change this code

if ( isset( $this->args['dev_mode'] ) && $this->args['dev_mode'] ) {
                        echo '' . __( 'Developer Mode Enabled', 'redux-framework' ) . '';
                    }

to This

if ( isset( $this->args['dev_mode'] ) && $this->args['dev_mode'] == true ) {
                        echo '' . __( 'Developer Mode Enabled', 'redux-framework' ) . '';
                    }

So that if someone sets dev_mode => true; to dev_mode => false; that thing goes away. You know better then me because you are pro but i am just giving my opinion.

badr0333 avatar Sep 09 '14 16:09 badr0333

$this->args['dev_mode'] and $this->args['dev_mode'] == true are the same thing. They both evaluate to true. Changing it would make no difference. As I said, I cannot reproduce, but my config is correct and I'm not tampering with framework,php to adjust settings.

kprovance avatar Sep 09 '14 16:09 kprovance

Ops then i think i have to step back a little and charge my php skills.Thank you very much for your time, i appreciate it alot :+1: :)

badr0333 avatar Sep 10 '14 01:09 badr0333

Just wanted to comment in case someone else trips over the problem of not getting out of dev_mode.

'dev_mode' => 'false', // will not work 'dev_mode' => false, // works

TuxReports avatar Dec 18 '14 05:12 TuxReports

You're right. It's a Boolean variable. ;)

dovy avatar Dec 18 '14 13:12 dovy

With a fresh install I am getting this notice. I'm unsure as to why. In my config.php file I have: 'dev_mode' => false, The disabler plugin works but I really would like to not use a plugin to solve this problem.

invot avatar Apr 21 '15 17:04 invot

#2238, @invot

kprovance avatar Apr 21 '15 17:04 kprovance

Hi, i thank that because your have the define('WP_DEBUG', true) in wp-config.php (line 66), just set it to 'false' and it will work. @+

abeneo avatar Dec 31 '15 20:12 abeneo

Yes I just want to confirm the @abeneo 's comment. If you have included Redux in your theme and then included the simple-config.php and you have 'dev_mode' => false , then set your WP_DEBUG to false in wp-config.php and the Developer Mode goes away! Thank you!

asabanovic avatar Jan 29 '16 13:01 asabanovic

Thanks for your feedback! On 29 Jan 2016 14:44, "asabanovic" [email protected] wrote:

Yes I just want to confirm the @abeneo https://github.com/abeneo 's comment. If you have included Redux in your theme and then included the simple-config.php and you have 'dev_mode' => false , then set your WP_DEBUG to false in wp-config.php. Thank you!

— Reply to this email directly or view it on GitHub https://github.com/reduxframework/redux-framework/issues/1654#issuecomment-176760860 .

abeneo avatar Jan 29 '16 14:01 abeneo

i'm not sure of the reason, but if dev_mode flag is set to false, dev_mode tips and messages should be ignored, right now (v.3.9.4) checks for dev_mode are of this type:

if ( $this->args['dev_mode'] == true || Redux_Helpers::isLocalHost() == true )

or even if ( Redux_Helpers::isWpDebug() )

which re-enables dev_mode (even if explicitly set to false ) if localhost environment is used. imo this should be removed. If a developer needs to test without dev_mode on even in localhost environment it should be doable

foo123 avatar Feb 25 '16 02:02 foo123

This is the way we prefer it. Those in local or debug mode who ask for help never seemed to have dev_mode on. Plus, it circumvented our ad network, which is why Redux makes any type of money.

kprovance avatar Feb 25 '16 02:02 kprovance