{"id":211942,"date":"2024-11-24T10:12:57","date_gmt":"2024-11-24T10:12:57","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/js-error-logger\/"},"modified":"2025-12-11T05:34:21","modified_gmt":"2025-12-11T05:34:21","slug":"js-error-logger","status":"publish","type":"plugin","link":"https:\/\/bal.wordpress.org\/plugins\/js-error-logger\/","author":21186206,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.3.1","stable_tag":"1.3.1","tested":"6.9.4","requires":"5.0","requires_php":"7.4","requires_plugins":null,"header_name":"JS Error Logger","header_author":"JFG Media","header_description":"This plugin logs front-end javascript errors, and displays them on the back-end.","assets_banners_color":"","last_updated":"2025-12-11 05:34:21","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/paypal.me\/jfgui","header_plugin_uri":"","header_author_uri":"https:\/\/jfgmedia.com","rating":5,"author_block_rating":0,"active_installs":10,"downloads":1479,"num_ratings":1,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":{"1.0":{"tag":"1.0","author":"jfgmedia","date":"2024-11-24 10:12:40"},"1.1":{"tag":"1.1","author":"jfgmedia","date":"2024-11-25 05:12:41"},"1.1.1":{"tag":"1.1.1","author":"jfgmedia","date":"2024-11-25 05:18:46"},"1.1.10":{"tag":"1.1.10","author":"jfgmedia","date":"2024-12-06 09:47:50"},"1.1.11":{"tag":"1.1.11","author":"jfgmedia","date":"2024-12-07 15:36:24"},"1.1.2":{"tag":"1.1.2","author":"jfgmedia","date":"2024-11-25 06:01:47"},"1.1.3":{"tag":"1.1.3","author":"jfgmedia","date":"2024-11-26 01:24:02"},"1.1.4":{"tag":"1.1.4","author":"jfgmedia","date":"2024-11-26 04:35:42"},"1.1.5":{"tag":"1.1.5","author":"jfgmedia","date":"2024-11-26 16:14:53"},"1.1.6":{"tag":"1.1.6","author":"jfgmedia","date":"2024-12-02 10:26:27"},"1.1.7":{"tag":"1.1.7","author":"jfgmedia","date":"2024-12-03 02:02:17"},"1.1.9":{"tag":"1.1.9","author":"jfgmedia","date":"2024-12-03 04:46:50"},"1.2":{"tag":"1.2","author":"jfgmedia","date":"2025-04-09 02:30:43"},"1.3":{"tag":"1.3","author":"jfgmedia","date":"2025-06-19 15:14:08"},"1.3.1":{"tag":"1.3.1","author":"jfgmedia","date":"2025-12-11 05:34:21"}},"upgrade_notice":{"":"<p>Not available at the moment<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":1},"assets_icons":{"icon-256x256.jpg":{"filename":"icon-256x256.jpg","revision":3195786,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":[],"assets_blueprints":{"blueprint.json":{"filename":"blueprint.json","revision":3416986,"resolution":false,"location":"assets","locale":"","contents":"{\"landingPage\":\"\\\/wp-admin\\\/index.php\",\"preferredVersions\":{\"php\":\"7.4\",\"wp\":\"latest\"},\"phpExtensionBundles\":[\"kitchen-sink\"],\"features\":{\"networking\":true},\"steps\":[{\"step\":\"installPlugin\",\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"js-error-logger\"},\"options\":{\"activate\":true}},{\"step\":\"login\",\"username\":\"admin\",\"password\":\"password\"},{\"step\":\"updateUserMeta\",\"meta\":{\"metaboxhidden_dashboard\":[\"dashboard_right_now\",\"dashboard_site_health\",\"dashboard_quick_press\",\"dashboard_primary\",\"dashboard_activity\"],\"show_welcome_panel\":\"0\"},\"userId\":1},{\"step\":\"writeFile\",\"path\":\"\\\/wordpress\\\/wp-content\\\/uploads\\\/playground.js\",\"data\":\"function jserrlog_error(){test_js_error_logger();} jserrlog_error();\"},{\"step\":\"writeFile\",\"path\":\"\\\/wordpress\\\/wp-content\\\/mu-plugins\\\/zzzzz.php\",\"data\":\"<?php add_action('admin_notices', function() {  echo '<div class=\\\"notice notice-warning\\\"><p>Go to the front-end and refresh the log to see an error appear<\\\/p><\\\/div>'; }); add_action('wp_enqueue_scripts', function (){wp_enqueue_script('test_error','\\\/wp-content\\\/uploads\\\/playground.js');});\"}]}"}},"all_blocks":[],"tagged_versions":["1.0","1.1","1.1.1","1.1.10","1.1.11","1.1.2","1.1.3","1.1.4","1.1.5","1.1.6","1.1.7","1.1.9","1.2","1.3","1.3.1"],"block_files":[],"assets_screenshots":{"screenshot-1.jpg":{"filename":"screenshot-1.jpg","revision":3203498,"resolution":"1","location":"assets","locale":""},"screenshot-2.jpg":{"filename":"screenshot-2.jpg","revision":3203498,"resolution":"2","location":"assets","locale":""},"screenshot-3.jpg":{"filename":"screenshot-3.jpg","revision":3203498,"resolution":"3","location":"assets","locale":""}},"screenshots":{"1":"The JS Error Logger dashboard widget","2":"The full error log from within the plugin settings","3":"Some of the settings"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[2713,94,27555,229,1731],"plugin_category":[59],"plugin_contributors":[223914],"plugin_business_model":[],"class_list":["post-211942","plugin","type-plugin","status-publish","hentry","plugin_tags-dashboard-widget","plugin_tags-debug","plugin_tags-error-reporting","plugin_tags-javascript","plugin_tags-js","plugin_category-utilities-and-tools","plugin_contributors-jfgmedia","plugin_committers-jfgmedia"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/js-error-logger\/assets\/icon-256x256.jpg?rev=3195786","icon_2x":"https:\/\/ps.w.org\/js-error-logger\/assets\/icon-256x256.jpg?rev=3195786","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/js-error-logger\/assets\/screenshot-1.jpg?rev=3203498","caption":"The JS Error Logger dashboard widget"},{"src":"https:\/\/ps.w.org\/js-error-logger\/assets\/screenshot-2.jpg?rev=3203498","caption":"The full error log from within the plugin settings"},{"src":"https:\/\/ps.w.org\/js-error-logger\/assets\/screenshot-3.jpg?rev=3203498","caption":"Some of the settings"}],"raw_content":"<!--section=description-->\n<p>The plugin catches most JS errors, logs them, and displays them in a dashboard widget.<\/p>\n\n<p>Here are some of its features:<\/p>\n\n<ul>\n<li>\nExcept for the plugin settings, there is no database storage involved. Log is written in a \".log\" file.\n<\/li>\n<li>\nDisplay latest JS errors in a dashboard widget.\n<\/li>\n<li>\nRefresh errors from the dashboard widget.\n<\/li>\n<li>\nSee the full error log on a separate page.\n<\/li>\n<li>\nIgnore errors if the user agent contains a specific string.\n<\/li>\n<li>\nIgnore errors if the error contains a specific string.\n<\/li>\n<li>\nIgnore errors if the script url contains a specific string.\n<\/li>\n<li>\nSee which page and which script triggered the errors.\n<\/li>\n<li>\nChoose the maximum amount of errors to log per page load.\n<\/li>\n<li>\nExclude logging errors from specific post types.\n<\/li>\n<li>\nChoose how ajax calls are made.\n<\/li>\n<\/ul>\n\n<h4>Developer hooks and filters<\/h4>\n\n<p>The plugin cleans the log every 24 hours, to only keep the last 100 entries.\nYou may use the \"jserrlog_max_log_entries\" WP filter to enable more or less entries, by returning an integer: <code>add_filter('jserrlog_max_log_entries',function(){return 200;})<\/code><\/p>\n\n<p>Alter error data:\nYou may use the \"jserrlog_pre_insert_error\" WP filter to modify the error data before it's inserted into the log file: <code>add_filter('jserrlog_pre_insert_error',function($error_data){return $error_data;})<\/code><\/p>\n\n<p>Trigger integrations:\nYou may use the \"jserrlog_after_log\" WP hook to trigger an action (Slack notification, etc.) after an error was logged: <code>add_action('jserrlog_after_log',function($error_data){\/\/do something})<\/code><\/p>\n\n<p>Backup old errors:\nYou may use the \"jserrlog_before_log_maintenance\" WP hook to trigger an action (archive errors, etc.) before old errors are deleted: <code>add_action('jserrlog_before_log_maintenance',function($errors){\/\/do something})<\/code><\/p>\n\n<h4>Multisite<\/h4>\n\n<p>The plugin works with multisite. There's one error log per site.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Visit the Plugins page within your dashboard and select \"Add New\"<\/li>\n<li>Search for \"JS Error Logger\"<\/li>\n<li>Click \"Install\"<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>1.3.1<\/h4>\n\n<ul>\n<li>Tested up to Wordpress 6.9<\/li>\n<li>Renamed some template variables to ensure they can't be mistaken for global variables<\/li>\n<li>Changed some native PHP functions such as mk_dir, rm_dir, fopen, etc... to use WP_Filesystem<\/li>\n<\/ul>\n\n<h4>1.3<\/h4>\n\n<ul>\n<li>Dropped support for PHP&lt;7.4<\/li>\n<li>Added links to our other plugins in the settings area<\/li>\n<li>Addition of an admin notice<\/li>\n<li>Addition of 2 developer hooks and 1 filter<\/li>\n<\/ul>\n\n<p><h4>1.2<\/h4><\/p>\n\n<ul>\n<li>Accessibility improvements<\/li>\n<li>Fix: Make sure the mu-plugin is also deleted when deactivating the plugin, and not just when uninstalling it<\/li>\n<li>Added 3 more settings to the UI that were previously only accessible through WP filters<\/li>\n<\/ul>\n\n<h4>1.1.11<\/h4>\n\n<ul>\n<li>Fix: Properly dequeue the early loaded script in the front-end, if js error logging is not enabled<\/li>\n<\/ul>\n\n<h4>1.1.10<\/h4>\n\n<ul>\n<li>Security hardening<\/li>\n<li>Documentation of variables for the translators<\/li>\n<li>Minor Fix: Ensure the mu-plugins directory is writable before creating the early loader, to avoid PHP warnings<\/li>\n<\/ul>\n\n<h4>1.1.9<\/h4>\n\n<ul>\n<li>Fix: Properly dequeue the early loaded script in admin, if back end logging is not enabled<\/li>\n<\/ul>\n\n<h4>1.1.7<\/h4>\n\n<ul>\n<li>Improvement: better update mechanism to make sure the mu-plugin also gets updated<\/li>\n<\/ul>\n\n<h4>1.1.6<\/h4>\n\n<ul>\n<li>New: it is now possible to also log back end js errors<\/li>\n<\/ul>\n\n<h4>1.1.5<\/h4>\n\n<ul>\n<li>Fix: An HTML attribute was escaped with wp_kses instead of esc_attr, which could lead to some display issues if double quotes were in the attribute text<\/li>\n<\/ul>\n\n<h4>1.1.4<\/h4>\n\n<ul>\n<li>Fix: When the dashboard widget was initially empty, then refreshed, and an error was there, the \"View\" button was not clickable<\/li>\n<\/ul>\n\n<h4>1.1.3<\/h4>\n\n<ul>\n<li>Fix: A change in the ID of the dashboard widget was preventing the \"Refresh log\" button from working properly<\/li>\n<\/ul>\n\n<h4>1.1.2<\/h4>\n\n<ul>\n<li>Fix: Removed the \"string\" return type on rewrite_script_src to prevent potential issues<\/li>\n<\/ul>\n\n<h4>1.1.1<\/h4>\n\n<ul>\n<li>Fix: issue with special character encoding<\/li>\n<li>Fix: Missing trailing slash during the creation of the \"js-error-logger-log\" directory<\/li>\n<li>Improvement: Plugin should detect the most popular caching plugins, and remind users to clear their cache after changing some settings<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>Initial Release<\/li>\n<\/ul>","raw_excerpt":"Logs front-end javascript errors, and displays them in a dashboard widget","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/211942","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=211942"}],"author":[{"embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/jfgmedia"}],"wp:attachment":[{"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=211942"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=211942"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=211942"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=211942"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=211942"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/bal.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=211942"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}