alleyinteractive / alleyinteractive/wordpress-fieldmanager

Autocomplete Field - AJAX Bad Request 400

未关闭
#776 1 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
PHP
星标
563
派生
99
PR 合并指标
30 天内没有已合并 PR

描述

Hi there. Sorry in advance if I'm missing some key understanding when using this plugin but I'm really not sure why this might not be working!

I'm using the following example froom the documentation on AutoComplete field:
```
$fm = new \Fieldmanager_Autocomplete( array(
'name' => 'Featured Posts',
'datasource' => new \Fieldmanager_Datasource_Post( array(
'query_args' => array(
'post_type' => 'post',
'posts_per_page' => 10,
),
) ),
) );
$fm->add_meta_box( __( 'Featured Posts', 'crowley-v2' ), array( 'page' ) );
```
When I test the field, the AJAX request fails and says "Bad Request". Looking deeper into where exactly in `admin-ajax.php` it's failing - It's failing because there's no actions register to `wp_ajax_fm_post....`

Am I supposed to write my own action for this? I don't quite understand.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。