[j4] l'insertin de produit via le plugin fait planté mon site

  • Posts: 210
  • Thank you received: 11
  • Hikashop Business
1 year 11 months ago #341180

Bonjour,

Je rencontre le même problème.

WebAssetManager is locked, you came late
/home/seph8968/public_html/life4/libraries/src/WebAsset/WebAssetManager.php:273
Call stack
# Function Location
1 () JROOT/libraries/src/WebAsset/WebAssetManager.php:273
2 Joomla\CMS\WebAsset\WebAssetManager->useAsset() JROOT/libraries/src/WebAsset/WebAssetManager.php:201
3 Joomla\CMS\WebAsset\WebAssetManager->__call() JROOT/libraries/src/HTML/Helpers/FormBehavior.php:98
4 Joomla\CMS\HTML\Helpers\FormBehavior::chosen() JROOT/libraries/src/HTML/HTMLHelper.php:297
5 Joomla\CMS\HTML\HTMLHelper::call() JROOT/libraries/src/HTML/HTMLHelper.php:145
6 Joomla\CMS\HTML\HTMLHelper::_() JROOT/administrator/components/com_hikashop/helpers/helper.php:2597
7 hikashopView->display() JROOT/components/com_hikashop/views/product/view.html.php:29
8 ProductViewProduct->display() JROOT/administrator/components/com_hikashop/helpers/helper.php:864
9 hikashop_getLayout() JROOT/plugins/system/hikashopproductinsert/hikashopproductinsert_view.php:89
10 require() JROOT/plugins/system/hikashopproductinsert/hikashopproductinsert.php:474
11 plgSystemHikashopproductInsert->_processProduct() JROOT/plugins/system/hikashopproductinsert/hikashopproductinsert.php:123
12 plgSystemHikashopproductInsert->onAfterRender() JROOT/libraries/src/Plugin/CMSPlugin.php:285
13 Joomla\CMS\Plugin\CMSPlugin->Joomla\CMS\Plugin\{closure}() JROOT/libraries/vendor/joomla/event/src/Dispatcher.php:486
14 Joomla\Event\Dispatcher->dispatch() JROOT/libraries/src/Application/EventAware.php:111
15 Joomla\CMS\Application\WebApplication->triggerEvent() JROOT/libraries/src/Application/CMSApplication.php:1045
16 Joomla\CMS\Application\CMSApplication->render() JROOT/libraries/src/Application/SiteApplication.php:802
17 Joomla\CMS\Application\SiteApplication->render() JROOT/libraries/src/Application/CMSApplication.php:284
18 Joomla\CMS\Application\CMSApplication->execute() JROOT/includes/app.php:63
19 require_once() JROOT/index.php:32

Please Log in or Create an account to join the conversation.

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
1 year 11 months ago #341183

Hi,

While the generic message is the same, the callstack actually points to a different problem.
And that's normal since the patch we added for the initial problem is already in HikaShop and you already have it.

The callstack points to the loading of the chosen library. So I suppose you have the "use chosen library" setting of the HikaShop configuration activated and that's what triggering the error as the content tag replacing plugin is trying to load chosen while the web asset manager is already locked.

Change the code:

JHtml::_('formbehavior.chosen', 'select');
to:
try {
						JHtml::_('formbehavior.chosen', 'select');
					} catch(Exception $e) {
						$doc = JFactory::getDocument();
						$doc->addStyleSheet(JURI::base(true).'/media/vendor/chosen/chosen.css');
						$doc->addScript(JURI::base(true).'/media/vendor/chosen/chosen.jquery.js');
					}
at the two places of the file administrator/components/com_hikashop/helpers/helper.php where you find them and it should solve the problem.

Please confirm the resolution of the problem so that we can include the patch on our end.

Please Log in or Create an account to join the conversation.

  • Posts: 210
  • Thank you received: 11
  • Hikashop Business
1 year 10 months ago #341226

Bonjour,

JHtml::_('formbehavior.chosen', 'select'); est à deux endroits dans le fichier helper.php.

Le quel faut-il changer ?

$app = JFactory::getApplication();
			if(hikashop_isClient('administrator')) {
				if($_REQUEST['option'] == HIKASHOP_COMPONENT && !HIKASHOP_J40) {
					if($include_mootools)
						JHTML::_('behavior.framework');
					if(@$_REQUEST['ctrl'] != 'massaction')
						JHtml::_('formbehavior.chosen', 'select');
				}
			} else {
				$configClass =& hikashop_config();
				if($configClass->get('bootstrap_forcechosen', 0)) {
					if($include_mootools)
						JHTML::_('behavior.framework');
					JHtml::_('formbehavior.chosen', 'select');

Please Log in or Create an account to join the conversation.

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
1 year 10 months ago #341230

bonjour,

Pardon, en écrivant mon message, j'avais oublié qu'on était en Français...
Oui, il faut remplacer aux deux endroits, d'où le "at the two places" dans mon message précédent.

The following user(s) said Thank You: theomartin

Please Log in or Create an account to join the conversation.

  • Posts: 210
  • Thank you received: 11
  • Hikashop Business
1 year 10 months ago #341251

Bonjour,

J'ai lu trop vite...

J'ai appliqué la modification indiquée et cela fonctionne sans problème.

Merci à vous.

The following user(s) said Thank You: nicolas

Please Log in or Create an account to join the conversation.

Time to create page: 0.042 seconds
Powered by Kunena Forum