Closed fakrulislam closed 7 years ago
Hey there!
I just tested this with the develop branch and can't replicate the issue.
Can you please test using the version from the develop branch on github and not the one from wordpress.org?
If you're still having issues using the develop branch, can you post the mytheme_services_enable_disable
function that you're using? Perhaps the error is coming from there.
Hello
I'm experiencing the same notice cluttering my logfile.
PHP Notice: Undefined index: link_url in .../wp-content/plugins/kirki/includes/field/class-kirki-field-repeater.php on line 79
The field link_url
was used for testing and still has a value stored in database (I checked). It's no longer present in config - I'm using other field names.
The offending line 79 is $subfield_type = $this->fields[ $subfield_id ]['type'];
, same as https://github.com/aristath/kirki/blob/develop/field/class-kirki-field-repeater.php#L100
I'm guessing the problem lies with unsetting the value a few lines before. Unsetting it is correct, since it's no longer a valid field, but the notice should be avoided and invalid data removed from the setting value stored in database.
Is this using the develop branch or 2.3.7? Try using the latest develop branch and let me know if this still happens for you. I just pushed another commit that should take care of this in your case as well.
I was using 2.3.7.
Tried the develop version, it's fixed now. Thanks.
Issue description:
Hi Ari, I'm using repeater field. When WP_DEBUG is true, kirki display's an Undefined index notice in the customizer panel for one of the repeater field (textarea). I tried to figure it out & spent lot of time but can't find the solution. Could you please see the code below where I'm doing wrong?
The ol_service_desc field producing the Undefined index notice. I embedded kirki into theme.
Here is the entire notice: Notice: Undefined index: ol_service_desc in /Applications/MAMP/htdocs/mytheme/mytheme-pro/wp-content/themes/mytheme-pro/inc/kirki/includes/field/class-kirki-field-repeater.php on line 79
Version used:
(Did you try using the develop branch from github? There's a chance your issue has already been adressed there) Version: 2.3.7 (from wp.org)
Using theme_mods or options?
theme_mods
Code to reproduce the issue (config + field(s))