Bug génant

  • Posts: 35
  • Thank you received: 3
7 years 2 months ago #276618

Bonjour,

Après un "clic" sur l'une des flèches pour modifier l'ordre....



On obtient ceci :



Bizarre...

Attachments:
Last edit: 7 years 2 months ago by jcfiguet.

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

  • Posts: 26146
  • Thank you received: 4026
  • MODERATOR
7 years 2 months ago #276639

Bonjour,

En effet, il manque l'authorization de "orderup" et "orderdown" alors que "saveorder" est lui, bien implémenté.
Pour changer l'ordre vous pouvez néanmoins utiliser les champs texte et le bouton "save" qui va se trouver dans la ligne de titre du tableau.

Vous pouvez aussi appliquer le patch qui sera dans la prochaine version d'HikaSerial.
Pour cela il faut modifier le fichier "administrator/components/com_hikaserial/controllers/plugins.php" et rempalcer

'modify' => array('save','apply','saveorder'),
Par
'modify' => array('save','apply','saveorder','orderdown','orderup'),
Et rajouter à la fin du fichier (avant la dernière accolade).
	public function orderdown() {
		$plugin_name = JRequest::getString('name', '');
		$plugin_type = JRequest::getCmd('plugin_type', '');
		if(empty($plugin_name) || !in_array($plugin_type, array('generator','consumer','plugin'))) {
			return false;
		}

		$orderHelper = hikaserial::get('helper.order');
		$orderHelper->pkey = $plugin_type.'_id';
		$orderHelper->table = $plugin_type;
		$orderHelper->groupMap = $plugin_type.'_type';
		$orderHelper->groupVal = $plugin_name;
		$orderHelper->orderingMap = $plugin_type.'_ordering';
		$orderHelper->order(true);

		JRequest::setVar('subtask', '');
		return $this->edit();
	}

	public function orderup() {
		$plugin_name = JRequest::getString('name', '');
		$plugin_type = JRequest::getCmd('plugin_type', '');
		if(empty($plugin_name) || !in_array($plugin_type, array('generator','consumer','plugin'))) {
			return false;
		}

		$orderHelper = hikaserial::get('helper.order');
		$orderHelper->pkey = $plugin_type.'_id';
		$orderHelper->table = $plugin_type;
		$orderHelper->groupMap = $plugin_type.'_type';
		$orderHelper->groupVal = $plugin_name;
		$orderHelper->orderingMap = $plugin_type.'_ordering';
		$orderHelper->order(false);

		JRequest::setVar('subtask', '');
		return $this->edit();
	}

Et cela devrait corriger le bug en question.

Cordialement,


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: jcfiguet

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

  • Posts: 35
  • Thank you received: 3
7 years 2 months ago #276659

OK, merci je vais faire ça en attendant la prochaine release !

Cordialement,

JC Figuet

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

Moderators: Obsidev
Time to create page: 0.072 seconds
Powered by Kunena Forum