I am using references_dialog to improve the UX for my end users. That makes it possible to create an entity in a popup and autopopulating the entity reference field. However, on my site new nodes are not published by default. That makes it impossible to save the parent node afterwards. It happens even though the current user has access to see own unpublished content.

It should be possible to reference non-published content, but it should just not be shown when rendering the page for users who has not logged in. (and maybe there should be a small warning for the logged in user, that the content is not published.)

Comments

ff1’s picture

You can use views to expand the selection list to include unpublished nodes. That functionality is added by the patch in this issue: #1253776: Add views support for providing a list of entities or bundles (views filtering, relationships, etc)

lsolesen’s picture

Shouldn't it be standard for the module, that the user can reference the entities that he has access to and not needing to create a view for that?

cursor’s picture

Version: 7.x-1.0-rc1 » 7.x-1.0-rc3

I don't think it's still possible to refer unpublished nodes, even through views.

I tried using views to view unpublished nodes and in the view preview they show up fine but in the node edit unpublished nodes are still not visible. Making the node published immediately shows them up.

Is this feature still not available?

cursor’s picture

Status: Active » Fixed

Okay, scratch that. It works. Had to disable SQL rewriting in advanced settings of the view. Found the solution here http://drupal.org/node/1498612

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

thomasmurphy’s picture

Issue summary: View changes

I had this error even with published nodes the role had permission to see, but creating an entity reference view and using "Disable SQL rewriting" also solved my problem.