reduxframework / redux-framework

Redux is a simple, truly extensible options framework for WordPress themes and plugins!
http://redux.io
Other
1.74k stars 583 forks source link

Theme options resets and show default values after avg (1min) of editing in wp customizer #3999

Closed melsaka closed 7 months ago

melsaka commented 7 months ago

Site Health Report

`

wp-core

version: 6.5.2 site_language: en_US user_language: en_US timezone: +00:00 permalink: /%postname%/ https_status: false multisite: false user_registration: 0 blog_public: 1 default_comment_status: open environment_type: local user_count: 1 dotorg_communication: true

wp-paths-sizes

wordpress_path: C:\Users\kerbe\Local Sites\blog\app\public wordpress_size: 54.67 MB (57328749 bytes) uploads_path: C:\Users\kerbe\Local Sites\blog\app\public/wp-content/uploads uploads_size: 170.69 KB (174787 bytes) themes_path: C:\Users\kerbe\Local Sites\blog\app\public/wp-content/themes themes_size: 30.05 MB (31507272 bytes) plugins_path: C:\Users\kerbe\Local Sites\blog\app\public/wp-content/plugins plugins_size: 9.74 MB (10210816 bytes) database_size: 2.84 MB (2981888 bytes) total_size: 97.47 MB (102203512 bytes)

wp-active-theme

name: Shams (shams) version: 1.0.0 author: moelsaka author_website: https://themeforest.net/user/moelsaka parent_theme: none theme_features: widgets-block-editor, title-tag, post-thumbnails, automatic-feed-links, html5, wp-block-styles, align-wide, editor-styles, menus theme_path: C:\Users\kerbe\Local Sites\blog\app\public/wp-content/themes/shams auto_update: Disabled

wp-themes-inactive (1)

Twenty Twenty-Four: version: 1.1, author: the WordPress team, Auto-updates disabled

wp-plugins-active (1)

Redux Framework: version: 4.4.15.2, author: Team Redux, Auto-updates disabled

wp-media

image_editor: WP_Image_Editor_Imagick imagick_module_version: 1808 imagemagick_version: ImageMagick 7.1.0-18 Q16 x64 2021-12-14 https://imagemagick.org imagick_version: 3.7.0 file_uploads: 1 post_max_size: 1000M upload_max_filesize: 300M max_effective_size: 300 MB max_file_uploads: 20 imagick_limits: imagick::RESOURCETYPE_AREA: 14 GB imagick::RESOURCETYPE_DISK: 9.2233720368548E+18 imagick::RESOURCETYPE_FILE: 1536 imagick::RESOURCETYPE_MAP: 14 GB imagick::RESOURCETYPE_MEMORY: 7 GB imagick::RESOURCETYPE_THREAD: 1 imagick::RESOURCETYPE_TIME: 9.2233720368548E+18 imagemagick_file_formats: 3FR, 3G2, 3GP, AAI, AI, APNG, ART, ARW, ASHLAR, AVI, AVIF, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CLIPBOARD, CMYK, CMYKA, CR2, CR3, CRW, CUBE, CUR, CUT, DATA, DCM, DCR, DCRAW, DCX, DDS, DFONT, DJVU, DNG, DOT, DPS, DPX, DXT1, DXT5, EMF, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FARBFELD, FAX, FF, FILE, FITS, FL32, FLIF, FLV, FPX, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GRAYA, GROUP4, GV, HALD, HDR, HEIC, HEIF, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, J2C, J2K, JBG, JBIG, JNG, JNX, JP2, JPC, JPE, JPEG, JPG, JPM, JPS, JPT, JSON, JXL, K25, KDC, KERNEL, LABEL, M2V, M4V, MAC, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORA, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PGX, PHM, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, POCKETMOD, PPM, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGB565, RGBA, RGBO, RGF, RLA, RLE, RMF, RSVG, RW2, SCR, SCREENSHOT, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TM2, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WEBM, WEBP, WMF, WMV, WPG, X3F, XBM, XC, XCF, XPM, XPS, XV, YAML, YCbCr, YCbCrA, YUV gd_version: bundled (2.1.0 compatible) gd_formats: GIF, JPEG, PNG, WebP, BMP, AVIF, XPM ghostscript_version: not available

wp-server

server_architecture: Windows NT 10.0 AMD64 httpd_software: nginx/1.16.0 php_version: 8.1.23 64bit php_sapi: cgi-fcgi max_input_variables: 4000 time_limit: 1200 memory_limit: 256M max_input_time: 600 upload_max_filesize: 300M php_post_max_size: 1000M curl_version: 7.77.0 OpenSSL/1.1.1t suhosin: false imagick_availability: true pretty_permalinks: true htaccess_extra_rules: false current: 2024-04-23T04:45:29+00:00 utc-time: Tuesday, 23-Apr-24 04:45:29 UTC server-time: 2024-04-23T04:45:28+00:00

wp-database

extension: mysqli server_version: 8.0.16 client_version: mysqlnd 8.1.23 max_allowed_packet: 16777216 max_connections: 151

wp-constants

WP_HOME: undefined WP_SITEURL: undefined WP_CONTENT_DIR: C:\Users\kerbe\Local Sites\blog\app\public/wp-content WP_PLUGIN_DIR: C:\Users\kerbe\Local Sites\blog\app\public/wp-content/plugins WP_MEMORY_LIMIT: 256M WP_MAX_MEMORY_LIMIT: 256M WP_DEBUG: false WP_DEBUG_DISPLAY: true WP_DEBUG_LOG: false SCRIPT_DEBUG: false WP_CACHE: false CONCATENATE_SCRIPTS: undefined COMPRESS_SCRIPTS: undefined COMPRESS_CSS: undefined WP_ENVIRONMENT_TYPE: local WP_DEVELOPMENT_MODE: 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.4.15.2 installation: plugin data directory: C:/Users/kerbe/Local Sites/blog/app/public/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/123.0.0.0 Safari/537.36 Browser: Chrome Version: 123.0.0.0 Platform: Windows

redux-instance-shams_opt

opt_name: shams_opt global_variable: shams_opt dev_mode: true ajax_save: true page_slug: shams-settings page_permissions: manage_options menu_type: menu page_parent: themes.php compiler: true output: true output_tag: true templates_path: undefined extensions: Accordion: 4.3.16 Color Scheme: 4.4.10 Custom Fonts: 4.4.2 Customizer: 4.4.11 Datetime: 4.3.15 Google Maps: 4.4.0 Icon Select: 4.4.2 Import Export: 4.0.0 Js Button: 4.3.16 Metaboxes: 4.2.0 Multi Media: 4.4.1 Options Object: 4.0.0 Repeater: 4.3.13 Search: 3.4.5 Shortcodes: 4.3.6 Social Profiles: 4.3.17 Tabbed: 4.4.8 Taxonomy: 4.4.6 Users: 4.4.1 Widget Areas: 4.3.20

`

