reduxframework / redux-framework

Redux is a simple, truly extensible options framework for WordPress themes and plugins!

Home Page:http://redux.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fatal error: Uncaught TypeError: Argument 3 passed to Redux_Functions::parse_css() must be of the type string

ismaelyws opened this issue · comments

I have been using Redux for Integral theme for several years now, I now get a blank white page with this error below when I try to visit any page. I'm not sure if this is plugin related or something I need to update in my theme?

Fatal error: Uncaught TypeError: Argument 3 passed to Redux_Functions::parse_css() must be of the type string, array given, called in /home/wpthemespot/public_html/test/wp-content/plugins/redux-framework/redux-core/inc/fields/color/class-redux-color.php on line 138 and defined in /home/wpthemespot/public_html/test/wp-content/plugins/redux-framework/redux-core/inc/classes/class-redux-functions.php:225 Stack trace: #0 /home/wpthemespot/public_html/test/wp-content/plugins/redux-framework/redux-core/inc/fields/color/class-redux-color.php(138): Redux_Functions::parse_css(Array, 'color:Array;', Array) #1 /home/wpthemespot/public_html/test/wp-content/plugins/redux-framework/redux-core/inc/classes/class-redux-output.php(157): Redux_Color->output('color:Array;') #2 /home/wpthemespot/public_html/test/wp-includes/class-wp-hook.php(307): Redux_Output->enqueue('') #3 /home/wpthemespot/public_html/test/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array) #4 /home/wpthemespot/public_html/test/wp-includes/plugin.php(47 in /home/wpthemespot/public_html/test/wp-content/plugins/redux-framework/redux-core/inc/classes/class-redux-functions.php on line 225

Site Health Report

wp-core

version: 5.9.3
site_language: en_US
user_language: en_US
timezone: +00:00
permalink: undefined
https_status: false
multisite: false
user_registration: 0
blog_public: 1
default_comment_status: open
environment_type: production
user_count: 1
dotorg_communication: true

wp-paths-sizes

wordpress_path: /home/wpthemespot/public_html/test
wordpress_size: 46.81 MB (49088684 bytes)
uploads_path: /home/wpthemespot/public_html/test/wp-content/uploads
uploads_size: 20.10 MB (21071857 bytes)
themes_path: /home/wpthemespot/public_html/test/wp-content/themes
themes_size: 17.90 MB (18764350 bytes)
plugins_path: /home/wpthemespot/public_html/test/wp-content/plugins
plugins_size: 24.49 MB (25678002 bytes)
database_size: 1.24 MB (1298957 bytes)
total_size: 110.53 MB (115901850 bytes)

wp-active-theme

name: Integral (integral)
version: 1.5.8
author: Themely
parent_theme: none
theme_features: core-block-patterns, widgets-block-editor, post-thumbnails, automatic-feed-links, title-tag, menus, woocommerce, widgets
theme_path: /home/wpthemespot/public_html/test/wp-content/themes/integral
auto_update: Disabled

wp-themes-inactive (3)

Twenty Twenty: version: 1.9, author: the WordPress team, Auto-updates disabled
Twenty Twenty-One: version: 1.5, author: the WordPress team, Auto-updates disabled
Twenty Twenty-Two: version: 1.1, author: the WordPress team, Auto-updates disabled

wp-plugins-active (4)

Classic Editor: version: 1.6.2, author: WordPress Contributors, Auto-updates disabled
Contact Form 7: version: 5.5.6, author: Takayuki Miyoshi, Auto-updates disabled
Template Library and Redux Framework: version: 4.3.12, author: Extendify, Auto-updates disabled

wp-plugins-inactive (3)

Akismet Anti-Spam: version: 4.2.2, author: Automattic, Auto-updates disabled
Hello Dolly: version: 1.7.2, author: Matt Mullenweg, Auto-updates disabled

wp-media

image_editor: WP_Image_Editor_GD
imagick_module_version: Not available
imagemagick_version: Not available
imagick_version: Not available
file_uploads: File uploads is turned off
post_max_size: 24M
upload_max_filesize: 18M
max_effective_size: 18 MB
max_file_uploads: 20
gd_version: bundled (2.1.0 compatible)
gd_formats: GIF, JPEG, PNG, WebP, BMP, XPM
ghostscript_version: unknown

wp-server

