One of the easily-met minor errors when using Leo Slideshow Module is the error “Access denied”. When you want to set up a background image for the slide, this error prevents you from accessing the upload and manage part of the Slideshow Module. This blog will give you a brief guide to fix this error. It’s just so short and simple. Now let get started.
I. Getting error can not set image in Leo Slideshow Module
You know you face this error when you get the notification Permission not allow as the screenshot below.
When you got the error can not set image slideshow.
The reason for this error is when a shortcode of a previous module version is not compatible with the current Prestashop version Or because the tab is not registered correctly
Please follow my guide to fix it.
II. How to fix error can not set image in Leo Slideshow Module
To fix the error can not set image in Leo Slideshow Module, the very first thing you need to do is to find function
public function getContent()
{
then you edit it to
public function getContent()
{
$id_tab = (int)Tab::getIdFromClassName('AdminLeoSlideshow');
if ($id_tab) {
$tab = new Tab($id_tab);
$tab->delete();
}
$id_tab = (int)Tab::getIdFromClassName('AdminLeoSlideshowMenuModule');
if ($id_tab) {
$tab = new Tab($id_tab);
$tab->delete();
}
$tab = new Tab();
$tab->active = 1;
$tab->class_name = 'AdminLeoSlideshow';
$tab->name = array();
foreach (Language::getLanguages(false) as $lang) {
$tab->name[$lang['id_lang']] = 'LeoSlideShow';
}
$tab->id_parent = -1;
$tab->module = $this->name;
$tab1 = new Tab();
$tab1->active = 1;
$tab1->class_name = 'AdminLeoSlideshowMenuModule';
$tab1->name = array();
foreach (Language::getLanguages(false) as $lang) {
$tab1->name[$lang['id_lang']] = 'Leo Slideshow Configuration';
}
$tab1->id_parent = Tab::getIdFromClassName('AdminParentModulesSf');
$tab1->module = $this->name;
/* Adds Module */
$tab->add();
$tab1->add() ;
next, you access module configuration and refresh the page
After that please restore the old code
public function getContent()
{
Now you have finished fixing the error can not set image in Leo Slideshow Module in the backend.
If you have any questions involved, feel free to leave it in the comment box or If you need any technical support, do not hesitate to reach us at leotheme@gmail.com, our dedicated support team will support you.
Good luck with our Leo Slideshow Module!