{"id":3399,"date":"2014-03-24T01:26:23","date_gmt":"2014-03-24T01:26:23","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/24\/notice-undefined-index-href-error-collection-of-common-programming-errors\/"},"modified":"2014-03-24T01:26:23","modified_gmt":"2014-03-24T01:26:23","slug":"notice-undefined-index-href-error-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/24\/notice-undefined-index-href-error-collection-of-common-programming-errors\/","title":{"rendered":"Notice: Undefined index: href error-Collection of common programming errors"},"content":{"rendered":"<p>I tried to programmatically insert few taxonomy terms.<\/p>\n<pre><code>$arr = array('term1', 'term2', 'term3', 'term4');\nforeach ($arr as &amp;$value) {\n$term = new stdClass();\n$term-&gt;name = $value; \n$term-&gt;vid = '5'; \n$term-&gt;parent ='122'; \ntaxonomy_term_save($term);\n}\n<\/code><\/pre>\n<p>This work nice.After i try to create with hand one more term but i got this error<\/p>\n<pre><code>Notice: Undefined index: href in menu_local_tasks() (line 2052 of \/includes\/menu.inc).\n<\/code><\/pre>\n<p>The same error i got after i tried to edit any of the taxonomy term added with code.<\/p>\n<p>I clear cache. Drupal 7.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I tried to programmatically insert few taxonomy terms. $arr = array(&#8216;term1&#8217;, &#8216;term2&#8217;, &#8216;term3&#8217;, &#8216;term4&#8217;); foreach ($arr as &amp;$value) { $term = new stdClass(); $term-&gt;name = $value; $term-&gt;vid = &#8216;5&#8217;; $term-&gt;parent =&#8217;122&#8242;; taxonomy_term_save($term); } This work nice.After i try to create with hand one more term but i got this error Notice: Undefined index: href in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3399","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3399","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=3399"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3399\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3399"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3399"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3399"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}