Invalid argument supplied for foreach()
-
I receive this invalid argument in WP backend for
…plugins/types/embedded/toolset/toolset-common/toolset-forms/classes/class.radios.php
on line 35This is the code:
foreach ($data['options'] as $option) { $one_option_data = array( '#value' => $option['value'], '#title' => $option['title'], '#validate' => $this->getValidationData() );
What do I have to change?
-
What version of Types you are using?
This should not happen
Please re-donwload the Plugin from the Repository and manually replace the one you have in your FTP.
If the issue persist, check first if the issue also persist with a WordPress Default Theme and NO Plugins BUT the Toolset Plugins.
Hi Beda,
downloaded the last version of types (which I used before).
Still not working.The Error Code:
Warning: Invalid argument supplied for foreach() in /homepages/4/d12279741/htdocs/berufsfindung.de/wp-content/plugins/types/library/toolset/toolset-common/toolset-forms/classes/class.radios.php on line 35Pls tell me how to fix this.
I am not able to save new content in backend when types fields are used.
Have to deactivate types first, then edit content, then save, then activate types again.Regards
This thread is eleven-month-old and several updates have been released since then.
All Fields of Types work fine in my test installs.
Can you exactly elaborate how I can replicate this problem?
Here is the Toolset Debug Info:
{“core”:{“WordPress”:{“Multisite”:”No”,”SiteURL”:”https:\/\/berufsfindung.de”,”HomeURL”:”https:\/\/berufsfindung.de”,”Version”:”4.7.2″,”PermalinkStructure”:”\/%postname%\/”,”PostTypes”:”post, page, attachment, revision, nav_menu_item, custom_css, customize_changeset, wp-types-group, wp-types-user-group, wp-types-term-group, acf, wpcf7_contact_form, presse”,”PostSatus”:”publish, future, draft, pending, private, trash, auto-draft, inherit”},”Server”:{“jQueryVersion”:”1.12.4″,”PHPVersion”:”7.0.15″,”MySQLVersion”:”5.5.53″,”ServerSoftware”:”Apache”},”PHP”:{“MemoryLimit”:”256M”,”UploadMax”:”64M”,”PostMax”:”64M”,”TimeLimit”:”50000″,”MaxInputVars”:”5000″}},”plugins”:{“active_plugins”:{“acf-options-page\/acf-options-page.php”:{“Name”:”Advanced Custom Fields: Options Page”,”PluginURI”:”http:\/\/www.advancedcustomfields.com\/”,”Version”:”1.2.0″,”Author”:”Elliot Condon”,”AuthorURI”:”http:\/\/www.elliotcondon.com\/”,”TextDomain”:”acf-options-page”,”DomainPath”:””,”Network”:false,”Title”:”Advanced Custom Fields: Options Page”,”AuthorName”:”Elliot Condon”},”acf-repeater\/acf-repeater.php”:{“Name”:”Advanced Custom Fields: Repeater Field”,”PluginURI”:”http:\/\/www.advancedcustomfields.com\/”,”Version”:”1.1.1″,”Author”:”Elliot Condon”,”AuthorURI”:”http:\/\/www.elliotcondon.com\/”,”TextDomain”:”acf-repeater”,”DomainPath”:””,”Network”:false,”Title”:”Advanced Custom Fields: Repeater Field”,”AuthorName”:”Elliot Condon”},”advanced-custom-fields-nav-menu-field\/fz-acf-nav-menu.php”:{“Name”:”Advanced Custom Fields: Nav Menu Field”,”PluginURI”:”http:\/\/faisonz.com\/wordpress-plugins\/advanced-custom-fields-nav-menu-field\/”,”Version”:”2.0.0″,”Author”:”Faison Zutavern”,”AuthorURI”:”http:\/\/faisonz.com”,”TextDomain”:”advanced-custom-fields-nav-menu-field”,”DomainPath”:””,”Network”:false,”Title”:”Advanced Custom Fields: Nav Menu Field”,”AuthorName”:”Faison Zutavern”},”advanced-custom-fields\/acf.php”:{“Name”:”Advanced Custom Fields”,”PluginURI”:”http:\/\/www.advancedcustomfields.com\/”,”Version”:”4.4.11″,”Author”:”Elliot Condon”,”AuthorURI”:”http:\/\/www.elliotcondon.com\/”,”TextDomain”:”advanced-custom-fields”,”DomainPath”:””,”Network”:false,”Title”:”Advanced Custom Fields”,”AuthorName”:”Elliot Condon”},”antispam-bee\/antispam_bee.php”:{“Name”:”Antispam Bee”,”PluginURI”:”https:\/\/www.ads-software.com\/plugins\/antispam-bee\/”,”Version”:”2.6.9″,”Author”:”pluginkollektiv”,”AuthorURI”:”http:\/\/pluginkollektiv.org”,”TextDomain”:”antispam-bee”,”DomainPath”:”\/lang”,”Network”:false,”Title”:”Antispam Bee”,”AuthorName”:”pluginkollektiv”},”contact-form-7-success-page-redirects\/cf7-success-page-redirects.php”:{“Name”:”Contact Form 7 – Success Page Redirects”,”PluginURI”:””,”Version”:”1.2.0″,”Author”:”Ryan Nevius”,”AuthorURI”:”http:\/\/www.ryannevius.com”,”TextDomain”:”contact-form-7-success-page-redirects”,”DomainPath”:””,”Network”:false,”Title”:”Contact Form 7 – Success Page Redirects”,”AuthorName”:”Ryan Nevius”},”contact-form-7-to-database-extension\/contact-form-7-db.php”:{“Name”:”Contact Form DB”,”PluginURI”:”http:\/\/www.ads-software.com\/extend\/plugins\/contact-form-7-to-database-extension\/”,”Version”:”2.10.28″,”Author”:”Michael Simpson”,”AuthorURI”:””,”TextDomain”:”contact-form-7-to-database-extension”,”DomainPath”:””,”Network”:false,”Title”:”Contact Form DB”,”AuthorName”:”Michael Simpson”},”contact-form-7\/wp-contact-form-7.php”:{“Name”:”Contact Form 7″,”PluginURI”:”http:\/\/contactform7.com\/”,”Version”:”4.6.1″,”Author”:”Takayuki Miyoshi”,”AuthorURI”:”http:\/\/ideasilo.wordpress.com\/”,”TextDomain”:”contact-form-7″,”DomainPath”:”\/languages\/”,”Network”:false,”Title”:”Contact Form 7″,”AuthorName”:”Takayuki Miyoshi”},”duplicate-post\/duplicate-post.php”:{“Name”:”Duplicate Post”,”PluginURI”:”http:\/\/lopo.it\/duplicate-post-plugin\/”,”Version”:”3.1.2″,”Author”:”Enrico Battocchi”,”AuthorURI”:”http:\/\/lopo.it”,”TextDomain”:”duplicate-post”,”DomainPath”:””,”Network”:false,”Title”:”Duplicate Post”,”AuthorName”:”Enrico Battocchi”},”eps-301-redirects\/eps-301-redirects.php”:{“Name”:”Eggplant 301 Redirects”,”PluginURI”:”http:\/\/www.eggplantstudios.ca”,”Version”:”2.3.0″,”Author”:”Shawn Wernig http:\/\/www.eggplantstudios.ca”,”AuthorURI”:””,”TextDomain”:”eps-301-redirects”,”DomainPath”:””,”Network”:false,”Title”:”Eggplant 301 Redirects”,”AuthorName”:”Shawn Wernig http:\/\/www.eggplantstudios.ca”},”flowplayer6-video-player\/flowplayer6-video-player.php”:{“Name”:”Flowplayer 6 Video Player”,”PluginURI”:”http:\/\/wphowto.net\/flowplayer-6-video-player-for-wordpress-813″,”Version”:”1.0.3″,”Author”:”naa986″,”AuthorURI”:”http:\/\/wphowto.net\/”,”TextDomain”:”flowplayer6-video-player”,”DomainPath”:”\/languages”,”Network”:false,”Title”:”Flowplayer 6 Video Player”,”AuthorName”:”naa986″},”google-analytics-for-wordpress\/googleanalytics.php”:{“Name”:”Google Analytics by MonsterInsights”,”PluginURI”:”https:\/\/www.monsterinsights.com\/pricing\/#utm_source=wordpress\u0026utm_medium=plugin\u0026utm_campaign=wpgaplugin\u0026utm_content=v504″,”Version”:”5.5.4″,”Author”:”MonsterInsights”,”AuthorURI”:”https:\/\/www.monsterinsights.com\/”,”TextDomain”:”google-analytics-for-wordpress”,”DomainPath”:”\/languages”,”Network”:false,”Title”:”Google Analytics by MonsterInsights”,”AuthorName”:”MonsterInsights”},”loop-post-navigation-links\/loop-post-navigation-links.php”:{“Name”:”Loop Post Navigation Links”,”PluginURI”:”http:\/\/coffee2code.com\/wp-plugins\/loop-post-navigation-links\/”,”Version”:”2.6.1″,”Author”:”Scott Reilly”,”AuthorURI”:”http:\/\/coffee2code.com\/”,”TextDomain”:”loop-post-navigation-links”,”DomainPath”:””,”Network”:false,”Title”:”Loop Post Navigation Links”,”AuthorName”:”Scott Reilly”},”mp3-jplayer\/mp3jplayer.php”:{“Name”:”MP3-jPlayer”,”PluginURI”:”http:\/\/mp3-jplayer.com”,”Version”:”2.7.2″,”Author”:”Simon Ward”,”AuthorURI”:”http:\/\/www.sjward.org”,”TextDomain”:”mp3-jplayer”,”DomainPath”:””,”Network”:false,”Title”:”MP3-jPlayer”,”AuthorName”:”Simon Ward”},”types\/wpcf.php”:{“Name”:”Toolset Types”,”PluginURI”:”http:\/\/www.ads-software.com\/extend\/plugins\/types\/”,”Version”:”2.2.8″,”Author”:”OnTheGoSystems”,”AuthorURI”:”http:\/\/www.onthegosystems.com”,”TextDomain”:”types”,”DomainPath”:””,”Network”:false,”Title”:”Toolset Types”,”AuthorName”:”OnTheGoSystems”},”wordpress-seo\/wp-seo.php”:{“Name”:”Yoast SEO”,”PluginURI”:”https:\/\/yoast.com\/wordpress\/plugins\/seo\/#utm_source=wpadmin\u0026utm_medium=plugin\u0026utm_campaign=wpseoplugin”,”Version”:”4.2.1″,”Author”:”Team Yoast”,”AuthorURI”:”https:\/\/yoast.com\/”,”TextDomain”:”wordpress-seo”,”DomainPath”:”\/languages\/”,”Network”:false,”Title”:”Yoast SEO”,”AuthorName”:”Team Yoast”},”wp-pagenavi\/wp-pagenavi.php”:{“Name”:”WP-PageNavi”,”PluginURI”:”http:\/\/lesterchan.net\/portfolio\/programming\/php\/”,”Version”:”2.91″,”Author”:”Lester \u0027GaMerZ\u0027 Chan”,”AuthorURI”:”http:\/\/lesterchan.net”,”TextDomain”:”wp-pagenavi”,”DomainPath”:””,”Network”:false,”Title”:”WP-PageNavi”,”AuthorName”:”Lester \u0027GaMerZ\u0027 Chan”}},”mu_plugins”:[],”dropins”:[]},”theme”:{“Name”:”berufsfindung”,”ThemeURI”:null,”Author”:”#”,”AuthorURI”:null,”Template”:”berufsfindung”,”Version”:””,”TextDomain”:null,”DomainPath”:null},”extra-debug”:{“types”:{“add_resized_images_to_library”:0,”register_translations_on_import”:1,”images_remote”:0,”images_remote_cache_time”:”36″,”help_box”:”by_types”,”hide_standard_custom_fields_metabox”:”show”,”postmeta_unfiltered_html”:”on”,”usermeta_unfiltered_html”:”on”}}}I do not know how I should use them to rebuild/replicate your issue.
Please, can you tell me what you do to see that error?
Can you test what happens with no plugins but Types?
Is this also happening with a native WordPress Theme?I cannot replicate this, without steps.
And I do not see any other report of this error neither.
- The topic ‘Invalid argument supplied for foreach()’ is closed to new replies.