Closed iamdeadman closed 1 year ago
I added an init_empty
argument to the repeater field to achieve what you want to do. The caveat is there will be no accordions to display on the first run. It'll be up to your users to click the "Add" button to add the first item. I also fixed a save issue using the repeater in the metaboxes. Deleting them all and save would not update the database. That, too, should be resolved.
You'll have to download the 4.4.1.5 beta from this repo to get those updates.
Also, I must strongly advise NOT embedding Redux in your theme unless you plan to update that code often. That ability was kept for backward compatibility with v3. On average, we do an update every month, sometimes two. If you plan to sell on ThemeForest, they will reject your theme outright for embedding Redux.
Good luck.
Site Health Report
`
wp-core
version: 6.0.2 site_language: en_US user_language: en_US timezone: America/Los_Angeles permalink: /%postname%/ https_status: true multisite: false user_registration: 0 blog_public: 1 default_comment_status: open environment_type: production user_count: 8 dotorg_communication: true
wp-paths-sizes
wordpress_path: /var/www/html wordpress_size: loading... uploads_path: /var/www/html/wp-content/uploads uploads_size: loading... themes_path: /var/www/html/wp-content/themes themes_size: loading... plugins_path: /var/www/html/wp-content/plugins plugins_size: loading... database_size: loading... total_size: loading...
wp-dropins (1)
maintenance.php: true
wp-active-theme
name: KPS3 Oxygenics (kps3-oxygenics) version: undefined author: KPS3 author_website: http://www.kps3.com parent_theme: none theme_features: core-block-patterns, menus, post-thumbnails, widgets-block-editor theme_path: /var/www/html/wp-content/themes/kps3-oxygenics auto_update: Disabled
wp-themes-inactive (2)
Twenty Twenty-One: version: 1.6, author: the WordPress team (latest version: 1.8), Auto-updates disabled Twenty Twenty-Two: version: 1.2, author: the WordPress team (latest version: 1.4), Auto-updates disabled
wp-mu-plugins (1)
ManageWP - Worker Loader: author: ManageWP, version: (undefined)
wp-plugins-active (20)
All in One SEO: version: 4.3.7, author: All in One SEO Team (latest version: 4.3.9), Auto-updates disabled Classic Editor: version: 1.6.2, author: WordPress Contributors (latest version: 1.6.3), Auto-updates disabled Enhanced Media Library PRO: version: 2.8.9, author: wpUXsolutions, Auto-updates disabled Google Analytics for WordPress by MonsterInsights: version: 8.12.1, author: MonsterInsights (latest version: 8.15), Auto-updates enabled Gravity Forms: version: 2.6.9, author: Gravity Forms (latest version: 2.7.8), Auto-updates disabled Gravity Forms Offload File Uploads - KPS3: version: 1.0.0, author: Vital (Customized by KPS3), Auto-updates disabled Lightweight Grid Columns: version: 1.0, author: Tom Usborne, Auto-updates disabled LiveChat: version: 4.5.9, author: LiveChat (latest version: 4.5.12), Auto-updates enabled ManageWP - Worker: version: 4.9.17, author: GoDaddy, Auto-updates disabled MC4WP: Mailchimp for WordPress: version: 4.9.0, author: ibericode (latest version: 4.9.5), Auto-updates disabled OptinMonster: version: 2.13.2, author: OptinMonster Popup Builder Team (latest version: 2.13.4), Auto-updates disabled Post Duplicator: version: 2.28, author: Metaphor Creations (latest version: 2.31), Auto-updates disabled Post SMTP: version: 2.3.2, author: Post SMTP (latest version: 2.5.6), Auto-updates disabled Redirection: version: 5.3.6, author: John Godley (latest version: 5.3.10), Auto-updates disabled Regenerate Thumbnails: version: 3.1.5, author: Alex Mills (Viper007Bond), Auto-updates disabled Search Exclude: version: 1.3.0, author: Roman Pronskiy (latest version: 2.0.1), Auto-updates disabled Simple Custom Post Order: version: 2.5.6, author: Colorlib, Auto-updates disabled WordPress Post Tabs: version: 1.6.3, author: Internet Techies, Tejaswini Deshpande, Auto-updates disabled WPForms Lite: version: 1.8.1.2, author: WPForms (latest version: 1.8.2.1), Auto-updates disabled Yoast SEO: version: 19.14, author: Team Yoast, Auto-updates disabled
wp-media
image_editor: false imagick_module_version: Not available imagemagick_version: Not available imagick_version: Not available file_uploads: File uploads is turned off post_max_size: 8M upload_max_filesize: 2M max_effective_size: 2 MB max_file_uploads: 20 gd_version: not available ghostscript_version: not available
wp-server
server_architecture: Linux 6.1.27-43.48.amzn2023.x86_64 x86_64 httpd_software: Apache/2.4.56 (Amazon Linux) OpenSSL/3.0.8 php_version: 8.1.16 64bit php_sapi: fpm-fcgi max_input_variables: 1000 time_limit: 0 memory_limit: 128M admin_memory_limit: 256M max_input_time: 60 upload_max_filesize: 2M php_post_max_size: 8M curl_version: 7.88.1 OpenSSL/3.0.8 suhosin: false imagick_availability: false pretty_permalinks: true htaccess_extra_rules: false
wp-database
extension: mysqli server_version: 8.0.33 client_version: mysqlnd 8.1.16 max_allowed_packet: 67108864 max_connections: 151
wp-constants
WP_HOME: https://ec2-54-242-26-95.compute-1.amazonaws.com WP_SITEURL: https://ec2-54-242-26-95.compute-1.amazonaws.com WP_CONTENT_DIR: /var/www/html/wp-content WP_PLUGIN_DIR: /var/www/html/wp-content/plugins WP_MEMORY_LIMIT: 40M WP_MAX_MEMORY_LIMIT: 256M WP_DEBUG: true WP_DEBUG_DISPLAY: false WP_DEBUG_LOG: /var/log/httpd/debug.log 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: not writable wp-content: not writable uploads: writable plugins: not writable themes: not writable mu-plugins: not writable 0: Writable
aioseo (1)
noindexed: Search Page
redux-framework
version: 4.4.1 installation: in_theme data directory: /var/www/html/wp-content/themes/kps3-oxygenics/kps3-theme-base/vendor/redux-framework/redux-core/ browser: Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 Browser: Chrome Version: 113.0.0.0 Platform: Apple
redux-instance-kps3oxygenics
opt_name: kps3oxygenics global_variable: kps3oxygenics dev_mode: false ajax_save: true page_slug: kps3oxygenics_options page_permissions: manage_options menu_type: menu page_parent: themes.php compiler: true output: true output_tag: true templates_path: undefined extensions: Accordion: 1.0.0 Custom Fonts: 1.0.0 Customizer: 1.0.0 Datetime: 1.0.0 Google Maps: 1.0.0 Import Export: 1.0.0 Js Button: 1.0.0 Metaboxes: 1.0.0 Multi Media: 1.0.0 Options Object: 1.0.0 Repeater: 1.0.0 Search: 1.0.0 Shortcodes: 1.0.0 Social Profiles: 1.0.0 Users: 1.0.0 Widget Areas: 1.0.0
wpforms
version: 1.8.1.2 lite: May 12, 2023 @ 3:18pm upload_dir: Writable total_forms: undefined total_submissions: undefined
`
Steps to reproduce
Expected Behavior
Remove all items in the repeater section and delete the associated meta data from the DB
Actual Behavior
It retains the first item in the repeater block even if you delete all of them
Any Error Details (PHP/JavaScript)
I am not sure what logs would help you all here but I can provide you with any should you need to understand the issue. I observe it happening all over the site, I am using 4.3.24 version of the redux framework and also enabled the dev mode on the site to figure out what may be the issue. To better help understand it, I have created a short demo of the problem which you can access here - https://www.kapwing.com/videos/6486016dbaa446001d166ed5
If you feel that this is not a BUG but maybe an issue from my side, I've also created a SO post for the same issue so that we can continue the discussion over there instead of here.