Page 1 of 1

Phoca Gallery Button Plugin error

Posted: 10 Dec 2018, 12:12
by g101119
In Joomla 3.9, clicking on Phoca Gallery Button, then selecting "Image" or "Switch Image" displays this error:
Too few arguments to function Joomla\CMS\HTML\HTMLHelper::image(), 1 passed and at least 2 expected
Joomla 3.8 worked fine.

Re: Phoca Gallery Button Plugin error

Posted: 13 Dec 2018, 15:27
by Jan
Hi, can you paste here the screenshot of the warning?

Testing now without any problem in Joomla! 3.9

Image

Re: Phoca Gallery Button Plugin error

Posted: 29 Dec 2018, 11:37
by g101119

Re: Phoca Gallery Button Plugin error

Posted: 29 Dec 2018, 13:55
by Jan
Hmm, hard to say if this comes from Phoca Gallery, what message do you get when you enable debug mode (the message should be more detailed)?

Jan

Re: Phoca Gallery Button Plugin error

Posted: 16 Jan 2019, 11:51
by g101119
Can it be related to PHP update to version 7.2 i did recently?
Here's the text i get in debug mode:

Code: Select all

Обнаружена ошибка.

    0 Too few arguments to function Joomla\CMS\HTML\HTMLHelper::image(), 1 passed and at least 2 expected
    /home/pms-centr/pms-centr.spb.ru/docs/libraries/src/HTML/HTMLHelper.php:574 

Call stack
# 	Function 	Location
1 	() 	JROOT/libraries/src/HTML/HTMLHelper.php:574
2 	Joomla\CMS\HTML\HTMLHelper::image() 	 
3 	call_user_func_array() 	JROOT/libraries/src/HTML/HTMLHelper.php:239
4 	Joomla\CMS\HTML\HTMLHelper::call() 	JROOT/libraries/src/HTML/HTMLHelper.php:146
5 	Joomla\CMS\HTML\HTMLHelper::_() 	JROOT/administrator/components/com_phocagallery/views/phocagallerylinkimg/tmpl/default.php:156
6 	include() 	JROOT/libraries/src/MVC/View/HtmlView.php:697
7 	Joomla\CMS\MVC\View\HtmlView->loadTemplate() 	JROOT/libraries/src/MVC/View/HtmlView.php:230
8 	Joomla\CMS\MVC\View\HtmlView->display() 	JROOT/administrator/components/com_phocagallery/views/phocagallerylinkimg/view.html.php:157
9 	phocaGalleryCpViewphocaGalleryLinkImg->display() 	JROOT/libraries/src/MVC/Controller/BaseController.php:672
10 	Joomla\CMS\MVC\Controller\BaseController->display() 	JROOT/administrator/components/com_phocagallery/controller.php:60
11 	PhocaGalleryCpController->display() 	JROOT/libraries/src/MVC/Controller/BaseController.php:710
12 	Joomla\CMS\MVC\Controller\BaseController->execute() 	JROOT/administrator/components/com_phocagallery/phocagallery.php:44
13 	require_once() 	JROOT/libraries/src/Component/ComponentHelper.php:402
14 	Joomla\CMS\Component\ComponentHelper::executeComponent() 	JROOT/libraries/src/Component/ComponentHelper.php:377
15 	Joomla\CMS\Component\ComponentHelper::renderComponent() 	JROOT/libraries/src/Application/AdministratorApplication.php:101
16 	Joomla\CMS\Application\AdministratorApplication->dispatch() 	JROOT/libraries/src/Application/AdministratorApplication.php:159
17 	Joomla\CMS\Application\AdministratorApplication->doExecute() 	JROOT/libraries/src/Application/CMSApplication.php:196
18 	Joomla\CMS\Application\CMSApplication->execute() 	JROOT/administrator/index.php:51

Вернуться в Панель управления

Re: Phoca Gallery Button Plugin error

Posted: 19 Jan 2019, 19:16
by Jan
Hmmm, the problem is, the error comes from Joomla! HTML Helper library.

Maybe it is better to not use it in the code, I will change it for next version (administrator/components/com_phocagallery/views/phocagallerylinkimg/tmpl/default.php)

FROM:

Code: Select all

echo JHTML::_( 'image', 'media/com_phocagallery/images/administrator/phoca_thumb_s_no_image.gif');
TO:

Code: Select all

echo '<img src="'.JURI::root().'media/com_phocagallery/images/administrator/phoca_thumb_s_no_image.gif'.'" alt="" />';
Jan