diff --git a/core/module/page/page.php b/core/module/page/page.php
index 9a672658..e88d259c 100644
--- a/core/module/page/page.php
+++ b/core/module/page/page.php
@@ -389,19 +389,23 @@ class page extends common {
$hierarchy = $this->getInput('pageEditParentPageId') ? $this->getHierarchy($this->getInput('pageEditParentPageId')) : array_keys($this->getHierarchy());
$position = $this->getInput('pageEditPosition', helper::FILTER_INT);
foreach($hierarchy as $hierarchyPageId) {
- // Ignore la page en cours de modification et les pages dans le menu extra
- if($hierarchyPageId === $this->getUrl(2) ||
- $this->getData(['page', $hierarchyPageId, 'extraPosition']) === false ) {
+
+ // Ignore la page en cours de modification
+ if($hierarchyPageId === $this->getUrl(2) ) {
continue;
}
- // Incrémente de +1 pour laisser la place à la position de la page en cours de modification
- if($lastPosition === $position) {
+ // Ne traite que les pages du menu standard
+ if ($this->getData(['page', $hierarchyPageId, 'extraPosition']) === false) {
+ // Incrémente de +1 pour laisser la place à la position de la page en cours de modification
+ if($lastPosition === $position) {
+ $lastPosition++;
+ }
+ // Change la position
+ $this->setData(['page', $hierarchyPageId, 'position', $lastPosition]);
+ // Incrémente pour la prochaine position
$lastPosition++;
}
- // Change la position
- $this->setData(['page', $hierarchyPageId, 'position', $lastPosition]);
- // Incrémente pour la prochaine position
- $lastPosition++;
+
}
if ($this->getinput('pageEditBlock') !== 'bar') {
$barLeft = $this->getinput('pageEditBarLeft');
diff --git a/core/module/page/view/edit/edit.js.php b/core/module/page/view/edit/edit.js.php
index 95f08152..e344bd80 100644
--- a/core/module/page/view/edit/edit.js.php
+++ b/core/module/page/view/edit/edit.js.php
@@ -240,16 +240,7 @@ $( document ).ready(function() {
if ($("#pageEditExtraPosition").val() == 1 ) {
var positionDOM = $("#pageEditPosition");
var positionInitial = getData(['page',$this->getUrl(2),"position"]); ?>;
- console.log(positionInitial);
- // La position précédente était dans le menu standard
- if (positionInitial >= 2)
- {
- positionInitial = 0;
- }
- positionDOM.empty().append(
- $("