Answers.Body: <p>This error usually occurs when the option values for Custom data type are disabled or deleted. Make sure you have all the options values required for event are enabled for <a href="https://dmaster.demo.civicrm.org/civicrm/admin/options?gid=36&amp;reset=1" rel="nofollow noreferrer">Custom data type</a> option group. Here are the options
  <a href="https://i.sstatic.net/qivNd.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/qivNd.png" alt="enter image description here"></a></p>
  
  <p>If a option value is missing then you will need to add the option value either through UI or api. However for some option values its not possible to add same options with same machine name so it is always better to add such options through API Explorer. </p>
  
  <p>Navigate to CiviCRM >> Support >> Developer >> API Explore. And use the options shown in the image below once you are done with selection then click on execute button for api to process the params you selected.
  <a href="https://i.sstatic.net/2NblS.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/2NblS.png" alt="enter image description here"></a></p>
  
  <p>HTH</p>
  
  <p>Pradeep</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-18T14:32:53.927Z
Answers.Text: Good thinking Pradeep, but unless I'm missing something, I can't find any disabled options.
Answers.UserDisplayName: Joel Steidl
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-18T14:34:06.407Z
Answers.Text: Can you share screenshot?
Answers.UserDisplayName: Pradeep Nayak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-18T17:19:56.403Z
Answers.Text: Screenshot updated in my original post to include a side by side of what was working and now is not. Does that help you?
Answers.UserDisplayName: Joel Steidl
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-18T17:21:31.697Z
Answers.Text: What was working? Did you upgrade CiviCRM??
Answers.UserDisplayName: Pradeep Nayak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-18T17:33:06.003Z
Answers.Text: This Civi instance was migrated from Joomla to Wordpress and I'm wondering if something got lost in the move.
Answers.UserDisplayName: Joel Steidl
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-18T17:34:27.710Z
Answers.Text: Can you screen shot the custom data type option values?
Answers.UserDisplayName: Pradeep Nayak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-24T22:27:53.330Z
Answers.Text: Participant Event Name was actually missing. I have added it ad you can see here: https://www.evernote.com/l/AMlGJkM3Vj1A65oAtOiyYa7OGS2nDyGUXTcB/image.png Unfortunately it does not fix the issue.
Answers.UserDisplayName: Joel Steidl
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-24T22:30:53.863Z
Answers.Text: It depend on how you have actually added. The machine name, value and other things should match.
Answers.UserDisplayName: Pradeep Nayak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-24T22:32:32.653Z
Answers.Text: Is there a good way to figure out those values?
Answers.UserDisplayName: Joel Steidl
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-24T22:42:30.183Z
Answers.Text: I have updated my answer to include the solution for your issue. You will need to delete the one which you have just created and create a new one using api explorer with same values shown in the image
Answers.UserDisplayName: Pradeep Nayak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-24T22:55:13.913Z
Answers.Text: Adding it with the API Explorer worked! I owe you! Thank you!
Answers.UserDisplayName: Joel Steidl
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-24T23:15:05.550Z
Answers.Text: Congrats to get it worked. Cheerz
Answers.UserDisplayName: Pradeep Nayak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-17T20:25:34.607Z
Answers.LastActivityDate: 2018-07-24T22:41:13.887Z
Answers.LastEditDate: 2018-07-24T22:41:13.887Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p><strong>Wordpress</strong>: 4.9.6
  <strong>Civi</strong>: 5.3.0</p>
  
  <p>When trying to add event registration on behalf of a contact, I encounter a javascript error that is causing a couple issues:</p>
  
  <ol>
  <li>I am unable to select an existing event.</li>
  <li>Any event custom field accordions are missing. They usually appear at the bottom of the other fields.</li>
  </ol>
  
  <p>This is the error that I'm seeing in the Chrome Console:</p>
  
  <p><strong>Uncaught SyntaxError: Unexpected token ,</strong></p>
  
  <pre><code>// Event and event-type custom data
  CRM.buildCustomData('Participant', eventId, , null, null, null, true);
  </code></pre>
  
  <p>Looking in Participant.tpl, <code>{/literal}{$eventNameCustomDataTypeID}{literal}</code> seems to be the missing parameter or token.</p>
  
  <p>I'm wondering if there is a DB issue. I can't find anything useful in the Civi logs. This Civi instance was migrated from Joomla to Wordpress and I'm wondering if something got lost in the move.</p>
  
  <p>Here is a side by side screenshot if you need a visual reference.</p>
  
  <p><a href="https://i.sstatic.net/BsZjO.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/BsZjO.png" alt="enter image description here"></a></p>
  
  <p>Any help would greatly be appreciated!</p>
  
