Jump to content

Getting "Saving is disabled in this demo." message suddenly.


artaylor
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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!

  • Like 1
Link to comment
Share on other sites

@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...

Link to comment
Share on other sites

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.

  • Like 4
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...