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

Fix EZP-28750: Draft preview displays wrong Version information #1344

Conversation

jacek-foremski
Copy link

JIRA ticket: EZP-28750

Excerpt from JIRA:

When trying to access preview for a draft, the "Version information" section contains information about the last published version (instead of the draft that is being previewed). Additionally, the "Back to edit" and "Publish" buttons are disabled.

The issue was introduced in #1296.
It turns out that $version variable is used by other templates and it shouldn't be changed, so I renamed it to something more temporary.

{foreach $object.versions as $version}
{if eq($version.version, $object.published_version)}
{$version.creator.name|wash}
{foreach $object.versions as $tmp_version}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick, but could also be for instance $object_version

Copy link
Author

@jacek-foremski jacek-foremski Jan 17, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a variable named $object_version used in a few places, so I would need to check if it doesn't cause a similar issue.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, lets stay with this.

@andrerom andrerom merged commit c3922b2 into ezsystems:master Jan 18, 2018
@jacek-foremski jacek-foremski deleted the EZP-28750_fix_wrong_version_information branch January 18, 2018 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants