"Add to Hyve" row action appears on all non-hierarchical post types (e.g. Otter Form Submissions) but does nothing there
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 79/100
Research direction
Start with Main::register_row_action_filter_shortcut() and add_to_knowledge_base_row_action(); trace how the post_row_actions and page_row_actions hooks affect other post types. Check enqueue_addons_assets() to understand when the row action script loads. Done when unsupported post types no longer show the action and the Posts and Pages actions still work.
Written by the indexing model from the issue text.
Description
Description
With the "Add to Hyve" post row action enabled, the link shows up on list screens it doesn't support, such as Otter's Form Submissions (edit.php?post_type=otter_form_record). Clicking it does nothing: no request is sent and no error is shown.
Environment
- Hyve Lite 2.0.5, Hyve Pro 2.0.4
- Otter Blocks / Otter Pro 3.2.14
Steps to reproduce
- Enable the post row action in Hyve settings (
post_row_addon_enabled). - Submit an Otter form so at least one record exists.
- Go to Otter → Form Submissions (
/wp-admin/edit.php?post_type=otter_form_record). - Hover over a submission and click Add to Hyve.
Expected: The link isn't shown on unsupported post types (or, if those types are meant to be supported, it works).
Actual: The link is shown and does nothing. build/addons/index.js and hyveAddons aren't loaded on this screen, so no handler is attached to .hyve-row-action-btn. On Posts (edit.php) the script loads and the action works.
Root cause
Main::register_row_action_filter_shortcut() builds the hook name as $post_type . '_row_actions':
- For
postthat givespost_row_actions, which WordPress runs for every non-hierarchical post type. - For
pagethat givespage_row_actions, which runs for every hierarchical post type.
But enqueue_addons_assets() only loads the script when hyve_register_row_action_for_{$screen->post_type} is true, and that's only set for post and page. The button ends up on every list table, but the JS only loads for two of them.
Suggested fix
In add_to_knowledge_base_row_action(), return $actions unchanged unless apply_filters( 'hyve_register_row_action_for_' . $post->post_type, false ) is true. That keeps the button and the script loader in sync. It also stops third-party post types like form submissions or orders from being offered for the Knowledge Base, which probably shouldn't happen without an opt-in anyway.
Generated by Claude Code
- Dominant language
- PHP
- Stars
- 1
- Forks
- 2
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 12
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Codeinwp/hyve-lite
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
All issues in Codeinwp/hyve-lite
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Adyen/adyen-magento2#3453 ·
Maintainers usually reply within 8 days
-
component/media domain/discovery
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
simplesamlphp/simplesamlphp#2695 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
bug docker
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day