We also encountered the same problem
Has anyone found a way
/wp-admin/admin.php?page=dokan-dashboard#/
And all the sub-menus are not opening
Hi,
This issue occurs when the Dokan admin menu slug is localized. In non-English admin panels, get_current_screen()->id may contain localized or URL-encoded characters, which causes Dokan’s dashboard scripts not to load. As a result, the Dokan admin dashboard and its sub-menus remain stuck on the loading state.
The problem comes from this condition in Dokan, where the screen ID is checked strictly and fails when the menu slug is translated:
$screen = get_current_screen(); if ( $screen->id !== 'toplevel_page_dokan' && $screen->id !== 'dokan_page_dokan-dashboard' ) { return; }
A temporary workaround, without modifying Dokan core files and without breaking translations, is to normalize the current screen before Dokan enqueues its scripts. You can add the following code to your theme’s functions.php file or a small custom plugin:
add_action('admin_enqueue_scripts', function () { if ( ! is_admin() ) return; if ( empty($_GET['page']) || $_GET['page'] !== 'dokan-dashboard' ) return; if ( function_exists('set_current_screen') ) { set_current_screen('dokan_page_dokan-dashboard'); } }, 0);
This forces the expected screen ID only on the Dokan dashboard page, allowing Dokan’s JavaScript files to load correctly. This workaround works for all admin languages and keeps translations intact.
fantastic
thank you so much!!
i add your code to my function.php and fix my problem!!
thats great!
This bug still exists despite the plugin update!!!