"Add to Hyve" row action appears on all non-hierarchical post types (e.g. Otter Form Submissions) but does nothing there
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 79/100
Línea de trabajo
Empieza con Main::register_row_action_filter_shortcut() y add_to_knowledge_base_row_action(); sigue cómo los hooks post_row_actions y page_row_actions afectan a otros tipos de contenido. Comprueba enqueue_addons_assets() para entender cuándo se carga el script de la acción de fila. Se considera terminado cuando los tipos de contenido no compatibles ya no muestran la acción y las acciones de Entradas y Páginas siguen funcionando.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- PHP
- Estrellas
- 1
- Forks
- 2
- Merge medio
- 3 d 8 h
- PR fusionados (30 d)
- 12
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Codeinwp/hyve-lite
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
Todos los issues de Codeinwp/hyve-lite
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
Adyen/adyen-magento2#3453 ·
Los mantenedores suelen responder en 8 días
-
component/media domain/discovery
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
bug docker
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
enhancement priority: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
magicsunday/webtrees-statistics#664 ·
Los mantenedores suelen responder en 1 día