This repository has been archived by the owner on Nov 3, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 213
Sorting problem in parent view (sorting mode 4) #8292
Comments
|
I can confirm the issue. This is a nasty one! :( |
|
The following change should fix the issue: diff --git a/system/modules/core/drivers/DC_Table.php b/system/modules/core/drivers/DC_Table.php
index 5e1e3c6..d38c1b5 100644
--- a/system/modules/core/drivers/DC_Table.php
+++ b/system/modules/core/drivers/DC_Table.php
@@ -2113,7 +2113,7 @@ class DC_Table extends \DataContainer implements \listable, \editable
\System::setCookie('BE_PAGE_OFFSET', 0, 0);
$strUrl = $this->addToUrl($GLOBALS['TL_DCA'][$this->strTable]['list']['operations']['edit']['href'], false);
- $strUrl = preg_replace('/(&)?(s2e|act)=[^&]*/i', '', $strUrl);
+ $strUrl = preg_replace('/&(amp;)?(s2e|act|mode|pid)=[^&]*/i', '', $strUrl);
$this->redirect($strUrl);
}@qzminski Can you please confirm? |
|
I can confirm the bugfix fixes both, problems 1 and 2! |
leofeyer
added a commit
that referenced
this issue
Jun 16, 2016
|
Fixed in ef87e7b. |
leofeyer
added a commit
to contao/core-bundle
that referenced
this issue
Jun 17, 2016
leofeyer
added a commit
that referenced
this issue
Jul 15, 2016
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Tested on Contao 3.5.9.
Problem 1
There is a sorting problem in the parent view (sorting mode 4) when you get into that view via
Save and editbutton. It works normally when you enter the page via edit button (yellow pencil icon) in the parent view.The issue is reproducable in the official Contao demo:
Save and editbutton.Problem 2
On our system there was also a problem with automatic change of pid of content element with ID of the current parent ID. Example:
We have created a calendar event with ID 30 and clicked the
Save and editbutton. Then we created two content elements. After changing the sorting via drag'n'drop and after refreshing the page, it occurred that Contao behind scenes foundtl_content.id=30and set itstl_content.pidto 30 (ID of calendar event)!I am pretty sure this would happen on Contao official demo as well but I can't reproduce it now, probably because I can't pair the newly created event ID with the content element that has the same ID.
Hints
I am almost sure that it is related to the URL parameters. If we compare the URL of in theory the same page, in fact we get two different param sets:
URL achieved by clicking the
Save and editbutton:URL achieved by clicking the edit button in parent view:
They are clearly not the same and the major difference is the
pidparameter in the first one. That could be the cause of all evil.I also think the problem may lay somewhere here, at least at some point because it takes the current request (which has that potentially wrong
pidparameter):https://github.com/contao/core/blob/master/assets/contao/js/core-uncompressed.js#L1376-L1393
The text was updated successfully, but these errors were encountered: