Skip to content

All pages (new and existing) are being presented as newly created papi type #235

Closed

Description

@entr

The moment I created a new page type class all my existing pages were shown as of this new type in the edit.php?post_type=page table. When I enable the standard type and I choose it from new page type selection page I am redirected to post-new.php?page_type&post_type=page and I'm seeing the properties of the custom papi type I created earlier. I've created only one papi type. Let me know if you need more data.

  • Papi: 3.2.0-beta1
  • WordPress: 4.7.5

Activity

  1. changed the title [-][3.2.0-beta1] All pages (new and existing) are being presented as newly created papi type[/-] [+]All pages (new and existing) are being presented as newly created papi type[/+] on May 26, 2017
  2. frozzare commented on May 26, 2017

    @frozzare
    Member

    Please don't include the version in the title.

  3. frozzare commented on May 26, 2017

    @frozzare
    Member

    Will take a look at it when I have some time to code on this project.

  4. self-assigned this
    on May 26, 2017
  5. frozzare commented on May 30, 2017

    @frozzare
    Member

    I can't reproduce this, here is what I did:

    1. Created a standard page that don't have any properties.
    2. Created a article page that have 2 properties.
    3. No article page properties is not showed on the standard page.
    4. Article page properties is showed on the article page.

    As you can see in the screenshot the post list don't indicate that they have the wrong page type.

    skarmklipp 2017-05-30 15 16 42

    Could you try to reproduce this with the master branch? It's helpful if you have tested the master branch before you report any issues since maybe already fixed and if so it will save a lot of time.

  6. entr commented on May 30, 2017

    @entr
    ContributorAuthor

    I'll test again and report back. Just keep it on-hold until after the following weekend. Thank you for looking into these!

  7. entr commented on Jun 10, 2017

    @entr
    ContributorAuthor

    OK, I was able to reproduce again. What I did was:

    1. Clean install WP 4.8
    2. $ wp plugin install --activate https://github.com/wp-papi/papi/archive/master.zip
    3. Scaffold a child-theme of twentyseventeen (seventeen-child)
    4. Imported theme unit test XML: https://wpcom-themes.svn.automattic.com/demo/theme-unit-test-data.xml
    5. Created seventeen-child/papi.php where I placed the directory filter and required it from seventeen-child/functions.php
    <?php // seventeen-child/papi.php
    add_filter( 'papi/settings/directories', function () {
      return __DIR__ . '/page-types';
    } );
    1. Just copy-pasted the Video_Page_Type from the docs to
      seventeen-child/page-types/class-custom-page-type.php

    When I visited wp-admin/edit.php?post_type=page I got this

    image

    Do I miss something?

  8. frozzare commented on Jun 14, 2017

    @frozzare
    Member

    Sorry, The bug you reported isn't a bug since Papi don't enable WordPress "Standard Page" by default (if you have one Papi page type and don't enable standard page this behaviour is correct), you have to do that with a filter:

    add_filter( 'papi/settings/show_standard_page_type_page', '__return_true' );
    

    (where the last page word is the post type).

    The bug that I found when finding this is that the column didn't respect the show_standard_page_type filter and that is what I will fix.

  9. entr commented on Jun 14, 2017

    @entr
    ContributorAuthor

    OK, cool. Glad the report was useful after all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions