Answer the question
In order to leave comments, you need to log in
How to remove the 404 error when users add a post?
There is a site: kazansp.ru/company
if the user wants to add his company, then he gets a 404 error. How to make it at least redirect to registration
Answer the question
In order to leave comments, you need to log in
For InstantCMS 2.7.0 and above
Open file /system/controllers/content/actions/item_add.php
Find strings
// проверяем наличие доступа
if (!cmsUser::isAllowed($ctype_name, 'add')) {
if (!cmsUser::isAllowed($ctype_name, 'add_to_parent')) {
cmsCore::error404();
}
$is_check_parent_perm = true;
}
// проверяем наличие доступа
if (!cmsUser::isAllowed($ctype_name, 'add')) {
if (!cmsUser::isAllowed($ctype_name, 'add_to_parent')) {
if(!$this->cms_user->is_logged){
cmsUser::goLogin();
}
cmsCore::error404();
}
$is_check_parent_perm = true;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question