Answers.Body: <p>I'm going to bet this is something to do with the civimobile api extension, even though you mentioned you tried disabling. That's the only place I can see the phrase "Something wrong with getting"</p>
  
  <p><a href="https://lab.civicrm.org/extensions/civimobileapi/blob/4.2.1/CRM/CiviMobileAPI/ApiWrapper/EntityTag/Get.php" rel="nofollow noreferrer">https://lab.civicrm.org/extensions/civimobileapi/blob/4.2.1/CRM/CiviMobileAPI/ApiWrapper/EntityTag/Get.php</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-13T21:17:30.663Z
Answers.LastActivityDate: 2020-02-13T21:17:30.663Z
Answers.UserDisplayName: Demerit
Answers.Body: <p>We have fixed the bug in last CiviMobileAPI extension (5.0.1).
  Thanks for a feedback!</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-28T13:24:52.277Z
Answers.LastActivityDate: 2020-02-28T13:24:52.277Z
Answers.UserDisplayName: Andrew Stabryn
Body: <p>Im getting this error when attempting to add tags to a case.</p>
  
  <p>If I create a case and add tags at the same time, they get added.</p>
  
  <p>If I subsequestly try to remove a tag, no problem.</p>
  
  <p>If I subsequently try to add a tag, I get this error</p>
  
  <pre><code>Something wrong with getting info for tag: Expected one Tag but found 25
  </code></pre>
  
  <p>Also a huge array in the backtrace but the relevant bit I think is</p>
  
  <pre><code>Something wrong with getting info for tag: Expected one Tag but found 25" } ["message":protected]=&gt; string(72) "Something wrong with getting info for tag: Expected one Tag but found 25" ["string":"Exception":private]=&gt; string(0) "" ["code":protected]=&gt; int(0) ["file":protected]=&gt; string(64) 
  </code></pre>
  
  <p>If I then try to view the case again, it's unviewable and has to be deleted.</p>
  
  <p>Drupal up-to-date using 5.21.0</p>
  
  <p>backtrace</p>
  
  <pre><code>CiviCRM_API3_Exception: "Something wrong with getting info for tag: Expected one Tag but found 25"
  
  #0 /home/vwdnetor/public_html/sites/all/modules/civicrm/CRM/Case/Form/CaseView.php(359): civicrm_api3("entityTag", "get", (Array:6))
  #1 /home/vwdnetor/public_html/sites/all/modules/civicrm/CRM/Core/Form.php(595): CRM_Case_Form_CaseView-&gt;buildQuickForm()
  #2 /home/vwdnetor/public_html/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php(76): CRM_Core_Form-&gt;buildForm()
  #3 /home/vwdnetor/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display-&gt;perform(Object(CRM_Case_Form_CaseView), "display")
  #4 /home/vwdnetor/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller-&gt;handle(Object(CRM_Case_Form_CaseView), "display")
  #5 /home/vwdnetor/public_html/sites/all/modules/civicrm/CRM/Core/Controller.php(335): HTML_QuickForm_Page-&gt;handle("display")
  #6 /home/vwdnetor/public_html/sites/all/modules/civicrm/CRM/Case/Page/Tab.php(93): CRM_Core_Controller-&gt;run()
  #7 /home/vwdnetor/public_html/sites/all/modules/civicrm/CRM/Case/Page/Tab.php(180): CRM_Case_Page_Tab-&gt;view()
  #8 /home/vwdnetor/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(268): CRM_Case_Page_Tab-&gt;run((Array:4), NULL)
  #9 /home/vwdnetor/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:13))
  #10 /home/vwdnetor/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:4))
  #11 /home/vwdnetor/public_html/sites/all/modules/civicrm/drupal/civicrm.module(456): CRM_Core_Invoke::invoke((Array:4))
  #12 /home/vwdnetor/public_html/includes/menu.inc(527): civicrm_invoke("contact", "view", "case")
  #13 /home/vwdnetor/public_html/index.php(21): menu_execute_active_handler()
  #14 {main}
  </code></pre>
  
  <p>Also I'm getting console error 500 on </p>
  
  <pre><code>/civicrm/contact/view/case?reset=1&amp;id=859&amp;cid=1777&amp;action=view&amp;context=case&amp;selectedChild=case&amp;key=d880725325c5ab758814d913d9a0790e_7084
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-13T13:58:55.547Z
Comments.Text: I'm not able to reproduce this with the latest master code with either tag sets or bare tags. Are you able to reproduce on https://dmaster.demo.civicrm.org? You can still post the huge backtrace - it would be helpful to see it. Also do you have any relevant extensions installed?
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-13T20:23:26.417Z
Comments.Text: @demerit apols did not make it clear - don't think it's a general bug. Original question updated with backtrace and console error. Also the error log is huge rather than the backtrace
Comments.UserDisplayName: Tony Horrocks
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-13T20:41:35.340Z
Comments.Text: Ok thanks. Do you have any customizations? I'm not sure where the phrase "Something wrong with getting info for" is coming from. Also does your line 359 in CRM/Case/Form/CaseView.php match exactly up to this line or is it off by one line? https://github.com/civicrm/civicrm-core/blob/5.21.0/CRM/Case/Form/CaseView.php#L359
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-13T21:04:30.133Z
Comments.Text: @Demerit there are extensions but all mainstream. I disabled all to check but same error. Lines up OK on 359. I'm not seeing that string anywhere either.
Comments.UserDisplayName: Tony Horrocks
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-13T21:07:11.167Z
Comments.Text: Hmm. Ok how about if you do `grep -r "Something wrong with getting" *` from within the civicrm folder - does it show any output?
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-13T21:08:50.177Z
Comments.Text: Not even gettin anything with "Something wrong" other than a comment
Comments.UserDisplayName: Tony Horrocks
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-13T21:10:30.203Z
Comments.Text: Hmm. Are you set up to use an IDE/step-debugger? i.e. put a breakpoint at that line and step it through?
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-13T21:13:49.203Z
Comments.Text: That phrase is in the civimobile api extension. I know you said you disabled but if you grep the folder where that extension lives does it show up? https://lab.civicrm.org/extensions/civimobileapi/blob/4.2.1/CRM/CiviMobileAPI/ApiWrapper/EntityTag/Get.php
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-13T21:17:46.950Z
Comments.Text: Yep. Rock and roll. AND I didn't displabe it when checking. Thanks for perseverance. Prob solved. I'll raise it with CiviMobile.
Comments.UserDisplayName: Tony Horrocks
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-13T21:19:46.340Z
Comments.Text: Yay! ! ! ! ! ! !
Comments.UserDisplayName: Demerit
Tags: <civicase><tags>
Title: Unable to manage case tags
ThreadText: # Unable to manage case tags
  
  (Asked by: username_0 on 2020-02-13)
  
  Im getting this error when attempting to add tags to a case.
  If I create a case and add tags at the same time, they get added.
  If I subsequestly try to remove a tag, no problem.
  If I subsequently try to add a tag, I get this error
  Something wrong with getting info for tag: Expected one Tag but found 25
  
  Also a huge array in the backtrace but the relevant bit I think is
  Something wrong with getting info for tag: Expected one Tag but found 25" } ["message":protected]=> string(72) "Something wrong with getting info for tag: Expected one Tag but found 25" ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(64) 
  
  If I then try to view the case again, it's unviewable and has to be deleted.
  Drupal up-to-date using 5.21.0
  backtrace
  CiviCRM_API3_Exception: "Something wrong with getting info for tag: Expected one Tag but found 25"
  
  #0 /home/vwdnetor/public_html/sites/all/modules/civicrm/CRM/Case/Form/CaseView.php(359): civicrm_api3("entityTag", "get", (Array:6))
  #1 /home/vwdnetor/public_html/sites/all/modules/civicrm/CRM/Core/Form.php(595): CRM_Case_Form_CaseView->buildQuickForm()
  #2 /home/vwdnetor/public_html/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php(76): CRM_Core_Form->buildForm()
  #3 /home/vwdnetor/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Case_Form_CaseView), "display")
  #4 /home/vwdnetor/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Case_Form_CaseView), "display")
  #5 /home/vwdnetor/public_html/sites/all/modules/civicrm/CRM/Core/Controller.php(335): HTML_QuickForm_Page->handle("display")
  #6 /home/vwdnetor/public_html/sites/all/modules/civicrm/CRM/Case/Page/Tab.php(93): CRM_Core_Controller->run()
  #7 /home/vwdnetor/public_html/sites/all/modules/civicrm/CRM/Case/Page/Tab.php(180): CRM_Case_Page_Tab->view()
  #8 /home/vwdnetor/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(268): CRM_Case_Page_Tab->run((Array:4), NULL)
  #9 /home/vwdnetor/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:13))
  #10 /home/vwdnetor/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:4))
  #11 /home/vwdnetor/public_html/sites/all/modules/civicrm/drupal/civicrm.module(456): CRM_Core_Invoke::invoke((Array:4))
  #12 /home/vwdnetor/public_html/includes/menu.inc(527): civicrm_invoke("contact", "view", "case")
  #13 /home/vwdnetor/public_html/index.php(21): menu_execute_active_handler()
  #14 {main}
  
  Also I'm getting console error 500 on 
  /civicrm/contact/view/case?reset=1&id=859&cid=1777&action=view&context=case&selectedChild=case&key=d880725325c5ab758814d913d9a0790e_7084
  
  **Tags:** civicase, tags
  
  > **Comments:**
  > **username_1**: I'm not able to reproduce this with the latest master code with either tag sets or bare tags. Are you able to reproduce on https://dmaster.demo.civicrm.org? You can still post the huge backtrace - it would be helpful to see it. Also do you have any relevant extensions installed?  
  > **username_0**: @demerit apols did not make it clear - don't think it's a general bug. Original question updated with backtrace and console error. Also the error log is huge rather than the backtrace  
  > **username_1**: Ok thanks. Do you have any customizations? I'm not sure where the phrase "Something wrong with getting info for" is coming from. Also does your line 359 in CRM/Case/Form/CaseView.php match exactly up to this line or is it off by one line? https://github.com/civicrm/civicrm-core/blob/5.21.0/CRM/Case/Form/CaseView.php#L359  
  > **username_0**: @username_1 there are extensions but all mainstream. I disabled all to check but same error. Lines up OK on 359. I'm not seeing that string anywhere either.  
  > **username_1**: Hmm. Ok how about if you do `grep -r "Something wrong with getting" *` from within the civicrm folder - does it show any output?  
  > **username_0**: Not even gettin anything with "Something wrong" other than a comment  
  > **username_1**: Hmm. Are you set up to use an IDE/step-debugger? i.e. put a breakpoint at that line and step it through?  
  > **username_1**: That phrase is in the civimobile api extension. I know you said you disabled but if you grep the folder where that extension lives does it show up? https://lab.civicrm.org/extensions/civimobileapi/blob/4.2.1/CRM/CiviMobileAPI/ApiWrapper/EntityTag/Get.php  
  > **username_0**: Yep. Rock and roll. AND I didn't displabe it when checking. Thanks for perseverance. Prob solved. I'll raise it with CiviMobile.  
  > **username_1**: Yay! ! ! ! ! ! !  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2020-02-13. Score: 2 | Accepted answer
  
  I'm going to bet this is something to do with the civimobile api extension, even though you mentioned you tried disabling. That's the only place I can see the phrase "Something wrong with getting"
  
  <https://lab.civicrm.org/extensions/civimobileapi/blob/4.2.1/CRM/CiviMobileAPI/ApiWrapper/EntityTag/Get.php>
  
  
  ---
  
  ### Answer by username_2 on 2020-02-28. Score: 2
  
  We have fixed the bug in last CiviMobileAPI extension (5.0.1).
  Thanks for a feedback!
  
  
  ---
  
  