Jump to content

Problem with Admin Controller file


niiko86

Recommended Posts

Hello last week I changed the domain name of my shop in my store and now i can't edit my product or add new.

This is the error i get.

Notice on line 1481 in file /var/www/vhosts/clima-holder.gr/httpdocs/clima-holder/classes/controller/AdminController.php
[8] Undefined offset: 0

Notice on line 1490 in file /var/www/vhosts/clima-holder.gr/httpdocs/clima-holder/classes/controller/AdminController.php
[8] Array to string conversion


Thank you

Link to comment
Share on other sites

Prestashop Version 1.6.1.4

 

line 1481

 

  $this->toolbar_title[] = is_array($obj->{$this->identifier_name}) ? $obj->{$this->identifier_name}[$this->context->employee->id_lang] : $obj->{$this->identifier_name};

 

line 1490

 

 $this->toolbar_title[] = sprintf($this->l('Edit: %s'), (is_array($obj->{$this->identifier_name}) && isset($obj->{$this->identifier_name}[$this->context->employee->id_lang])) ? $obj->{$this->identifier_name}[$this->context->employee->id_lang] : $obj->{$this->identifier_name});

Link to comment
Share on other sites

Sorry i dont understand, did i have to replace it like

 

  $this->toolbar_title[] = is_array($obj->{$this->identifier_name}) ? $obj->d($this->context->employee->id_lang);

?
 

: $obj->{$this->identifier_name};

Link to comment
Share on other sites

Really odd, the language is 0 for the current employee. Did you erase any language recently? How many does your store have?
Also, I would try reaching Administration -> Employees, click on your user and see what the language is. Eventually, save the page again and retry with the product

Link to comment
Share on other sites

In the beginning i start with 3 languages german english greek. But now i use only greek

 

 

 

I change in Administration -> Employees to greek and it works again 

 

 

 

String(1)"3"

 

Thank you

Link to comment
Share on other sites

  • 5 weeks 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...