redux-framework icon indicating copy to clipboard operation
redux-framework copied to clipboard

error in wordpress homepage when there is no "googlefonts.json" file got found in the "uploads/redux/google-fonts" directory

Open pareshsojitra opened this issue 12 years ago • 25 comments

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 ?

pareshsojitra avatar Sep 03 '14 20:09 pareshsojitra

On line...what? Where is the version information?

kprovance avatar Sep 03 '14 20:09 kprovance

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

  1. 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

  2. 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

pareshsojitra avatar Sep 03 '14 21:09 pareshsojitra

i'm using "Redux Framework v3.3.6.8"

pareshsojitra avatar Sep 03 '14 21:09 pareshsojitra

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.

kprovance avatar Sep 03 '14 21:09 kprovance

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 :(

badr0333 avatar Sep 04 '14 09:09 badr0333

i also found this error in themeforest approved wordpress theme "multinews".

pareshsojitra avatar Sep 04 '14 09:09 pareshsojitra

I guess they approved it because it comes up once or it can be a server issue.I am running it on localhost Xammp.

badr0333 avatar Sep 04 '14 09:09 badr0333

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.

pareshsojitra avatar Sep 04 '14 09:09 pareshsojitra

Please let me know if you figure it out :)

badr0333 avatar Sep 04 '14 09:09 badr0333

sure, we are working on it.

pareshsojitra avatar Sep 04 '14 09:09 pareshsojitra

My local system is Windows, in XAMPP. No problems there.

kprovance avatar Sep 04 '14 12:09 kprovance

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

pareshsojitra avatar Sep 04 '14 12:09 pareshsojitra

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.

badr0333 avatar Sep 04 '14 12:09 badr0333

Nope. Sorry. :(

Send me your theme: [email protected] Please use www.wetransfer.com

kprovance avatar Sep 04 '14 12:09 kprovance

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.

badr0333 avatar Sep 04 '14 12:09 badr0333

All the files are sent please check your email.

badr0333 avatar Sep 04 '14 12:09 badr0333

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

pareshsojitra avatar Sep 04 '14 12:09 pareshsojitra

Yes you are right.I does give warning.

badr0333 avatar Sep 04 '14 12:09 badr0333

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

php-xpert avatar Sep 04 '14 13:09 php-xpert

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 .

ghost avatar Sep 04 '14 14:09 ghost