This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Maintenance mode
#1
Question 

Hi there,

when the maintenance mode is activated, the page source code is cut off after the maintenance message.

I guess it's because you let the php file die in the "check_maintenance" function (comments/includes/functions/page.php).

Wouldn't it be better if you switch off the comments display by using a "if then" question?

Bye
... Gert
Reply
#2

Hi,

That's right, the maintenance feature uses the die() function to end scripting.

I can see how that could be a problem, like if you have code afterwards that you want run.

It will be fixed in the next version.

Have you completed the interview?
Reply
#3

Yeah, I was meaning to report that quite a while ago, but I then forgot. This would break things like php footers and such. How do you plan on circumventing this? Defining a constant that will stop execution of the script when set?

I'm giving you three guesses...
Reply
#4

I'll change the check_maintenance() function to return true or false. An if-else statement will be wrapped around the remaining code in commentics.php. If false, it will run the code. If true, it will call a function like show_maintenance().

Have you completed the interview?
Reply
#5

What about the other die() functions?

I'm giving you three guesses...
Reply
#6

There's only the ban function as far as I know.

Have you completed the interview?
Reply
#7

Is it a problem that the ban function kills the scripting?

Have you completed the interview?
Reply
#8

Actually, I think that the various checks for page validity also have die() functions. Try an invalid page id.

I'm giving you three guesses...
Reply
#9

Ah yes, you're right.

Although really one should never experience those checks, unless of course they mess up the integration. Even then, it shouldn't be a persistent thing.

I think the maintenance feature is slightly different because it's meant to be displayed to people, and could be displayed for a while.

Still, I'll look into making the same fix.

Have you completed the interview?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)