HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Todd: Suggestion for Bonk Page Replacement.

peregrineperegrine MVP
edited June 2012 in Feedback

replace error.master.php with this file or something like it.

   <?php
    @ob_end_clean();
    echo '<?xml version="1.0" encoding="utf-8"?>'; ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-ca">
    <head>
       <title>Bonk</title>
       <?php
       if ($CssPath !== FALSE)
          echo '<link rel="stylesheet" type="text/css" href="',Asset($CssPath),'" />';
       ?>
    </head>
    <body>
       <div id="Content">
          <div class="SplashInfo">
             <h1>Bonk</h1>
             <p>Something bunky happened. Please bear with us while we iron out the kinks.</p>
             <?php
             if (Gdn::Session()->CheckPermission('Garden.Settings.Manage')){
                     echo "to further debug put these lines in config.php";
                     echo "<br />\$Configuration['Garden']['Debug'] = TRUE;";
                     echo "<br />\$Configuration['Garden']['Errors']['MasterView'] = 'deverror.master.php\';";
                     echo "<br />";
                     echo "if you are changing a theme, the permission the following directories must exist and have permissions of 755.  If 755 does not work for you try 777";
                     echo "<br />";
                     echo "cache/ <br />  cache/Smarty/
     <br />   cache/Smarty/cache";
                   }             

             ?>
          </div>
       </div>
    </body>
    </html>

I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Best Answer

  • 422422 Developer MVP
    Answer ✓

    Good idea !

    There was an error rendering this rich post.

Answers

  • 422422 Developer MVP
    Answer ✓

    Good idea !

    There was an error rendering this rich post.

  • peregrineperegrine MVP
    edited June 2012

    also a change to your help sidebar

    How to Ask

    add
    . please scan the discussions and/or
    . use the search feature
    . read or scan the documentation
    . before asking your question.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • 422422 Developer MVP

    Not sure about the something bunky happened

    There was an error rendering this rich post.

  • peregrineperegrine MVP
    edited June 2012

    that was a residual when I was testing to make sure I was hitting the page I thought I was - it was "funky".

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • edited June 2012

    Something bonky happened...

    Really good idea, peregrine. I'm sure this would have saved me some trouble sometime back in the day... Yikes, come to think of it I've been using Vanilla for six years.

  • Even better a debug cookie, to be restricted to and turned on by admin. All they have to do is click on a link in the message.

    grep is your friend.

  • XarcellXarcell North Carolina

    Vanilla newbie here. Where do I replace the file "error.master.php" in my vanilla directory?

  • peregrineperegrine MVP
    edited July 2012

    Xarcell said:
    Vanilla newbie here. Where do I replace the file "error.master.php" in my vanilla directory?>

    After the fact. This was mostly a suggestion to Vanilla folks, not for you to do at home :).

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • LincLinc Detroit Admin

    During a bonk, you cannot assume any Garden assets are available at all. Otherwise, it defeats the purpose of a having a graceful failure page.

  • LincLinc Detroit Admin
    edited July 2012

    @Xarcell You don't, you add a NEW one to your theme, which overrides the existing one.

    Also, 'bonk' has had a more professional-looking revision for 2.1. (Makes me sad, but I'm sure many will appreciate it)

  • SheilaSheila ✭✭

    Lincoln said:
    During a bonk, you cannot assume any Garden assets are available at all. Otherwise, it defeats the purpose of a having a graceful failure page.

    I like the term 'graceful failure'! Sorry for the off topic, please continue.

  • LincLinc Detroit Admin

    "Graceful" in the sense that it's covering its mouth and burping instead of puking errors and code all over you. :D

  • Lincoln said:
    Also, 'bonk' has had a more professional-looking revision for 2.1. (Makes me sad, but I'm sure many will appreciate it)

    Oh, so finally we can get rid of the "I changed 1 line in conf/config.php and nothing happened" questions?

    There was an error rendering this rich post.

Sign In or Register to comment.