diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php
index db3364ff04d..1b292b9e470 100644
--- a/htdocs/categories/class/categorie.class.php
+++ b/htdocs/categories/class/categorie.class.php
@@ -133,7 +133,7 @@ class Categorie extends CommonObject
);
public $element='category';
- public $table_element='categories';
+ public $table_element='categorie';
public $fk_parent;
public $label;
diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php
index 11aff01dc99..1c6186d5df4 100644
--- a/htdocs/categories/viewcat.php
+++ b/htdocs/categories/viewcat.php
@@ -35,14 +35,14 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
$langs->load("categories");
$id=GETPOST('id','int');
-$ref=GETPOST('ref');
+$label=GETPOST('label');
$type=GETPOST('type');
$action=GETPOST('action','aZ09');
$confirm=GETPOST('confirm');
$removeelem = GETPOST('removeelem','int');
$elemid=GETPOST('elemid');
-if ($id == "")
+if ($id == "" && $label == "")
{
dol_print_error('','Missing parameter id');
exit();
@@ -52,7 +52,7 @@ if ($id == "")
$result = restrictedArea($user, 'categorie', $id, '&category');
$object = new Categorie($db);
-$result=$object->fetch($id);
+$result=$object->fetch($id, $label);
$object->fetch_optionals($id,$extralabels);
if ($result <= 0)
{
@@ -195,7 +195,7 @@ $head = categories_prepare_head($object,$type);
dol_fiche_head($head, 'card', $title, -1, 'category');
$linkback = ''.$langs->trans("BackToList").'';
-
+$object->next_prev_filter=" type = ".$object->type;
$object->ref = $object->label;
$morehtmlref='