Phoca Gallery Button Plugin error

Phoca Gallery plugins - plugins for Phoca Gallery extension
g101119
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 07 Apr 2018, 09:54

Phoca Gallery Button Plugin error

Post 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.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Gallery Button Plugin error

Post by Jan »

Hi, can you paste here the screenshot of the warning?

Testing now without any problem in Joomla! 3.9

Image
If you find Phoca extensions useful, please support the project
g101119
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 07 Apr 2018, 09:54

Re: Phoca Gallery Button Plugin error

Post by g101119 »

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Gallery Button Plugin error

Post 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
If you find Phoca extensions useful, please support the project
g101119
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 07 Apr 2018, 09:54

Re: Phoca Gallery Button Plugin error

Post 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

Вернуться в Панель управления
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Gallery Button Plugin error

Post 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
If you find Phoca extensions useful, please support the project
Post Reply