artaylor Posted April 11, 2013 Posted April 11, 2013 I am running a local server (XAMPP) and have been converting a site from MODX to PW for the last few days (while I learn PW). Everything has been great. Now, all of a sudden I get the following message when I try to save anything: Saving is disabled in this demo. I have logged out and back in. I have checked the /site/config.php file and $config->demo = false; I did set $config->debug = true; earlier today while trying to figure out a problem. Suggestions?
nik Posted April 11, 2013 Posted April 11, 2013 Well that sounds odd. I don't see how it would be possible to get that message without $config->demo having a value that evaluates to true (https://github.com/ryancramerdesign/ProcessWire/blob/d453a76b1f1721ab43e1c81553e212d95699a942/wire/core/admin.php#L36). So, apparently in site/config.php things are ok. But do you have any custom code touching $config->demo, for example an if-clause of your own? One with a single equals sign even (which would set demo mode on), like this: if($config->demo = true) { // do something } I think you'd remember if you had set $config->demo to something truthy on purpose, anywhere on that site (have you?) .I can't come up with any better ideas now, but still wanted to give it a try. I hope you'll get it solved! 1
artaylor Posted April 11, 2013 Author Posted April 11, 2013 @nik: Thanks for the idea. I scanned all .php & .inc files in both /site and /wire and the only 2 files that contain the text $config->demo are /site/config.php and /wire/core/admin.php. Neither of those set the variable to true. going to do an apache reset and see if that helps...
artaylor Posted April 11, 2013 Author Posted April 11, 2013 Solved Never mind. I am a total idiot somehow. I swear I looked and looked and looked. Somehow I had reversed the two options and set debug to false and demo to true... Feel like a total putz. Let the razzing begin. I deserve a round of laughter and finger pointing. 4
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now