Closed shoored closed 6 years ago
I've just noticed this too
hey @svenjungnickel it now adds 'Singles' to the bottom of the list, this doesn't match the behaviour expected from the plugin and in my opinion could confuse clients. Unless I'm missing something?
Hey @lukeyouell. Which version are you using? Craft 2 or Craft 3? If you're using the Craft 3 version, did you install it via composer using the dev tag composer require verbb/cp-nav:dev-craft-3
?
@svenjungnickel I'm using the latest version of Craft 2
Just tested it. It appears for me at the top of the modal view. Can you provide some more details @lukeyouell, maybe a screenshot, config settings which differ from the default etc.?
There are no config settings that differ from default. I've attached a screenshot displaying the singles at the bottom of the list.
Thanks. Seems a bit odd. But I will dive into it and try to figure out what that occurs. I will come back to you.
Thanks @svenjungnickel for the fix! This works correctly on my local Craft2 environment, version 2.6.2991
@shoored thanks for your reply. That shows me that it worked at least for some one :D @lukeyouell do you have other plugins installed which adjust the entry selection modal? Which Craft2 version are you using?
@shoored @lukeyouell Just chiming in here after a decent amount of diving into how things are working (or not working!). Prefacing this by saying this is all working correctly in Craft 3.
In Craft 2, the available sections are prepared in its own private function, which check to see if sections have URLs. If entries don't have a URL, you obviously shouldn't be able to link to them. However, this is overriding the default entry index behaviour, and you'll notice your channel/structure headings aren't even being shown on the modal entry selector in a Redactor field.
After much investigation, its sad to say there is nothing we can do about this in Craft 2, short of getting P&T to change their code for the Rich Text field to accomodate for us. As such, we've had to disable Expanded Singles' functionality in the context of a modal window - when in use through Redactor, or an Entry select field. We can't have one working without negatively affecting the other.
Sorry there's no real solution to this, but we argue having your singles available to select (even if under the 'Singles' menu), is better than not being able to select them at all. We'll look at creating a PR to Craft 2 and see how we go with coming up with a solution...
This has been fixed in the latest master for Craft 2. Its not really possible to fix this in Craft 2 I'm afraid. Closing for now.
When I enable the plugin and set 'Expanded Singles' on, whenever I want to link to a Single Entry page from within Redactor, no Singles are shown in the Redactor link-dialog. Only Channel or Structures.
When I disable the plugin, the Single entries are again shown in the Redactor link-dialog.