Tirips Posted February 25, 2018 Share Posted February 25, 2018 Bonjour, Je me rends compte que lorsque mes caractéristiques contiennent plusieurs mots, dans l'URL ceux-ci sont séparés par des underscore ( _ ). Ca fait brouillons avec les tirets ( - ) que mes URL peuvent contenir... Quand je veux corriger ça, mon back-office ne me propose pas la ré-écriture d'URL (voir pièces jointes), au secours.... Merci d'avance ! Configuration 1.6.1.7. Link to comment Share on other sites More sharing options...
Eolia Posted February 25, 2018 Share Posted February 25, 2018 Question bête: Avez-vous le module de navigation à facettes d'installé et d'activé ? Link to comment Share on other sites More sharing options...
Tirips Posted February 25, 2018 Author Share Posted February 25, 2018 Yep ! J'ai aussi Advanced Search 4 v4.11.7 Link to comment Share on other sites More sharing options...
Eolia Posted February 25, 2018 Share Posted February 25, 2018 Alors votre version a un bug ou un override qui empêche cet enregistrement Link to comment Share on other sites More sharing options...
Tirips Posted February 25, 2018 Author Share Posted February 25, 2018 Arf Si je ne me trompe, les overrides viennent forcément d'un module ? Donc si je désactive tous les modules et que c'est dû à un override je devrais y accéder... Link to comment Share on other sites More sharing options...
Tirips Posted February 25, 2018 Author Share Posted February 25, 2018 Sur une version test, j'ai désactivé tous les modules non natifs et j'ai enfin le champ de ré-écriture URL... mais quand je consulte mon site j'ai toujours l'underscore Link to comment Share on other sites More sharing options...
Eolia Posted February 25, 2018 Share Posted February 25, 2018 Caches vidés ? (presta et serveur s'il y en a) Link to comment Share on other sites More sharing options...
Tirips Posted February 26, 2018 Author Share Posted February 26, 2018 (edited) Toujours pareil... (je suis chez O2Switch, apparemment il n'y a pas de cache serveur). Par curiosité j'ai également modifié un thème qui ne contient qu'un mot (amour --> bisou) et là ça marche Edited February 26, 2018 by Tirips oubli pj (see edit history) Link to comment Share on other sites More sharing options...
Eolia Posted February 26, 2018 Share Posted February 26, 2018 le problème vient du module blocklayered lui-même (Quoique ce ne soit pas vraiment un problème vu que tout ce qui est après le # n'est pas indexé) foreach ($filter_blocks as &$type_filter) { $filter_name = (!empty($type_filter['url_name']) ? $type_filter['url_name'] : $type_filter['name']); $filter_link_rewrite = Tools::link_rewrite($filter_name); if (count($type_filter) > 0 && !isset($type_filter['slider'])) { foreach ($type_filter['values'] as $key => $values) { $nofollow = false; if (!empty($values['checked']) && in_array($type_filter['type'], $blacklist)) $global_nofollow = true; $option_checked_clone_array = $option_checked_array; // If not filters checked, add parameter $value_name = !empty($values['url_name']) ? $values['url_name'] : $values['name']; if (!in_array(Tools::link_rewrite($value_name), $param_group_selected_array[$filter_link_rewrite])) { // Update parameter filter checked before if (array_key_exists($filter_link_rewrite, $option_checked_array)) { $option_checked_clone_array[$filter_link_rewrite] = $option_checked_clone_array[$filter_link_rewrite].$this->getAnchor().str_replace($this->getAnchor(), '_', Tools::link_rewrite($value_name)); if (in_array($type_filter['type'], $blacklist)) $nofollow = true; } else $option_checked_clone_array[$filter_link_rewrite] = $this->getAnchor().str_replace($this->getAnchor(), '_', Tools::link_rewrite($value_name)); } else { // Remove selected parameters $option_checked_clone_array[$filter_link_rewrite] = str_replace($this->getAnchor().str_replace($this->getAnchor(), '_', Tools::link_rewrite($value_name)), '', $option_checked_clone_array[$filter_link_rewrite]); if (empty($option_checked_clone_array[$filter_link_rewrite])) unset($option_checked_clone_array[$filter_link_rewrite]); } $parameters = ''; ksort($option_checked_clone_array); // Order parameters foreach ($option_checked_clone_array as $key_group => $value_group) $parameters .= '/'.str_replace($this->getAnchor(), '_', $key_group).$value_group; // Add nofollow if any blacklisted filters ins in parameters foreach ($filter_blocks as $filter) { $name = Tools::link_rewrite((!empty($filter['url_name']) ? $filter['url_name'] : $filter['name'])); if (in_array($filter['type'], $blacklist) && strpos($parameters, $name.'-') !== false) $nofollow = true; } // Check if there is an non indexable attribute or feature in the url foreach ($non_indexable as $value) if (strpos($parameters, '/'.$value) !== false) $nofollow = true; $type_filter['values'][$key]['link'] = $categorie_link.'#'.ltrim($parameters, '/'); $type_filter['values'][$key]['rel'] = ($nofollow) ? 'nofollow' : ''; } } } Link to comment Share on other sites More sharing options...
Tirips Posted March 2, 2018 Author Share Posted March 2, 2018 Je suis désolé mais je ne comprends pas votre réponse... Dans le code je vois bien le "link_rewrite" mais je ne comprends pas à quel endroit il décide de mettre un _ entre les mots. J'utilise également AdvancedSearch, lequel a priorité ? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now