• Using the newest version of the plugin and WordPress 4.9.6.

    The moment I activate the plugin for the “Resources” post type, the archive for that post type breaks completely. When I try deactivating all other plugins and even when activating a different theme, the taxonomy filters don’t even display at all for posts.

    Example of the broken archive:
    https://connectingcredentials.org/dev/resources/

    Is there any way to tell what in my WordPress installation is causing this to happen? The only errors related to Beautiful Taxonomy Filters I’m seeing in the error_log are:

    PHP Notice: Trying to get property of non-object in /home/cswor1/public_html/dev/wp-content/plugins/beautiful-taxonomy-filters/public/class-beautiful-taxonomy-filters-public.php on line 294

    PHP Warning: in_array() expects parameter 2 to be array, string given in /home/cswor1/public_html/dev/wp-content/plugins/beautiful-taxonomy-filters/public/class-beautiful-taxonomy-filters-public.php on line 647

    And these appear to only show up intermittently.

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Jonathandejong

    (@jonathandejong)

    Hi,

    It seems you’ve disabled BTF now as the archive is not broken?
    Can you please either reactivate it so I can check or take some screenshots and post here ??

    Do you not get any errors during activated either?
    Those notices and warnings are being worked out in the next version.

    Thread Starter skylerdynedge

    (@skylerdynedge)

    Hi, the plugin was active, it looks like I’d accidentally unchecked the “Resources” post type under the “Activate for these post types” section. Sorry about that, the Resources post has been rechecked and as you’ll see, the page completely fails to load now:

    https://connectingcredentials.org/dev/resources/

    I don’t see any errors during activation of the plugin or when I assign it to this Post type.

    Plugin Author Jonathandejong

    (@jonathandejong)

    Hmm okay so now, after visiting the archive, you can’t see any errors with wp_debug on?

    Also, which theme did you try? It’d be best if you could try like Twenty eighteen so to be sure there’s nothing wonky going on.

    I still have the same problem. When the filter is activated it breaks my custom post type archive. Can it be time you look into this for us since it’s happening on more than one theme

    Thread Starter skylerdynedge

    (@skylerdynedge)

    I’ve activated the Twenty Seventeen theme on my site and have the Taxonomy Filter displaying in a div as such:

    <div>
    	<p>BEAUTIFUL TAXONOMY FILTERS HERE</p>
    	<?php do_action('show_beautiful_filters'); ?>
    	<?php do_action('show_beautiful_filters_info'); ?>
    </div>

    When viewing the page, this div doesn’t even appear, nor does the page title. When I uncheck the box to activate it for the Resources post type, the page title reappears and this div shows up on the top of the page.

    The only things I’m seeing in wp_debug is:

    [14-Jun-2018 20:31:28 UTC] PHP Warning:  in_array() expects parameter 2 to be array, string given in /home/cswor1/public_html/dev/wp-content/plugins/beautiful-taxonomy-filters/public/class-beautiful-taxonomy-filters-public.php on line 647
    [14-Jun-2018 20:31:28 UTC] PHP Warning:  in_array() expects parameter 2 to be array, string given in /home/cswor1/public_html/dev/wp-content/plugins/beautiful-taxonomy-filters/public/class-beautiful-taxonomy-filters-public.php on line 647
    [14-Jun-2018 20:31:37 UTC] PHP Notice:  screen_icon is <strong>deprecated</strong> since version 3.8.0 with no alternative available. in /home/cswor1/public_html/dev/wp-includes/functions.php on line 3843
    [14-Jun-2018 20:31:37 UTC] PHP Notice:  get_screen_icon is <strong>deprecated</strong> since version 3.8.0 with no alternative available. in /home/cswor1/public_html/dev/wp-includes/functions.php on line 3843
    [14-Jun-2018 20:31:43 UTC] PHP Notice:  screen_icon is <strong>deprecated</strong> since version 3.8.0 with no alternative available. in /home/cswor1/public_html/dev/wp-includes/functions.php on line 3843
    [14-Jun-2018 20:31:43 UTC] PHP Notice:  get_screen_icon is <strong>deprecated</strong> since version 3.8.0 with no alternative available. in /home/cswor1/public_html/dev/wp-includes/functions.php on line 3843

    At least in the Twenty Seventeen theme the posts load. It appears that activating it for the post type breaks something as the page loads, resulting on content not being shown on the page.

    • This reply was modified 6 years, 5 months ago by skylerdynedge.
    • This reply was modified 6 years, 5 months ago by skylerdynedge. Reason: Added additional text
    Thread Starter skylerdynedge

    (@skylerdynedge)

    Anything? I can’t figure out what this issue is exactly…

    Plugin Author Jonathandejong

    (@jonathandejong)

    I’m working on it ??
    I have yet to be able to reproduce your issue tho.

    Would it be possible to email me a DB dump to test it out on?
    [email protected]

    Thread Starter skylerdynedge

    (@skylerdynedge)

    Absolutely, I’ve just emailed you a dumb of the database. Thank you for your help.

    Thread Starter skylerdynedge

    (@skylerdynedge)

    I’ve since discovered that when I activate for the “Resources” post type, the reason nothing then shows on the resources page is the index.php template file is then applied to that page, as opposed to the archive-resources.php custom post type template. Since the index.php file in my theme directory simply had the header and footer includes, those were all that would show on the page.

    I’ve cobbled together a hacky workaround by adding the code for the Resources custom post template to the index.php page, but this still causes issues.

    Any idea why activating the Beautiful Taxonomies for a custom post type would make the website disregard the template hierarchy and simply use index.php?

    Plugin Author Jonathandejong

    (@jonathandejong)

    Hi Skyler,

    Haven’t had the time to check the DB yet but thank you for sending it.

    No BTF does not attempt to decide what templates to use at all.
    The only way BTF actually modifies anything in terms of “core behaviour” is when you submit a filter. It will then build a new URL to the filtered page and redirect there.
    But in order for it to do that you’d pretty much have to submit the BTF filter because it checks for a specific nonce amongst other things.

    Do you have an archive.php template in your theme too? If not, what happens if you copy the archive-resources.php as an archive.php template too? Will it use that one?

    Are you sure your resurces cpt is registered with the slug “resources”? Not using a rewrite to get that name.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘“Activate for Post Type” causes archive to not load properly’ is closed to new replies.