Skip to content

Page preview bug in v1.7.1 (OK in v1.7.0) #1728

@pyksid

Description

@pyksid

Expected behavior

On admin page, edit post, the preview button show the post modified in a new tab. A new click on preview button should reload the same tab where there is the post modified.

Actual behavior

  1. A new click on preview button open a new tab, it doesn't refresh the existing tab.
  2. The modified post (preview) doesn't show the thumbnail, the category and others info.

Same problem here: #1318 and #1400

Steps to reproduce behavior

Click on preview button in admin page, edit post.

What version of WordPress, PHP and Timber are you using?

PHP 7.2.5
WordPress 4.9.6
Timber 1.7.1

How did you install Timber? (for example, from GitHub, Composer/Packagist, WP.org?)

Packagist

Resolution

I managed to solve the problem:

  • Downgrade from 1.7.1 to 1.7.0
  • Replace $post = new Timber\Post(); by $post = Timber\Timber::query_post(); in single.php

It doesn't work with 1.7.1, with 1.7.0 it's OK.

I think it's because of changes in lib/Post.php.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions