error in wordpress homepage when there is no "googlefonts.json" file got found in the "uploads/redux/google-fonts" directory
i found this error when i first time load the homepage of wp theme like following :
Warning: array_change_key_case() expects parameter 1 to be array, null given in C:\wamp\www\redux\wp-content\plugins\redux-framework\ReduxCore\inc\fields\typography\field_typography.php on line
- actually this comes when there is no "googlefonts.json" file got found in the "uploads/redux/google-fonts" directory
- but it comes only first time, when there is no google font file
- when we second time load the wp site, it got found the "googlefonts.json", so there is no error !!
- so we have to refresh the screen when we loading the site for first time, so is it the solution ?
- so can we set the "googlefonts.json" to theme directory ?
On line...what? Where is the version information?
actually there is 3 errors :
1 ) Warning: array_change_key_case() expects parameter 1 to be array, null given in C:\wamp\www\redux\wp-content\plugins\redux-framework\ReduxCore\inc\fields\typography\field_typography.php on line 785
-
Warning: Invalid argument supplied for foreach() in C:\wamp\www\redux\wp-content\plugins\redux-framework\ReduxCore\inc\fields\typography\field_typography.php on line 786
-
Warning: file_get_contents(): Filename cannot be empty in C:\wamp\www\redux\wp-content\plugins\redux-framework\ReduxCore\inc\class.redux_filesystem.php on line 126
i'm using "Redux Framework v3.3.6.8"
I cannot reproduce. Based on what's been provided, it appears as if Wordpresses filesystem API is failing across the board. That googlefonts.json file should be copied into thr redux upload subfolder before anything else. But since $wp_filesystem failed, and PHP copy didn't do it's job, it looks like the problem is there? I'm guessing, because again, I can't reproduce it.
same is happening with me.This type of warning comes up once after you reload the webpage, warnings go away.I am using the same version as posted in above comment.Please try to fix this.My theme has 100% chances of not getting approve on marketplace :(
i also found this error in themeforest approved wordpress theme "multinews".
I guess they approved it because it comes up once or it can be a server issue.I am running it on localhost Xammp.
i'm also working with localhost, it can not be a server issue, because in "windows pc" we can not get directory permission issue.
- becasue there is no system like filesystem permission for server in windows pc.
Please let me know if you figure it out :)
sure, we are working on it.
My local system is Windows, in XAMPP. No problems there.
my local system is windows, I'm using wamp, problem is there & also i found this error in online server, but only for first time
I have also noticed that these warning shows up only once after you install a fresh copy of wordpress and activating your theme.@kpovance try that it will surely give you these warnings.
Ok i will send you my theme shortly but when first activated it will give you warnings like these.
Warning: array_change_key_case() expects parameter 1 to be array, null given in E:\xampp\htdocs\wordpress3\wp-content\themes\spectacularpixels\sp_framework\inc\fields\typography\field_typography.php on line 785
Warning: Invalid argument supplied for foreach() in E:\xampp\htdocs\wordpress3\wp-content\themes\spectacularpixels\sp_framework\inc\fields\typography\field_typography.php on line 786
Warning: file_get_contents(): Filename cannot be empty in E:\xampp\htdocs\wordpress3\wp-content\themes\spectacularpixels\sp_framework\inc\class.redux_filesystem.php on line 126
After reloading the page they will disappear and will come only after you install a new copy of wordpress itself.
All the files are sent please check your email.
if you want to get this error again, goto "wp-content/uploads/redux" & remove "google-fonts" folder so again it give an error for first time
Yes you are right.I does give warning.
Getting same warning.
You can reproduce same via following steps...
- set DEBUG mode = true in wp-config.php
- activate theme
- activate plugin
- delete uploads/redux/google-fonts directory if present.
- Load front end
- Above warning appear first time and same time google-fonts directory created in uploads/redux/
please do needful as it throw bad impression about theme when user see such warning..
Thanks
Dovy and Kevin, this is the same message I got when I installed fresh a few weeks ago. Kevin I built a demo site for you and Dovy to see. The issue happens there as well. Dovy has the cpanel and all login details.
Regards
Ciaran Whelan 0458 811 910
Sent from my mobile
On 04/09/2014 11:26 PM, "WP Developer" [email protected] wrote:
Getting same warning.
You can reproduce same via following steps...
- set DEBUG mode = true in wp-config.php
- activate theme
- activate plugin
- delete uploads/redux/google-fonts directory if present.
- Load front end
- Above warning appear first time and same time google-fonts directory created in uploads/redux/
please do needful as it throw bad impression about theme when user see such warning..
Thanks
— Reply to this email directly or view it on GitHub https://github.com/ReduxFramework/redux-framework/issues/1622#issuecomment-54480303 .