Yii Framework Forum: Error pages/messages have no markup - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Error pages/messages have no markup Rate Topic: -----

#1 User is offline   spaceranger 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 18-October 17

Posted 18 October 2017 - 09:44 AM

Hi,

I 'inherited' an older 1.1.x Yii site and noticed that the error pages show no markup or html at all. It seems like the error pages from Yii are completely ignored.

If I call www.website.com/blabla the only response is;

Unable to resolve the request "blabla".


Without any html markup whatsoever. Just a blank white page with black text. It doesn't show the type of error either from what I noticed from other examples I found.

The header just lists it as a HTTP/1.1 200 OK


What I tried;

- Updating to latest 1.1.x version; yii-1.1.19.5790cb
- Added errorXXX.php files to themes folder /themes/<theme>/views/system/
- Added errorXXX.php files to /protected/views/system/

- Checked the SiteController.php but it has the default code;

	/**
	 * This is the action to handle external exceptions.
	 */
	public function actionError()
	{
	    if($error=Yii::app()->errorHandler->error)
	    {
	    	if(Yii::app()->request->isAjaxRequest)
	    		echo $error['message'];
	    	else
	        	$this->render('error', $error);
	    }
	}


- Checked the main.php config but also has the default snippet

		'errorHandler' => array(
			// use 'site/error' action to display errors
            'errorAction' => 'site/error',
        ),



I tried various suggestions posted in other topics/pages I found across the web but no luck as of yet. I'm kinda at a loss here.

Does anyone have any idea where to look and/or what to change?
0

#2 User is offline   spaceranger 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 18-October 17

Posted 15 November 2017 - 06:08 AM

Does no one have any suggestions on what to do/check?

I did notice that when I get a 500 error it does show the proper page lay-out, error message and error code in the header.

f.e.
Error 500
Undefined offset: 253


But for some reason when I call a non-existing page/url it sees it as a normal existing page and not as a 404 but without any mark-up (as described in my first post).
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users