Archived topic
Fixing Customizer js
4 replies · Started by SERGIO ARBEO on February 18, 2018
Hello
I purchased GeneratePress today but the Customizer was not working. The cause is in class_typography_control.php, both in the theme (inc/customizer/controls/class-typography-control.php:72) and the premium plugins (library/customizer/controls/class-typography-control.php:64). The problem is that data.default_fonts seems an array, though it is being traversed as an objet, not sure why. In any case, the minimum modification that keeps the array being traversed as an object and fixes the customizer is adding the following line after the for in both files: <# if (!data.default_fonts.hasOwnProperty(key)) { continue; } #>
Hi there,
That's strange, we haven't had any other reports of this, and haven't experienced it ourselves.
Is there a specific error in the console you can share?
Yes. The error says that data.default_fonts[ key ].split is not a function. This is caused by data.default_fonts being an array of fonts, and is produced when the key is each (I think it is coming from prototype, but cannot be sure).
This is strange, I wonder why no one else has run into this.
Is there any chance you can shoot me an email with temp admin login details so I can take a closer look?: https://generatepress.com/contact/
Done