Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,091
    Thanks
    51
    Thanked 506 Times in 493 Posts
    Quote Originally Posted by rajdeep01 View Post
    You can add conditional logic to vary the message returned, dependent upon the specific error code.

    Here is an example of how to trap a 404 error and provide a custom message.

    <?php if ($this->error->code == '404') { ?>
    <div id="errorboxheader">Page not found</div>
    <div id="errorboxbody"><p>Sorry! That page cannot be found.</p>
    </div>
    </div>
    <?php } ?>
    Quote Originally Posted by rajdeep01 View Post
    If you want to see the error page in theme design and don't like redirecting to error page URL or duplicating HTML in the error page template, here is a way to apply your theme template to the error page.

    First, put the following code in templates/<template-name>/error.php:

    <?php
    // no direct access
    defined( '_JEXEC' ) or die( 'Restricted access' );

    include dirname(__FILE__) . "/index.php";
    ?>
    What does either of these have to do with the ops error? - you're talking about a 404 (page not found) error in the first message and in the second I have no idea what you're trying to get at. Neither seem relevant to the actual problem.
    My helpful sig is on vacation trying to loose some weight. It got a bit fat and caused a few problems but it will be back at some point!

  2. #17
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    Quote Originally Posted by vaporman87 View Post
    Thank for that Tango. With your help I was able to get the site running. Though, I am finding some bugs. Here is one error I encountered and it's respective code:

    Code:
    Fatal error: Call to undefined method stdClass::update() in /home/vaporman/public_html/protected/controllers/SiteController.php on line 1231
    PHP Code:
            Yii::app()->user->setFlash('msgError','Sorry, your reply could not be posted. Please try again.');
                }
                
            }
            else
            {
                
    $forum->views+=1;
                
    $forum->update();
            }
            
            
    $cat ForumCategory::model()->findByPk($forum['category_id']); 
    $forum->update(); is line 1231. Any thoughts, or need more info?

    This error occurs when a user is logged in to my site and views a forum thread, then clicks the "RetroDaze" logo to return to the home page.
    The site is located here: www.retro-daze.com
    Can't help with the actual fix for this error since we don't know where or how its created, but the error itself is quite simple. $forum has been declared as a type stdclass ($forum = new stdclass()), but it is attempting to call a method for stdclass::update which will never exist (stdclass has no method update and PHP doesn't allow a way to trait into a stdclass object [at least I don't think it does]). So the issue is simply that $forum is not of the correct datatype. Why it isn't is unknown; for that you need to determine the creation sequence for the $forum variable and have it created as the correct type (maybe of a new Forum datatype?).

    As for the above couple posts, love the randomness. I don't use any boxed CMS, but even I know that Joomla and Yii are different beasts.

  3. #18
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,091
    Thanks
    51
    Thanked 506 Times in 493 Posts
    Quote Originally Posted by Fou-Lu View Post
    As for the above couple posts, love the randomness.
    He's done a couple of them in DoubleDees topic too
    My helpful sig is on vacation trying to loose some weight. It got a bit fat and caused a few problems but it will be back at some point!


 
Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •