Page 1 of 1

Advert Manager Error

Posted: Thu May 12, 2022 1:35 pm
by radhavallabh
Hi dear;
On 1.0.8.14 I am getting below error on advert_manager.php when I try to add new advert.
Fatal error
: Uncaught TypeError: Argument 2 passed to Image::__construct() must be of the type array, string given, called in /xx/admin/includes/classes/admin.php on line 66 and defined in /xx/includes/system/versioned/1.0.8.1/image.php:29 Stack trace: #0 /xx/admin/includes/classes/admin.php(66): Image->__construct('includes/langua...', 'English') #1 /xx/admin/advert_manager.php(323): Admin::catalog_image('includes/langua...', 'English') #2 {main} thrown in
/xx/includes/system/versioned/1.0.8.1/image.php
on line
29

Please can you help me fix this issue;
Thanking you in advance;
Very warm regds./
radhavallabh

Re: Advert Manager Error

Posted: Thu May 12, 2022 2:28 pm
by burt
radhavallabh wrote: Thu May 12, 2022 1:35 pm On 1.0.8.14 I am getting below error on advert_manager.php when I try to add new advert.
I have just added an advert using 1.0.8.14 & it worked as expected.

Can you take notes of each step that you perform until it breaks [and then write down those steps to replicate], so that no time is wasted trying to get it to break...

Re: Advert Manager Error

Posted: Fri May 13, 2022 1:52 am
by radhavallabh
burt wrote: Thu May 12, 2022 2:28 pm
radhavallabh wrote: Thu May 12, 2022 1:35 pm On 1.0.8.14 I am getting below error on advert_manager.php when I try to add new advert.
I have just added an advert using 1.0.8.14 & it worked as expected.

Can you take notes of each step that you perform until it breaks [and then write down those steps to replicate], so that no time is wasted trying to get it to break...
Hi dear;
I follow below steps-
Click advert Manager -> Add New -> On the same page beside Html Text I get this error.
Attaching screenshot dear
Screenshot 2022-05-13 at 07-19-25 CE Phoenix Cart Administration Tool.png
Thank you in advance;
Very Warm Regds./
radhavallabh

Re: Advert Manager Error

Posted: Fri May 13, 2022 6:38 am
by radhavallabh
burt wrote: Thu May 12, 2022 2:28 pm
radhavallabh wrote: Thu May 12, 2022 1:35 pm On 1.0.8.14 I am getting below error on advert_manager.php when I try to add new advert.
I have just added an advert using 1.0.8.14 & it worked as expected.

Can you take notes of each step that you perform until it breaks [and then write down those steps to replicate], so that no time is wasted trying to get it to break...
Sorry for all the trouble....
Found my mistake dear;
As per suggestion by dear ecartz for a previous issue I had made the change on all admin side files for the new Image function call.
On below line I forgot to add ,[],

Code: Select all

 <span class="input-group-text"><?= $Admin->catalog_image("includes/languages/{$l['directory']}/images/{$l['image']}",[], $l['name']); ?></span>
Thank you again;
Very Warm regds./
radhavallabh