Tags: <civievent>
Title: Event Registration on Behalf of a Contact is Broken
ThreadText: # Event Registration on Behalf of a Contact is Broken
  
  (Asked by: username_0 on 2018-07-17)
  
  **Wordpress**: 4.9.6
  **Civi**: 5.3.0
  
  When trying to add event registration on behalf of a contact, I encounter a javascript error that is causing a couple issues:
  
  1. I am unable to select an existing event.
  2. Any event custom field accordions are missing. They usually appear at the bottom of the other fields.
  
  This is the error that I'm seeing in the Chrome Console:
  
  **Uncaught SyntaxError: Unexpected token ,**
  
  ```
  // Event and event-type custom data
  CRM.buildCustomData('Participant', eventId, , null, null, null, true);
  
  ```
  
  Looking in Participant.tpl, `{/literal}{$eventNameCustomDataTypeID}{literal}` seems to be the missing parameter or token.
  
  I'm wondering if there is a DB issue. I can't find anything useful in the Civi logs. This Civi instance was migrated from Joomla to Wordpress and I'm wondering if something got lost in the move.
  
  Here is a side by side screenshot if you need a visual reference.
  
  [![enter image description here](https://i.sstatic.net/BsZjO.png)](https://i.sstatic.net/BsZjO.png)
  
  Any help would greatly be appreciated!
  
  **Tags:** civievent
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-07-17. Score: 1 | Accepted answer
  
  This error usually occurs when the option values for Custom data type are disabled or deleted. Make sure you have all the options values required for event are enabled for [Custom data type](https://dmaster.demo.civicrm.org/civicrm/admin/options?gid=36&reset=1) option group. Here are the options
  [![enter image description here](https://i.sstatic.net/qivNd.png)](https://i.sstatic.net/qivNd.png)
  
  If a option value is missing then you will need to add the option value either through UI or api. However for some option values its not possible to add same options with same machine name so it is always better to add such options through API Explorer.
  
  Navigate to CiviCRM >> Support >> Developer >> API Explore. And use the options shown in the image below once you are done with selection then click on execute button for api to process the params you selected.
  [![enter image description here](https://i.sstatic.net/2NblS.png)](https://i.sstatic.net/2NblS.png)
  
  HTH
  
  username_1
  
  > **Comments:**
  > **username_0**: Good thinking username_1, but unless I'm missing something, I can't find any disabled options.  
  > **username_1**: Can you share screenshot?  
  > **username_0**: Screenshot updated in my original post to include a side by side of what was working and now is not. Does that help you?  
  > **username_1**: What was working? Did you upgrade CiviCRM??  
  > **username_0**: This Civi instance was migrated from Joomla to Wordpress and I'm wondering if something got lost in the move.  
  > **username_1**: Can you screen shot the custom data type option values?  
  > **username_0**: Participant Event Name was actually missing. I have added it ad you can see here: https://www.evernote.com/l/AMlGJkM3Vj1A65oAtOiyYa7OGS2nDyGUXTcB/image.png Unfortunately it does not fix the issue.  
  > **username_1**: It depend on how you have actually added. The machine name, value and other things should match.  
  > **username_0**: Is there a good way to figure out those values?  
  > **username_1**: I have updated my answer to include the solution for your issue. You will need to delete the one which you have just created and create a new one using api explorer with same values shown in the image  
  > **username_0**: Adding it with the API Explorer worked! I owe you! Thank you!  
  > **username_1**: Congrats to get it worked. Cheerz  
  
  ---
  
  