New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Entries fieldtype: filter out unpublished entries when augmenting #3544
Entries fieldtype: filter out unpublished entries when augmenting #3544
Conversation
I wonder if this change could introduce a breaking change for users who expect unpublished entries to be in there? |
@arthurperton Do you know if this also fixes #3539? |
No! I totally didn’t expect that after seeing the code. Did you try it out? |
Ah sorry I read your comment the wrong way. No this won’t solve #3539, that is a different and slightly more difficult one. |
@jasonvarga Do you consider this a breaking change or just a bug fix? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay.
I'd consider this a bug fix. We shouldn't be showing the published entries. I doubt many, if any, would want to see drafts on the front-end.
I think ideally, instead of augmenting to a collection of actual entries, maybe it could augment to a query builder instance. Then on the front-end you could add where clauses to it.
{{ my_entries_field status:is="draft" }}
...
{{ /my_entries_field }}
But that's getting complicated. We can work that out later. Could be a similar solution for #3539
Good! I'll look into #3539 again now that I know your stand on this 👍🏻 |
Hey guys, I have an entries fieldtype with published and unpublished entries, and augmentation now removes the unpublished entries. There seems to be no possible way to include them at the moment. I've rolled back to 3.1.14 in the meantime but hoping the above "status" solution gets implemented soon. |
I do have a similar case as @mikemartin described. On one page I loop through all entries and only the published should be showed. So far so good. On an another page I have an entries fieldtype (published and unpublished entries), and I would like to show the name/title of the entries, but only the published ones should have a link. The way I see it, I can currently only create this with an additional toggle field or similar? |
In addition, the collection overview does not show whether an unpublished entry is attached in the entry field type. In this example "Test 2" also have an entry attached, but it is an unpublished one. I probably tried this solution, because on the entry field type there is no hint, if the entry is published or not. Therefore, I thought that I could use the data under all conditions. |
Fixes #2721.