-
Notifications
You must be signed in to change notification settings - Fork 157
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
Unable to PUSH new CPTs #366
Comments
@jeffpaul, It's expected behavior for the current codebase (see below). When we add new CPT, the value I'm thinking about checking if supported custom post types listed in |
@dkotter any preference on approach for this^? |
@jeffpaul @dinhtungdu Yeah, this is tricky and not sure there's a great solution. Basically once an external connection is setup, we don't check again what post types that connection supports. So if a new CPT is added or an old one is removed or details about an existing one are changed, we don't ever know that. This could be something we keep as a manual thing, where we add documentation that states you need to go re-save your connection if you add, remove or change content types on the external site. Or take an approach where we periodically check the connection again. That could be done on a regular cron interval, though that seems overkill (but may be fine). The other approach would be what @dinhtungdu recommends, updating these connection details whenever we use that external connection (either push or pull potentially). Downside there is this connection step ends up making multiple remote requests (and thus will impact performance on each push/pull) and as mentioned, CPT information probably won't change very often. So that doesn't answer the question but I'd lean more towards keeping this a manual thing. Maybe we can add a refresh button on the external connections screen that refreshes all the connections at once? Or at least an inline action on that list screen to more easily trigger that update for each connection? |
@dkotter @jeffpaul, I agree with this, IMO documentation is the best way to solve this issue because:
|
@dinhtungdu sounds good, you able to work on a docs PR to cover this? |
@jeffpaul sure, I will do it |
In order for CPTs to be supported, we state in our Known Caveats/Issues section that:
I've been triaging a couple user setups who are leveraging the CPT UI plugin for creating CPTs. In my testing I'm seeing that with proper External Connections created and the same CPT setup on each side of the connection, that you can PULL new CPTs without issue. However, when you try to PUSH a new CPT the Distributor menu only shows
No connections available for distribution.
instead of the existing external connection site as expected.The CPT UI plugin does default to
show_in_menu: true
when it registers its CPTs and I've confirmed those settings via itsPost Types and Taxonomies registered by Custom Post Type UI
page (e.g., http://sampledomain.com/wp-admin/admin.php?page=cptui_listings). I don't think we require anything added to the custom "supports" value, but that's something we might investigate as possibly needed (at least in relation to the CPT UI plugin, see more on that here).I was eventually able to get PUSH working for these external connections, but only after going into each sites'
Edit External Connection
pages and clickingUpdate Connection
. So I'm not sure if there's a race condition happening, if Distributor needs to more regularly check for newly registered CPTs, have something added to the CPT UI custom "supports" value, or something I've yet to imagine.The text was updated successfully, but these errors were encountered: