Home Forums Plugins WPBulky – WordPress Bulk Edit Post Types The Meta Fields tab does not work

The Meta Fields tab does not work

  • Author
    Posts
  • #248741

    Hussein Amiri
    Participant

    I’m encountering a persistent JavaScript error when using WPBulky – WordPress Bulk Edit Post Types together with LearnDash custom post types (for example, sfwd-quiz, sfwd-course, etc.).

    Whenever I open the WPBulky editor page for these post types, the browser console shows:

    Uncaught ReferenceError: QTags is not defined at admin.php?page=vi_wpb_bulk_edit_sfwd-quiz:3989

    Because of this error:
    ⸻ • The page stops loading correctly.
    ⸻ • The Meta Fields tab does not work.
    ⸻ • The Save button shows a spinning loader forever and never completes the AJAX request.

    I’ve confirmed that this happens before any manual interaction — the error is thrown as soon as the page loads.

    Technical findings
    ⸻ • The variable QTags is normally provided by quicktags.js in the WordPress Classic Editor.
    ⸻ • However, LearnDash post types (and other custom post types) do not enqueue quicktags.js, so QTags is undefined in those admin pages.
    ⸻ • WPBulky’s inline JavaScript assumes that QTags already exists and calls it immediately, which causes the page to crash.
    Here is the exact context of the error: Uncaught ReferenceError: QTags is not defined at admin.php?page=vi_wpb_bulk_edit_sfwd-quiz:3989

    ✅ What I’ve tried
    ⸻ • Verified that AJAX endpoints (vi_wpb_get_meta_fields and vi_wpb_save_meta_fields) work fine in other post types.
    ⸻ • Manually defined window.QTags in the console — when I do this before the page runs, the error disappears and the plugin works perfectly.
    ⸻ • Attempted to enqueue quicktags.js and inject QTags through PHP hooks like admin_print_scripts, admin_head, and in_admin_footer, but none of these fire early enough because the inline JS executes before they run.

    ⸻ • WordPress: 6.8.3
    ⸻ • WPBulky: Premium 1.1.9
    ⸻ • LearnDash: 4.25.6
    ⸻ • Theme: Divi
    ⸻ • PHP: 8.3.27 (Supports 64bit values)
    ⸻ • Server: Linux 6.8.0-86-generic x86_64 (Apache)

    Thank you so much for your help and great work on this plugin.

    Best regards

You must be logged in to see replies to this topic. Click here to login or register