Jump to content

Wrong title in List in the BackOffice (Filter by date: a:2:{})


Recommended Posts

Good morning guys,

I have a problem in my ModuleAdminController: When I do a renderList, the title of the page (and the title of the list) is wrong, even when the filter is empty (also when you enter the first time in the module).

The title appear like this:

Filter by Date: a:2:{I:0;s:0:"";I:1;s:0:"";}

Looks like it is doing a filtering by default.

 

My ModuleAdminController:


class AdminPhotoOrderController extends ModuleAdminController
{
    public function __construct()
    {
        $this->bootstrap = true;
        $this->title = $this->l('Photo Order');
        $this->table = 'photo_order';
        $this->className = 'PhotoOrderData';
        $this->identifier = 'id_photo_order';
        $this->_defaultOrderBy = 'date_add';
    $this->_defaultOrderWay = 'DESC';
        $this->fields_list = $this->getFieldList();
        $this->lang = false;
        $this->deleted = true;
        $this->list_simple_header = false;
        $this->colorOnBackground = true;
        
        $this->actions = array('view', 'edit', 'delete');
        
        $this->bulk_actions = array(
                'approve' => array('text' => $this->l('Approve selected'), 'confirm' => $this->l('Approve selected items?')),
                'delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))
            );

        $this->context = Context::getContext();
    $this->multishop_context = Shop::CONTEXT_ALL;

        parent::__construct();
    }

    /**
     * Function used to render the list to display for this controller
     */
    public function renderList()
    {
        $this->addRowAction('edit');
        $this->addRowAction('details');
        
        $this->bulk_actions = array(
                'approve' => array('text' => $this->l('Approve selected'), 'confirm' => $this->l('Approve selected items?'), 'icon' => 'icon-check',),
                'delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'), 'icon' => 'icon-trash',)
            );

        return parent::renderList();
    }

...
}

Thanks so much.

Link to comment
Share on other sites

  • 4 months later...

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