silverstripe-cms
silverstripe-cms copied to clipboard
Missing TreeNode checkbox after reordering
Seems to only after the latest dev-master although I cannot find a point in time when this was introduced so I might be wrong...
The bug: In the pages tree view, drag-and-drop reorder a page, then tick the batch action tickbox, the node that was just reordered is missing the checkbox.
Screenshot:
Before re-ordering
After:
At first I thought it would just be a matter to adding the DOM node for the checkbox back in the LeftAndMain_TreeNode::forTemplate()
but this creates some weird styling issues, so it might need a little more investigating...
Just confirming this is still an issue in 3.2 beta 1.
Also caused when creating a new page. See https://github.com/silverstripe/silverstripe-cms/issues/1387
Hmm, is anyone going to take ownership of this? Seems like something that really needs fixing!
@jonom want to get neck-deep in jstree code and figure this out? :P
Not really :) but I've looked at the issue a little more at least. Normally when the site tree loads, each node contains markup for a checkbox like <ins class="jstree-checkbox"> </ins>
. When you move a page that markup dissapears... but only if you move it down! If you move it up the tree, the checkbox still appears. So... that is super weird but maybe can provide someone with a hint on where to look for a solution.
I couldn't replicate the issue when creating a new page.
Yep, still an issue in 4.x
From my experience the JS tree is incredibly fragile to the point whitespace matters in the ajax responses... I suspect that's the problem with reordering, the HTML is re-rendered, whitespace is implicitly changed and it all crumbles.
Considering we'll be converting the SiteTree to react soonish (he said confidently) and that we haven't found the time to look at this issue in 4 years, is there any point in keeping this open?