Skip to content

Commit

Permalink
Added 404 response for missing pages
Browse files Browse the repository at this point in the history
Applies to category, manufacturer, product, and information pages.

opencart/opencart#920
  • Loading branch information
opencarthelp committed Oct 1, 2013
1 parent d287961 commit a744421
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions upload/catalog/controller/error/not_found.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ public function index() {

$this->data['button_continue'] = $this->language->get('button_continue');

$this->response->addHeader($this->request->server['SERVER_PROTOCOL'] . '/1.1 404 Not Found');

$this->data['continue'] = $this->url->link('common/home');

if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/error/not_found.tpl')) {
Expand All @@ -66,6 +64,8 @@ public function index() {
'common/header'
);

$this->response->addHeader($this->request->server['SERVER_PROTOCOL'] . '/1.1 404 Not Found');

$this->response->setOutput($this->render());
}
}
Expand Down
2 changes: 2 additions & 0 deletions upload/catalog/controller/information/information.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ public function index() {
'common/header'
);

$this->response->addHeader($this->request->server['SERVER_PROTOCOL'] . '/1.1 404 Not Found');

$this->response->setOutput($this->render());
}
}
Expand Down
2 changes: 2 additions & 0 deletions upload/catalog/controller/product/category.php
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,8 @@ public function index() {
'common/header'
);

$this->response->addHeader($this->request->server['SERVER_PROTOCOL'] . '/1.1 404 Not Found');

$this->response->setOutput($this->render());
}
}
Expand Down
2 changes: 2 additions & 0 deletions upload/catalog/controller/product/manufacturer.php
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,8 @@ public function info() {
'common/header'
);

$this->response->addHeader($this->request->server['SERVER_PROTOCOL'] . '/1.1 404 Not Found');

$this->response->setOutput($this->render());
}
}
Expand Down
2 changes: 2 additions & 0 deletions upload/catalog/controller/product/product.php
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,8 @@ public function index() {
'common/header'
);

$this->response->addHeader($this->request->server['SERVER_PROTOCOL'] . '/1.1 404 Not Found');

$this->response->setOutput($this->render());
}
}
Expand Down

0 comments on commit a744421

Please sign in to comment.