Jump to content

[MODULE ISSUE]Prestashop dashboard widgets are not showing any data


Recommended Posts

Prestashop version:

Recently my client's prestashop has stopped showing any data on the dashboard(attachment below). 

And when debugging i found that the consule outputs an error 


Uncaught TypeError: window[data_type] is not a function
    at Object.success (dashboard.js:58)

Now with further digging i found that AdminDashboardController is not returning any ajax data. What gets resulted is a html page of the index page which basically means that the post request is not being processed in the backend at all.

The function 


public function ajaxProcessRefreshDashboard()


        $id_module = null;

        if ($module = Tools::getValue('module')) {

            $module_obj = Module::getInstanceByName($module);

            if (Validate::isLoadedObject($module_obj)) {

                $id_module = $module_obj->id;




        $params = array(

            'date_from' => $this->context->employee->stats_date_from,

            'date_to' => $this->context->employee->stats_date_to,

            'compare_from' => $this->context->employee->stats_compare_from,

            'compare_to' => $this->context->employee->stats_compare_to,

            'dashboard_use_push' => (int) Tools::getValue('dashboard_use_push'),

            'extra' => (int) Tools::getValue('extra'),



        die(json_encode(Hook::exec('dashboardData', $params, $id_module, true, true, (int) Tools::getValue('dashboard_use_push'))));


works but the results are not returned.

I've been messing around with it for some time now without success so ithought maybe someone could shed some light on my situation. I'm pretty new to prestashop to be honest and also i wasn't really sure if this is a bug really so i didn't want to post it on bug's forum


Edited by yugensl (see edit history)

Share this post

Link to post
Share on other sites

  • yugensl changed the title to [MODULE ISSUE]Prestashop dashboard widgets are not showing any data

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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More