Version check in plgHikashopHistory causes error

  • Posts: 58
  • Thank you received: 2
11 years 3 months ago #119669

-- HikaShop version -- : 2.1 > 2.2.0
-- Joomla version -- : 3.1.5
-- PHP version -- : 5.3.23
-- Error-message(debug-mod must be tuned on) -- : 404.shtml not found

When an order history changes to confirmed, the history plugin breaks at the version check. I've been trying to debug any db queries and after a couple of hours found that it is the plgHikashopHistory that was causing this issue that, at the end, did not change automatically the orders to confirmed after successful payment confirmation.
To make it work in my system I just removed the version check (I really don't need it as it it right now), but the Hika team might look at what is causing this issue when checking the version. Commented the removed lines to make it work successfully.

	function plgHikashopHistory(&$subject, $config){
		parent::__construct($subject, $config);
		if(!isset($this->params)){
			$plugin = JPluginHelper::getPlugin('hikashop', 'history');
			if(version_compare(JVERSION,'2.5','<')){ // **** REMOVED
				jimport('joomla.html.parameter'); // **** REMOVED
				$this->params = new JParameter($plugin->params); // **** REMOVED
			} else { // **** REMOVED
				$this->params = new JRegistry($plugin->params);
			} // **** REMOVED
		}
	}

Hope it helps anyone experiencing the same problem.

Last edit: 11 years 3 months ago by mcruip.

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

  • Posts: 26159
  • Thank you received: 4028
  • MODERATOR
11 years 3 months ago #119675

Hi,

You are running under Joomla 3.1, so your version is higher than 2.5, so you will pass in the part of the code you didn't removed.
Some people are still using Joomla 1.5 so the removed code can be useful for them.
I don't understand the "error" you removed and I don't understand why it should work now and not before.

Except if the JVERSION constant was not defined, it should work perfectly but if JVERSION is not defined it means that Joomla is not running.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: mcruip

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

  • Posts: 58
  • Thank you received: 2
11 years 3 months ago #119721

Hi Jerome,
Yep, looks like it was that. Looks like JVERSION constant was returning some other value that it should. So, please disregard this bug report... Thanks!

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

Time to create page: 0.041 seconds
Powered by Kunena Forum