In Drupal 7, I have a content type with an entity reference field. When adding new content of this type, an entity reference view filters the available options.
A contextual filter on this entity reference view should check whether the data matches against the node ID from URL being viewed while adding the new content.
I'm not sure whether I understand correctly how Drupal is supposed to work here, as everything I've tried gives no results, unless I manually enter test data in which case it works fine.
Let's say a user is on page site.com/?q=node/75, then adds content. The new URL is site.com/?q=node/75#overlay=%3Fq%3Dnode%252Fadd%252Fcontenttype.
The contextual filter is set for "When the filter is not available" to "Provide default value" of type "Content ID from URL". This returns zero results, even though I could manually provide the filter value and it would show the actual results.
Is this because the "Content ID from URL" is coming from the underlying (originating) URL instead of the overlay new content part of the path? Or is there some other issue?
How is it possible to filter contextually against the content ID of the original page from which a user adds new content? If it could be done by passing arguments to the contextual filter with a token from the entity reference field, that would be fine too, however so far I have tried with current page node and more and run into the same problem, it does not filter any of the appropriate results.
Thank you for your help!