For sites with many childpages under a certain page (for instance newsitems in the Blog-module), it is not possible to see the current link in the tinymce-popup for editing internal links.
This has to do with the node_threshold_leaf preventing the childeren to be loaded in the output of the json of admin/Modals/editorInternalLink/field/PageID/tree.
For the editor this looks like this:
How to reproduce
Install default Silverstripe installation
In the CMS, create 5 pages under About Us-page.
Change title of one of these pages to ABCDEF
Edit the homepage Content, and create a hyperlink to page ABCDEF
Save the page
Observe editing the link, via the TinyMCE interface, shows the currently selected internal page
Add a lower threshold in _config.php, by adding this line: SiteTree::config()->set('node_threshold_leaf', 3);
Observe editing the link, via the TinyMCE interface, does NOT show the currently selected internal page
In the network panel this is visible, by openig the XHR-request in a new tab:
Open https://localhost/admin/Modals/editorInternalLink/field/PageID/tree?forceValue=9&format=json
Change the node_threshold_leaf value
Refresh the json-page and see the children missing
This is even better visible, when changing the URL to &format=x
When the limit is not reached, this looks something like:
Home
About Us
Home
About Us
- New Page
- New Page
- ABCDEF
- New Page
Contact Us
But when the threshold is reached:
Home
About Us
- Too many children (0)
Contact Us
Possible Solution
No response
Additional Context
No response
Validations
[X] Check that there isn't already an issue that reports the same bug
[X] Double check that your reproduction steps work in a fresh installation of silverstripe/installer (with any code examples you've provided)
Module version(s) affected
5.1. and 4.13.
Description
For sites with many childpages under a certain page (for instance newsitems in the Blog-module), it is not possible to see the current link in the tinymce-popup for editing internal links.
This has to do with the
node_threshold_leaf
preventing the childeren to be loaded in the output of the json of admin/Modals/editorInternalLink/field/PageID/tree.For the editor this looks like this:![image](https://github.com/silverstripe/silverstripe-framework/assets/795238/2a1c2ac6-03f1-43c5-be1b-a0e66c32ea08)
How to reproduce
SiteTree::config()->set('node_threshold_leaf', 3);
In the network panel this is visible, by openig the XHR-request in a new tab:
https://localhost/admin/Modals/editorInternalLink/field/PageID/tree?forceValue=9&format=json
node_threshold_leaf
valueThis is even better visible, when changing the URL to
&format=x
When the limit is not reached, this looks something like:
But when the threshold is reached:
Possible Solution
No response
Additional Context
No response
Validations
silverstripe/installer
(with any code examples you've provided)