-
Notifications
You must be signed in to change notification settings - Fork 63
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
Draft preview links don't work #48
Comments
Hey @jgl221 thanks for the report. I was able to reproduce the issue and found out why this was happening. Similar situation to #21 so it's actually a problem with Craft's built-in Matrix field too (although you wouldn't usually run into this problem with Matrix as you don't need to filter by level). Simple enough solution so I've gone ahead and fixed it already. I'll be releasing a new version today at some point with the fix 👍 |
That's great, thank you for the quick response and fix! My clients will be very happy :) |
No problem! I haven't made the release yet as I've fixed some issues relating to localisation that I want to test thoroughly before it's available. If you can't wait any longer, grab the |
I grabbed the updated file from the |
Unfortunately it's a lot more complex than that. Does it work correctly with live preview with child blocks? If it does, I will find it a little strange that live preview would work but not drafts, since it's the same code running in both situations. Otherwise I probably missed something somewhere... |
Perhaps I oversimplified it just a tad :) But yes, Live Preview is working fine with both top-level and child block modifications. I thought maybe it had to do with caching or locale, but even with caching and locales turned off, I'm still seeing the same behavior where the Live Preview is showing the modifications on child blocks on drafts, but the draft token link when saved doesn't display the changes. |
Haha no it's a fair assumption, but it turns out how Live Preview (and Drafts) work in Craft is fundamentally flawed and it's taken quite a large amount of effort to get Neo to work around this problem. Clearly it's harder than I thought, as I'm still receiving issue reports relating to it. Thanks for the clarification. I'll see what I can do, but I won't lie it's a little confusing. I'll keep this thread updated. |
Thanks @benjamminf I appreciate your help! I don't doubt that it's very complicated, especially so if the fundamental way they work in Craft is wonky already. |
Good news, I figured it out :) Turns out I just missed some checks when adding in support for draft preview links. New version of Neo to be released over the weekend (probably). |
You're the tops! Thanks so much for the help. |
With the latest release, Draft tokenized links don't display correctly (or maybe this has always been the case?). If I save an existing entry as a draft and make edits to the draft, when I click the arrow to take me to the tokenized draft link, the changes that we make aren't displayed there and instead displays the current live version. Live Preview works just fine on the Drafts though and when I publish the Draft, the changes that I made in it do overwrite the existing version so that is working as well.
Unfortunately our clients do use the Draft mode quite frequently to get feedback and approval for changes and new layouts for their pages, so we've had to hack up a couple workarounds to that that aren't ideal (duplicate entry, disable the duplicated entry, make edits, and use that link to share out -- disabled entries that have tokenized URLs work just fine with edits/changes).
I took a look at the closed issues and saw that there was another issue relating to Drafts but that seems to have been fixed? So I believe this one is different however I could be wrong.
Thanks so much, other than this small issue we are loving Neo and hope that the Craft team can make it part of the core build at some point!
The text was updated successfully, but these errors were encountered: