John Havlik
Forum Replies Created
-
Forum: Plugins
In reply to: [Breadcrumb NavXT] CPT and two taxonomiesThe challenge with taxonomies is establishing the relationship between the to taxonomy terms. If in your example New York has dog set as the parent term, Breadcrumb NavXT should be able to pick up on that. However, if that relationship isn’t set, while it’s possible to make it work when on a advert post, it is much more difficult on an archive page for the taxonomy terms (e.g. if you had an archive page that was the query result for adverts that are of category dog and location new york).
Only the
bcn_optionsshould be autoloaded. If the install method doesn’t run, and instead an settings update is how the settings ended up in the database it may have ended up setting both to autoloaded (I’ll look into this a bit more for 7.1). That said, since 7.0, the size of both option entries should no longer be as large as they used to be unless you changed many of the settings (if you are using all default values they should be empty arrays).Forum: Plugins
In reply to: [Breadcrumb NavXT] breadcrumb traductionSince root pages for CPTs are not built into WordPress, WPML doesn’t translate them. You will need extra code to translate the root page. There are a few ways of doing this, the most straight forward is write the code that hooks into the
bcn_breadcrumb_urlfilter. If you don’t want to write any code, there is an extension plugin to Breadcrumb NavXT that does this (and a few other things for improved WPML compatibility).Forum: Plugins
In reply to: [Breadcrumb NavXT] Taxonomy url has post_type filterYou can control this behavior by writing a function that hooks into the
bcn_add_post_type_argfilter. The following article provides an example of how to do this: https://mtekk.us/archives/guides/how-to-remove-post_type-from-breadcrumb-navxt-urls/Thanks for digging into this to identify the plugin that caused the problem. I took a look at said plugin, and it looks like that plugin is registering the
fv_player_encoding_categorytaxonomy at the incorrect time. It registers this taxonomy in thecreate_encoding_categoriesfunction that hooks into theadmin_initaction. The problem with this is not only is this after all of theinitfilters, but it makes the taxonomy unavailable outside the dashboard/admin area (which may be the intent, but if that is the intent, the taxonomy should be registered as a private taxonomy as well, which it currently is not).I’m adding a check/message in the next version of Breadcrumb NavXT that lets the user know in the settings page if a CPT or taxonomy was detected to be registered too late (a dismiss-able message as in some cases, such as with FV Flowplayer it seems to be intentional) and to not include settings form elements for said CPTs and taxonomies (aims to prevent PHP error messages).
Forum: Plugins
In reply to: [Breadcrumb NavXT] Breadcumbs NavXT remove the breadcumbs above the postBeyond the included widget and the block, Breadcrumb NavXT doesn’t control where a breadcrumb trail is displayed (there isn’t an option within the Breadcrumb NavXT settings to disable the display). In your case, the breadcrumb trail showing up under your title is something your theme is likely doing. Your theme may provide a way to disable the display at that location (it may have a setting, or potentially a filter you have to run), or it may not have any way to remove it without modifying the theme’s files.
Based on the specific setting that caused the issue, it appears you have taxonomies that are getting added after the priority level of 8999 on the
initaction. By default hooks into theinitaction are at priority 10, and Breadcrumb NavXT runs at 9000, which should be much later than anything else. It is highly suggested that whatever adds the taxonomy so late is changed to add it earlier (smaller priority number, my guess is someone used priority 9999, which for adding CPTs or taxonomies makes it difficult to play nice with other plugins/code).Forum: Plugins
In reply to: [Breadcrumb NavXT] Not showing product name in breadcrumbNot knowing more about the situation, my guess would be on the product page, when Breadcrumb NavXT is run, there isn’t a post representing the product loaded in WordPress. As to why this would be the case, the two possibilities that come to mind are either it isn’t actually a custom post type, or your theme is loading things in a non-standard way. Are you using a plugin for dealing with products, is it custom code, or something else?
Forum: Plugins
In reply to: [Breadcrumb NavXT] Google error itemListElement error ***FIX***Just a heads up, the provided instructions don’t seem to apply to Breadcrumb NavXT itself. Based on the description, the interface appears to be theme specific/theme related.
Forum: Plugins
In reply to: [Breadcrumb NavXT] Critical error after setting separatorAfter saving the change, if you revisit the settings page, is the error still there? I assume you’re using Breadcrumb NavXT 7.0.2, is that correct? The issue itself isn’t due to setting the separator to “/” (I can’t reproduce it on my testbed by doing this), but I have a couple of ideas of what may be causing this. It seems to be a flavor of the post type added too late in init (in this case in 7.0.2 it didn’t get registered before the 9000 priority).
Forum: Plugins
In reply to: [Breadcrumb NavXT] Installed this and my site diedUnfortunately, from the description, I’m not sure where to even start looking. My first guess is it isn’t actually Breadcrumb NavXT related. Especially since the problem persisted after deleting the plugin with FTP (there really isn’t a way for it to continue to run after it has been removed). That said, did your webhost have anything in your HTTP or PHP logs (error logs, or PHP slow log) that points to any of the Breadcrumb NavXT files?
Forum: Plugins
In reply to: [Breadcrumb NavXT] You do not have permission to access this pageAs a heads up, 7.0.2 has been released and should the fix for this issue in it.
Forum: Plugins
In reply to: [Breadcrumb NavXT] bcn_settings_init ReplacementSo, I think I’ve come to a conclusion on how this will have to work. It really isn’t a good thing to let others override the actual setting object instantiation. So, instead, the input is still strings in the array, and then we instantiate the setting with that value within the plugin itself. I’m tracking this in the following GitHub issue: https://github.com/mtekk/Breadcrumb-NavXT/issues/270 I have pushed a change that makes a first cut at this implementation. The good news is for the select settings that are supported, it is compatible with how pre-7.0 worked. When you get a chance, please try out the master branch on GitHub and let me know if it meets your needs for programmatically adjusting the setting default values.
Forum: Plugins
In reply to: [Breadcrumb NavXT] Breadcrumb pointing to page instead of post categoryIt sounds like you want to link to a page instead of term archive. A method of doing this is via the
bcn_breadcrumb_urlfilter. See the following article for an example of how to do this: https://mtekk.us/archives/guides/link-to-a-page-rather-than-the-category-archive-in-a-breadcrumb/ If you want a GUI method of doing this mapping (no writing of code needed), the Paths extension adds a method of mapping hierarchical terms (e.g. categories) to pages.Forum: Plugins
In reply to: [Breadcrumb NavXT] bcn_settings_init ReplacementAs part of the under the hood updates in Breadcrumb NavXT 7.0, the meaning of the filter changed slightly. It now expects the settings array (an array populated with objects compliant with the mtekk\adminKit\setting interface), where prior to 7.0 it contained the opts array (array of ‘raw’ options). This necessitated all 3rd party code to be updated that used this filter especially if it added items, or used the filter to override default values. Unfortunately, a bunch of 3rd party code was not updated, causing PHP warnings/errors (and a deluge of support requests). As part of the mitigation of the warnings/errors, the filter was moved to the top of the function, providing the ability of 3rd party code to add settings (e.g. for plugins that extend Breadcrumb NavXT), but removing the ability to affect the default settings.
I’m contemplating adding a
bcn_setup_setting_defaultsfilter to the end of the thesetup_setting_defaults()function to restore the ability to override the default settings. However, I’m trying to devise a way to ensure that bad things don’t happen when that is opened up again (potentially the filter won’t be added and the code afterbcn_settings_initchecks if a ‘good’ value exists before setting allowing the overriding of default values but in a safer way).