ajax – Taxonomy page’s table doesn’t update on create & delete

Question

Created a custom taxonomy, and it works. But the table that displays the taxonomies in the wp-admin does not update on adding and deleting a entry without reload but the “quick edit” works without reload.
I get the following when clicking Add taxonomy button;

Admin-ajax.php:

<?xml version='1.0' encoding='UTF-8' standalone="yes"?><wp_ajax><response action='add-tag_0'><taxonomy id='0' position='1'><response_data><![CDATA[]]></response_data><supplemental><parents><![CDATA[<tr id="tag-22" class="level-0"><th scope="row" class="check-column"><label class="screen-reader-text" for="cb-select-22">Select rger</label><input type="checkbox" name="delete_tags[]" value="22" id="cb-select-22" /></th><td class="name column-name has-row-actions column-primary" data-colname="Name"><strong><a class="row-title" href="http://p568196.mittwaldserver.info/aman_job_plugin/wp-admin/term.php?taxonomy=status&#038;tag_ID=22&#038;post_type=post&#038;wp_http_referer=%2Faman_job_plugin%2Fwp-admin%2Fedit-tags.php%3Ftaxonomy%3Dstatus" aria-label="&#8220;rger&#8221; (Edit)">rger</a></strong><br /><div class="hidden" id="inline_22"><div class="name">rger</div><div class="slug">rger</div><div class="parent">0</div></div><div class="row-actions"><span class="edit"><a href="http://p568196.mittwaldserver.info/aman_job_plugin/wp-admin/term.php?taxonomy=status&#038;tag_ID=22&#038;post_type=post&#038;wp_http_referer=%2Faman_job_plugin%2Fwp-admin%2Fedit-tags.php%3Ftaxonomy%3Dstatus" aria-label="Edit &#8220;rger&#8221;">Edit</a> | </span><span class="inline hide-if-no-js"><button type="button" class="button-link editinline" aria-label="Quick edit &#8220;rger&#8221; inline" aria-expanded="false">Quick&nbsp;Edit</button> | </span><span class="delete"><a href="edit-tags.php?action=delete&amp;taxonomy=status&amp;tag_ID=22&amp;_wpnonce=6ff4eecdfd" class="delete-tag aria-button-if-js" aria-label="Delete &#8220;rger&#8221;">Delete</a> | </span><span class="view"><a href="http://p568196.mittwaldserver.info/aman_job_plugin/status/rger/" aria-label="View &#8220;rger&#8221; archive">View</a></span></div><button type="button" class="toggle-row"><span class="screen-reader-text">Show more details</span></button></td><td class="description column-description" data-colname="Description"><span aria-hidden="true">&#8212;</span><span class="screen-reader-text">No description</span></td><td class="slug column-slug" data-colname="Slug">rger</td><td class="posts column-posts" data-colname="Count"><a href="https://wordpress.stackexchange.com/questions/385518/edit.php?status=rger">0</a></td></tr>]]></parents><noparents><![CDATA[<tr id="tag-22" class="level-0"><th scope="row" class="check-column"><label class="screen-reader-text" for="cb-select-22">Select rger</label><input type="checkbox" name="delete_tags[]" value="22" id="cb-select-22" /></th><td class="name column-name has-row-actions column-primary" data-colname="Name"><strong><a class="row-title" href="http://p568196.mittwaldserver.info/aman_job_plugin/wp-admin/term.php?taxonomy=status&#038;tag_ID=22&#038;post_type=post&#038;wp_http_referer=%2Faman_job_plugin%2Fwp-admin%2Fedit-tags.php%3Ftaxonomy%3Dstatus" aria-label="&#8220;rger&#8221; (Edit)">rger</a></strong><br /><div class="hidden" id="inline_22"><div class="name">rger</div><div class="slug">rger</div><div class="parent">0</div></div><div class="row-actions"><span class="edit"><a href="http://p568196.mittwaldserver.info/aman_job_plugin/wp-admin/term.php?taxonomy=status&#038;tag_ID=22&#038;post_type=post&#038;wp_http_referer=%2Faman_job_plugin%2Fwp-admin%2Fedit-tags.php%3Ftaxonomy%3Dstatus" aria-label="Edit &#8220;rger&#8221;">Edit</a> | </span><span class="inline hide-if-no-js"><button type="button" class="button-link editinline" aria-label="Quick edit &#8220;rger&#8221; inline" aria-expanded="false">Quick&nbsp;Edit</button> | </span><span class="delete"><a href="edit-tags.php?action=delete&amp;taxonomy=status&amp;tag_ID=22&amp;_wpnonce=6ff4eecdfd" class="delete-tag aria-button-if-js" aria-label="Delete &#8220;rger&#8221;">Delete</a> | </span><span class="view"><a href="http://p568196.mittwaldserver.info/aman_job_plugin/status/rger/" aria-label="View &#8220;rger&#8221; archive">View</a></span></div><button type="button" class="toggle-row"><span class="screen-reader-text">Show more details</span></button></td><td class="description column-description" data-colname="Description"><span aria-hidden="true">&#8212;</span><span class="screen-reader-text">No description</span></td><td class="slug column-slug" data-colname="Slug">rger</td><td class="posts column-posts" data-colname="Count"><a href="https://wordpress.stackexchange.com/questions/385518/edit.php?status=rger">0</a></td></tr>]]></noparents></supplemental></taxonomy></response><response action='add-tag_0'><term id='0' position='0'><response_data><![CDATA[]]></response_data><supplemental><term_id><![CDATA[22]]></term_id><name><![CDATA[rger]]></name><slug><![CDATA[rger]]></slug><term_group><![CDATA[0]]></term_group><term_taxonomy_id><![CDATA[22]]></term_taxonomy_id><taxonomy><![CDATA[status]]></taxonomy><description><![CDATA[]]></description><parent><![CDATA[0]]></parent><count><![CDATA[0]]></count><filter><![CDATA[display]]></filter></supplemental></term></response></wp_ajax>

(This looks like an html file inside an xml file.)

P.S : Everything is working, but visible only after reload.

0
Akshay kn 3 weeks 2021-03-22T07:32:17-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse