Answers.Body: <p>One possibility is you used to have civicase and stored xml files in the main tree, which is allowed but then on upgrade they can get deleted.</p>
  <p>But I agree it's odd that this check is even happening if you don't have civicase enabled. Are you sure the upgrade is configured to point at the right database?</p>
  <p>Since you're not using it, and assuming you don't care about any old cases that might be in the database, you could just truncate civicrm_case_type in mysql.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-07-08T10:25:41.687Z
Answers.Text: Yes the upgrade is pointing to the right database. It's a copy of production that is refreshed periodically using a script. It's possible that someone turned on CiviCase briefly as an experiment at some point, I don't know. I guess that would explain it. Anyway, truncating civicrm_case_type fixed the problem, so I will mark this as solved. Thanks!
Answers.UserDisplayName: twowheeler
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-07-08T10:29:55.173Z
Answers.Text: Last thought: the 5.75 upgrade must be doing something new with cases, since this never happened before. It would be better if the upgrade script tested for civicase being enabled before trying to access the case data.
Answers.UserDisplayName: twowheeler
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-07-08T12:07:39.187Z
Answers.Text: There's nothing in the (core) upgrade from 5.71 to 5.75 that touches this. The reason I thought it might be looking at the wrong database is because it only runs the check if [civicase is enabled](https://github.com/civicrm/civicrm-core/blob/914d2622c8604e300164ef633171fa1bc803338e/CRM/Utils/Check/Component/Case.php#L43) so that's still a bit confusing.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-07-09T00:29:27.223Z
Answers.Text: Noting someone else has reported similar: https://lab.civicrm.org/dev/core/-/issues/5337
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-07-09T16:14:35.413Z
Answers.Text: There's a patch available now: https://github.com/civicrm/civicrm-core/pull/30636/files
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-07-08T01:30:49.390Z
Answers.LastActivityDate: 2024-07-08T01:30:49.390Z
Answers.UserDisplayName: Demerit
Answers.Body: <p>Thank you for reporting this - the issue will be resolved in 5.75.1+</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-07-10T04:31:19.563Z
Answers.LastActivityDate: 2024-07-10T04:31:19.563Z
Answers.UserDisplayName: eileen
Body: <p>I'm testing an upgrade from 5.71.2 to 5.75.0, and I see several red flagged errors in the System Status page. For example,</p>
  <p><code>!Missing case type definition</code></p>
  <p><code>Unable to locate xml file for Case Type &quot;Civil &amp; Political&quot;.</code></p>
  <p><code>!Invalid case type name</code></p>
  <p><code>Case Type &quot;Civil &amp; Political&quot; has invalid characters in the internal machine name (Civil &amp; Political). Only letters, numbers, and underscore are allowed.</code></p>
  <p>Similar errors are displayed for Case Type &quot;Economic, Social &amp; Cultural&quot; and Case Type &quot;Gender Issues&quot;. I don't use CiviCase so neither the component nor the extension for CiviCase are installed. This is on Wordpress 6.5.5.  Any help appreciated.</p>
  
Tags: <upgrade><civicase>
Title: Errors like "Missing case type defintion" and "Invalid case type name" on upgrade to 5.75.0
ThreadText: # Errors like "Missing case type defintion" and "Invalid case type name" on upgrade to 5.75.0
  
  (Asked by: username_0 on 2024-07-08)
  
  I'm testing an upgrade from 5.71.2 to 5.75.0, and I see several red flagged errors in the System Status page. For example,
  
  `!Missing case type definition`
  
  `Unable to locate xml file for Case Type "Civil & Political".`
  
  `!Invalid case type name`
  
  `Case Type "Civil & Political" has invalid characters in the internal machine name (Civil & Political). Only letters, numbers, and underscore are allowed.`
  
  Similar errors are displayed for Case Type "Economic, Social & Cultural" and Case Type "Gender Issues". I don't use CiviCase so neither the component nor the extension for CiviCase are installed. This is on Wordpress 6.5.5. Any help appreciated.
  
  **Tags:** upgrade, civicase
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2024-07-08. Score: 0 | Accepted answer
  
  One possibility is you used to have civicase and stored xml files in the main tree, which is allowed but then on upgrade they can get deleted.
  
  But I agree it's odd that this check is even happening if you don't have civicase enabled. Are you sure the upgrade is configured to point at the right database?
  
  Since you're not using it, and assuming you don't care about any old cases that might be in the database, you could just truncate civicrm\_case\_type in mysql.
  
  > **Comments:**
  > **username_0**: Yes the upgrade is pointing to the right database. It's a copy of production that is refreshed periodically using a script. It's possible that someone turned on CiviCase briefly as an experiment at some point, I don't know. I guess that would explain it. Anyway, truncating civicrm_case_type fixed the problem, so I will mark this as solved. Thanks!  
  > **username_0**: Last thought: the 5.75 upgrade must be doing something new with cases, since this never happened before. It would be better if the upgrade script tested for civicase being enabled before trying to access the case data.  
  > **username_1**: There's nothing in the (core) upgrade from 5.71 to 5.75 that touches this. The reason I thought it might be looking at the wrong database is because it only runs the check if [civicase is enabled](https://github.com/civicrm/civicrm-core/blob/914d2622c8604e300164ef633171fa1bc803338e/CRM/Utils/Check/Component/Case.php#L43) so that's still a bit confusing.  
  > **username_1**: Noting someone else has reported similar: https://lab.civicrm.org/dev/core/-/issues/5337  
  > **username_1**: There's a patch available now: https://github.com/civicrm/civicrm-core/pull/30636/files  
  
  ---
  
  ### Answer by username_2 on 2024-07-10. Score: 0
  
  Thank you for reporting this - the issue will be resolved in 5.75.1+
  
  
  ---
  
  