silverstripe-cms icon indicating copy to clipboard operation
silverstripe-cms copied to clipboard

Missing TreeNode checkbox after reordering

Open colymba opened this issue 10 years ago • 8 comments

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 image

After: image

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...

colymba avatar Oct 02 '14 11:10 colymba

Just confirming this is still an issue in 3.2 beta 1.

jonom avatar Jun 24 '15 17:06 jonom

Also caused when creating a new page. See https://github.com/silverstripe/silverstripe-cms/issues/1387

tractorcow avatar Feb 04 '16 02:02 tractorcow

Hmm, is anyone going to take ownership of this? Seems like something that really needs fixing!

dhensby avatar Mar 21 '16 12:03 dhensby

@jonom want to get neck-deep in jstree code and figure this out? :P

tractorcow avatar Mar 22 '16 04:03 tractorcow

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">&nbsp;</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.

jonom avatar Mar 24 '16 17:03 jonom

Yep, still an issue in 4.x

chillu avatar May 19 '17 00:05 chillu

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.

dhensby avatar Jul 27 '17 15:07 dhensby

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?

maxime-rainville avatar Dec 05 '18 05:12 maxime-rainville