wp-media / adminimize

Adminimize is a WordPress plugin that lets you hide 'unnecessary' items from the WordPress backend.
https://wordpress.org/plugins/adminimize/
GNU General Public License v2.0
100 stars 31 forks source link

Buffering still doesn't solve the problems. #136

Open sanzeeb3 opened 4 years ago

sanzeeb3 commented 4 years ago

https://github.com/bueltge/adminimize/blob/63750d770c1ec0af7df2de3832cdd2498d8f6ad6/inc-setup/helping_hands.php#L100

The context is 'Active Debug Helper' when enabled is creating issues with exports. For example WPForms JSON export, CSV export, etc.

Here is the example of export code: https://plugins.trac.wordpress.org/browser/wpforms-lite/trunk/includes/admin/class-tools.php#L786

Version Information

Steps to Reproduce

  1. Activate Adminimize plugin and enable 'Active Debug Helper' option.
  2. Activate WPForms.
  3. Export form from WPForms > Tools > Export > Form Export
  4. See the exported JSON file which results in invalid JSON File including: <script>console.info("Adminimize, WordPress Menu:");console.log({"2":["Dashboard","read","index.php","","menu-top menu-top-first menu-icon
bueltge commented 4 years ago

That's right. You should deactivate the debug helper, there is only for debugging and write data inside the console of the browser via JavaScript.

bueltge commented 4 years ago

But maybe we can reduce this debug script only for front-end, like is NOT Admin, Not DOING_AJAX and so on.