Jump to content

Redirection from backoffice


Recommended Posts

Hello everyone,

 

I have a strange problem: everytime I try to access the modules menu from my backoffice I get sent to my web page.

 

I can't manage the modules so I can't manage my shop, I would appreciate very much any help or hint.

 

Thanks in advance

 

Link to comment
Share on other sites

Are you logged in to the addons store from your installation?
In any case, you can try debugging and see where the break point is. Open up controllers/admin/adminModulesController.php. Find the initContent method. At the very beginning, add die('here);

 

See if the page dies to a blank with "here'. If so, move the code down a bit in the same method until it dies, so you can find what causes the redirection

Link to comment
Share on other sites

Hello and thank's very much for your help, Nemo1

 

I don't quite understand what you mean, I'm not very used to PHP scripts.

 

I cannot log to the addons store, it redirects me to the shop, as well.

 

I have opened up the file and this is what I found:

 

At the beginning:

 

public function ajaxProcessReloadModulesList()
{
if (Tools::getValue('filterCategory'))
Configuration::updateValue('PS_SHOW_CAT_MODULES_'.(int)$this->id_employee, Tools::getValue('filterCategory'));
if (Tools::getValue('unfilterCategory'))
Configuration::updateValue('PS_SHOW_CAT_MODULES_'.(int)$this->id_employee, '');
 
$this->initContent();
$this->smartyOutputContent('controllers/modules/list.tpl');
exit;
}
 
 
And at the end:
 
}
 
public function initContent()
{
$this->meta_title = 'Modules';
 
// If we are on a module configuration, no need to load all modules
if (Tools::getValue('configure') != '')
return true;
 
$this->initToolbar();
$this->initPageHeaderToolbar();
 

 

I'm afraid I don't understand what you mean when you say "add die('here);"

 

Thank's again!

Link to comment
Share on other sites

Hi Nemo1,

 

I think I understood your point.

I have been trying to find where dies the script redirects me to the shop with de die() command but it doesn't matter where I place it, it always dies.

 

Here is at the end:

 

$url = $module->url;
 
if (isset($module->type) && ($module->type == 'addonsPartner' || $module->type == 'addonsNative'))
$url = $this->context->link->getAdminLink('AdminModules').'&install='.urlencode($module->name).'&tab_module='.$module->tab.'&module_name='.$module->name.'&anchor='.ucfirst($module->name);
 
$this->context->smarty->assign(array(
'displayName' => $module->displayName,
'image' => $module->image,
'nb_rates' => (int)$module->nb_rates[0],
'avg_rate' => (int)$module->avg_rate[0],
'badges' => $module->badges,
'compatibility' => $module->compatibility,
'description_full' => $module->description_full,
'additional_description' => $module->additional_description,
'is_addons_partner' => (isset($module->type) && ($module->type == 'addonsPartner' || $module->type == 'addonsNative')),
'url' => $url,
'price' => $module->price
));
$this->smartyOutputContent('controllers/modules/quickview.tpl');
}
}
 
die('HERE')
 
 
Any other hint? I am completely clueless. Maybe any module list?
It is quite strange that in some menus like Module Positions I am sent to a CSV Catalog (Prestawiki)
 
Thank you again
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...