Steps to reproduce

Changing colors and settings in customizer without publishing for about (1 min) in average.

Expected Behavior

The customizer resets all values to default values but if you publish it will update the theme options to the changed values.

Actual Behavior

I guess that the problem is related to the global variable which in my case $shams_opt because this problem is not happening when i use get_theme_mod('shams_opt') but this work around causes to me other problems that i need to think about.

Any Error Details (PHP/JavaScript)

I also Noticed that php log this error whenever this happens: [23-Apr-2024 03:44:35 UTC] PHP Warning: Attempt to read property "title" on null in C:\Users\kerbe\Local Sites\blog\app\public\wp-includes\class-wp-customize-widgets.php on line 905

https://github.com/reduxframework/redux-framework/assets/16939366/7aab6258-edaf-4008-b29f-1687c2f694d0

kprovance commented 7 months ago

I'm not understanding the problem (I have to mention the actual and expected behavior fields are not properly filled out, making my job a little tougher here). I watched the video of you changing options. And? Does it have to do with the preview? Are you saving the the settings reverting to default?

I tried this with the default Twenty-Twenty-One theme in demo mode and can't reproduce it. But again, I don't understand the problem.

Please disable your theme and all plugins but Redux. Activate the Twenty-Twenty-One theme (later themes don't use the customizer) and then activate the demo mode. Does this problem still exist?

kprovance commented 7 months ago

Also, those PHP errors are WordPress issues based on the PHP file. Is there stack trace data available to see the error's origin?

melsaka commented 7 months ago

The problem is that the customizer preview for some reason after taking your time changing colors and settings without pressing the publish button resets the global variable which in my case $shams_opt to the values before customization only in the iframe embeded preview but all values in the customizer menu itself remains the same. now i tried premium theme from themeforest built by another dev using the same version of redux and i noticed it has the same problem.

melsaka commented 7 months ago

in the video the default color values are all bright ones, this is why i'm changing colors to black and darker values and while i'm doing so the problem occurs the customizer embedded preview soddenly ignored all new black values and printed out the default bright values.

kprovance commented 7 months ago

I didn't ask you to add your own code; I asked you to use the demo mode. Currently, I cannot reproduce the issue. I can't fix what I can't break.

melsaka commented 7 months ago

I didn't ask you to add your own code; I asked you to use the demo mode. Currently, I cannot reproduce the issue. I can't fix what I can't break.

nvm i will build my own framework, feel free to close this issue.