Open ghost opened 7 years ago
i have this problem. please change tax_meta_class.php in line 704-706 to
$std = array('id' => '', 'url' => ''); if(is_array($field) and isset($field['std'])) { unset($std); $std = $field['std']; } $name = esc_attr( $field['id'] ); if(!isset($_GET['tag_ID'])) { $value = array('id' => '', 'url' => ''); } else { if(is_array($field) and isset($meta['id'])) { unset($value); $value = $meta; } }
Fantastic @mehrshaddarzi this helped me! Thanks!
Solution works fine when creating new Taxonomy but not working in Edit mood. Image or Media upload button have no respond. Thanks
The solution works for me, always. I see that @Biswash-Developer is using a Thimpress theme as me! I wonder if this code is still supported since get_term_meta was introduced, maybe @bainternet can comment?
@RixNox The Code uses "get_term_meta".
As for anyone with this issue, please paste here to code you used to register the field for me to have a look.
Better is to change line 704 from this:
$std = isset($field['std'])? $field['std'] : array('id' => '', 'url' => '');
to this:
$std = (isset($field['std']) && !empty($field['std'])) ? $field['std'] : array('id' => '', 'url' => '');
@db-dzine (Daniel) could you explain your changes?
@RixNox If you set an empty string to $std then the old function does not check this. Thats what i fixed.
Thanks. I have applied changes to code following @mehrshaddarzi suggestions. Should I apply your changes to his code or to the original code?
Replace original
Warning: Illegal string offset 'url' in D:\xampp\htdocs\projects\edu-medic\wp-content\themes\edu\Tax-meta-class\Tax-meta-class.php on line 709
Warning: Cannot assign an empty string to a string offset in D:\xampp\htdocs\projects\edu-medic\wp-content\themes\edu\Tax-meta-class\Tax-meta-class.php on line 709
Warning: Illegal string offset 'id' in D:\xampp\htdocs\projects\edu-medic\wp-content\themes\edu\Tax-meta-class\Tax-meta-class.php on line 711
Warning: Cannot assign an empty string to a string offset in D:\xampp\htdocs\projects\edu-medic\wp-content\themes\edu\Tax-meta-class\Tax-meta-class.php on line 711
Warning: Illegal string offset 'url' in D:\xampp\htdocs\projects\edu-medic\wp-content\themes\edu\Tax-meta-class\Tax-meta-class.php on line 712
Warning: Illegal string offset 'url' in D:\xampp\htdocs\projects\edu-medic\wp-content\themes\edu\Tax-meta-class\Tax-meta-class.php on line 712
Warning: Cannot assign an empty string to a string offset in D:\xampp\htdocs\projects\edu-medic\wp-content\themes\edu\Tax-meta-class\Tax-meta-class.php on line 712
Warning: Illegal string offset 'url' in D:\xampp\htdocs\projects\edu-medic\wp-content\themes\edu\Tax-meta-class\Tax-meta-class.php on line 721
Warning: Illegal string offset 'id' in D:\xampp\htdocs\projects\edu-medic\wp-content\themes\edu\Tax-meta-class\Tax-meta-class.php on line 722
Warning: Illegal string offset 'url' in D:\xampp\htdocs\projects\edu-medic\wp-content\themes\edu\Tax-meta-class\Tax-meta-class.php on line 723