server_architecture: Linux 5.16.13-x86_64-linode153 x86_64
httpd_software: Apache
php_version: 7.3.33 64bit
php_sapi: fpm-fcgi
max_input_variables: 1000
time_limit: 30
memory_limit: 256M
max_input_time: 60
upload_max_filesize: 18M
php_post_max_size: 24M
curl_version: 7.81.0 OpenSSL/1.1.1n
suhosin: false
imagick_availability: false
pretty_permalinks: true

wp-database

extension: mysqli
server_version: 5.7.37
client_version: mysqlnd 5.0.12-dev - 20150407 - $Id: 7cc7cc96e675f6d72e5cf0f267f48e167c2abb23 $
max_allowed_packet: 268435456
max_connections: 151

wp-constants

WP_HOME: undefined
WP_SITEURL: undefined
WP_CONTENT_DIR: /home/wpthemespot/public_html/test/wp-content
WP_PLUGIN_DIR: /home/wpthemespot/public_html/test/wp-content/plugins
WP_MEMORY_LIMIT: 40M
WP_MAX_MEMORY_LIMIT: 256M
WP_DEBUG: true
WP_DEBUG_DISPLAY: true
WP_DEBUG_LOG: true
SCRIPT_DEBUG: false
WP_CACHE: false
CONCATENATE_SCRIPTS: undefined
COMPRESS_SCRIPTS: undefined
COMPRESS_CSS: undefined
WP_ENVIRONMENT_TYPE: Undefined
DB_CHARSET: utf8
DB_COLLATE: undefined

wp-filesystem

wordpress: writable
wp-content: writable
uploads: writable
plugins: writable
themes: writable
0: Writable

redux-framework

version: 4.3.12
installation: plugin
data directory: /home/wpthemespot/public_html/test/wp-content/plugins/redux-framework/redux-core/
browser:
Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36
Browser: Chrome
Version: 100.0.4896.127
Platform: Windows

redux-instance-integral

opt_name: integral
global_variable: integral
dev_mode: false
ajax_save: true
page_slug: Integral
page_permissions: manage_options
menu_type: menu
page_parent: themes.php
compiler: true
output: true
output_tag: true
templates_path: undefined
extensions:
Customizer: 4.0.0
Import Export: 4.0.0
Metaboxes: 4.0.0
Options Object: 4.0.0
Repeater: 4.3.7
Search: 3.4.5
Shortcodes: 4.3.5

Steps to reproduce

Install Integral theme from the WP.org themes directory, install Redux Framework plugin then visit the home page.

Expected Behavior

See the default index page for Integral.

Actual Behavior

Blank white screen with error message.

Any Error Details (PHP/JavaScript)

Notice: Array to string conversion in /home/wpthemespot/public_html/test/wp-content/plugins/redux-framework/redux-core/inc/fields/color/class-redux-color.php on line 135
Fatal error: Uncaught TypeError: Argument 3 passed to Redux_Functions::parse_css() must be of the type string, array given, called in /home/wpthemespot/public_html/test/wp-content/plugins/redux-framework/redux-core/inc/fields/color/class-redux-color.php on line 138 and defined in /home/wpthemespot/public_html/test/wp-content/plugins/redux-framework/redux-core/inc/classes/class-redux-functions.php:225 Stack trace: #0 /home/wpthemespot/public_html/test/wp-content/plugins/redux-framework/redux-core/inc/fields/color/class-redux-color.php(138): Redux_Functions::parse_css(Array, 'color:Array;', Array) #1 /home/wpthemespot/public_html/test/wp-content/plugins/redux-framework/redux-core/inc/classes/class-redux-output.php(157): Redux_Color->output('color:Array;') #2 /home/wpthemespot/public_html/test/wp-includes/class-wp-hook.php(307): Redux_Output->enqueue('') #3 /home/wpthemespot/public_html/test/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array) #4 /home/wpthemespot/public_html/test/wp-includes/plugin.php(47 in /home/wpthemespot/public_html/test/wp-content/plugins/redux-framework/redux-core/inc/classes/class-redux-functions.php on line 225

The problem is the theme developer is using Redux improperly with one of their settings.

In their options.php file, beginning at line 811:

'default' => array(
    'color' => '#f64744',
)

The default value for the color field does not support an array. It must be a string. Since I am unable to fix someone else's theme, you'll have to report this to the theme author and they'll have to make the fix in their code.

Good luck.