Skip to content
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

Can't access entry.currentRevision #7

Open
lindseydiloreto opened this issue Oct 7, 2021 · 1 comment
Open

Can't access entry.currentRevision #7

lindseydiloreto opened this issue Oct 7, 2021 · 1 comment
Labels
Bug Report Something isn't working

Comments

@lindseydiloreto
Copy link
Contributor

Typically, a good way to see an Entry's latest "Revision Notes" is like this...

{{ entry.currentRevision.revisionNotes }}

However, this does not work within the body of a triggered message. It seems the currentRevision is not yet accessible when the event is triggered. Part of the issue can be traced back to this line in Craft core.

Can we figure out why entry.currentRevision is not available when the notification is triggered? 🤔

@lindseydiloreto lindseydiloreto added the Bug Report Something isn't working label Oct 7, 2021
@lindseydiloreto
Copy link
Contributor Author

Apparently this works if you completely disable the Twig sandbox:

return [
    'twigSandbox' => false
];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Report Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant