Body: <pre><code>CRM_Core_Exception: Missing Parameters in /var/www/html/public_html/crm/sites/all/modules/civicrm/CRM/Core/Form.php on line 608
  Exception trace
  #   Function    Location
  0   CRM_Mailing_Form_Unsubscribe-&gt;preProcess()  /var/www/html/public_html/crm/sites/all/modules/civicrm/CRM/Core/Form.php:608
  1   CRM_Core_Form-&gt;buildForm()  /var/www/html/public_html/crm/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php:76
  2   CRM_Core_QuickForm_Action_Display-&gt;perform(Object(CRM_Mailing_Form_Unsubscribe), 'display') /var/www/html/public_html/crm/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php:203
  3   HTML_QuickForm_Controller-&gt;handle(Object(CRM_Mailing_Form_Unsubscribe), 'display')  /var/www/html/public_html/crm/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php:103
  4   HTML_QuickForm_Page-&gt;handle('display')  /var/www/html/public_html/crm/sites/all/modules/civicrm/CRM/Core/Controller.php:347
  5   CRM_Core_Controller-&gt;run()  /var/www/html/public_html/crm/sites/all/modules/civicrm/CRM/Utils/Wrapper.php:98
  6   CRM_Utils_Wrapper-&gt;run('CRM_Mailing_Form…', 'Unsubscribe', Array)   /var/www/html/public_html/crm/sites/all/modules/civicrm/CRM/Core/Invoke.php:285
  7   CRM_Core_Invoke::runItem(Array) /var/www/html/public_html/crm/sites/all/modules/civicrm/CRM/Core/Invoke.php:68
  8   CRM_Core_Invoke::_invoke(Array) /var/www/html/public_html/crm/sites/all/modules/civicrm/CRM/Core/Invoke.php:36
  9   CRM_Core_Invoke::invoke(Array)  /var/www/html/public_html/crm/sites/all/modules/civicrm/drupal/civicrm.module:458
  10  civicrm_invoke('mailing', 'unsubscribe')    /var/www/html/public_html/crm/includes/menu.inc:527
  11  menu_execute_active_handler()   /var/www/html/public_html/crm/index.php:21
  12  {main}   
   Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.
  Missing Parameters
  Return to home page.
  </code></pre>
  <hr />
  <p>This is what is displayed for users when they click on the unsubscribe link in certain emails. This appears to be when certain templates are used. Can anyone advise?
  Civi CRM 5.35.2</p>
  <p>Example URL for user: <a href="https://crm.elifesciences.org/crm/civicrm/mailing/unsubscribe?reset=1&amp;jid=&amp;qid=&amp;h=" rel="nofollow noreferrer">https://crm.elifesciences.org/crm/civicrm/mailing/unsubscribe?reset=1&amp;jid=&amp;qid=&amp;h=</a></p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-05-10T17:24:09.717Z
Comments.Text: Welcome to SE!  What version of CiviCRM are you using?  Please edit the question and  add an example failing unsubscribe URL.
Comments.UserDisplayName: Aidan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-05-12T08:05:50.580Z
Comments.Text: Hi @Aidan, thanks so much! I have added the required info.
Comments.UserDisplayName: Anna
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-05-13T17:54:35.143Z
Comments.Text: So the problem is in the creation of the link going into the mailing, not the processing of it.  If you look at the templates that do and don't work, how is the unsubscribe url being added?  Are you using Mosaico?
Comments.UserDisplayName: Aidan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-05-17T08:18:13.583Z
Comments.Text: Hi @Aidan, thanks for getting back to this thread. Yes we use Mosaico, and it appears as though different individuals (from within the company) use different mailing templates, with some using smart groups and some not. My colleague suggested this unsub error could be due to the unsubscribe token not linking to a smart group so I may have to look into each individual email that has been sent. Unless you have any suggestions! Thank you.
Comments.UserDisplayName: Anna
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-05-18T09:02:31.963Z
Comments.Text: Hi @Anna, I'd start by looking at the templates of messages with bad unsubscribe url's and see if there is any difference in the way the unsubscribe token is being added.  Try re-using one of those templates with a test group to get a repeatable error. If you can reproduce that on a test system you can debug there or write it up as an issue but otherwise you may need to investigate further on the live system, or involve someone else to help.
Comments.UserDisplayName: Aidan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-05-19T13:03:34.053Z
Comments.Text: Thanks very much @Aidan, that is really helpful.
Comments.UserDisplayName: Anna
Tags: <drupal><civimail><error><unsubscribe>
Title: Missing parameters error in Unsubscribe link for certain emails
ThreadText: # Missing parameters error in Unsubscribe link for certain emails
  
  (Asked by: username_0 on 2021-05-10)
  
  CRM_Core_Exception: Missing Parameters in /var/www/html/public_html/crm/sites/all/modules/civicrm/CRM/Core/Form.php on line 608
  Exception trace
  #   Function    Location
  0   CRM_Mailing_Form_Unsubscribe->preProcess()  /var/www/html/public_html/crm/sites/all/modules/civicrm/CRM/Core/Form.php:608
  1   CRM_Core_Form->buildForm()  /var/www/html/public_html/crm/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php:76
  2   CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Mailing_Form_Unsubscribe), 'display') /var/www/html/public_html/crm/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php:203
  3   HTML_QuickForm_Controller->handle(Object(CRM_Mailing_Form_Unsubscribe), 'display')  /var/www/html/public_html/crm/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php:103
  4   HTML_QuickForm_Page->handle('display')  /var/www/html/public_html/crm/sites/all/modules/civicrm/CRM/Core/Controller.php:347
  5   CRM_Core_Controller->run()  /var/www/html/public_html/crm/sites/all/modules/civicrm/CRM/Utils/Wrapper.php:98
  6   CRM_Utils_Wrapper->run('CRM_Mailing_Form…', 'Unsubscribe', Array)   /var/www/html/public_html/crm/sites/all/modules/civicrm/CRM/Core/Invoke.php:285
  7   CRM_Core_Invoke::runItem(Array) /var/www/html/public_html/crm/sites/all/modules/civicrm/CRM/Core/Invoke.php:68
  8   CRM_Core_Invoke::_invoke(Array) /var/www/html/public_html/crm/sites/all/modules/civicrm/CRM/Core/Invoke.php:36
  9   CRM_Core_Invoke::invoke(Array)  /var/www/html/public_html/crm/sites/all/modules/civicrm/drupal/civicrm.module:458
  10  civicrm_invoke('mailing', 'unsubscribe')    /var/www/html/public_html/crm/includes/menu.inc:527
  11  menu_execute_active_handler()   /var/www/html/public_html/crm/index.php:21
  12  {main}   
   Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.
  Missing Parameters
  Return to home page.
  
  
  This is what is displayed for users when they click on the unsubscribe link in certain emails. This appears to be when certain templates are used. Can anyone advise?
  Civi CRM 5.35.2
  Example URL for user: https://crm.elifesciences.org/crm/civicrm/mailing/unsubscribe?reset=1&jid=&qid=&h=
  
  **Tags:** drupal, civimail, error, unsubscribe
  
  > **Comments:**
  > **username_1**: Welcome to SE!  What version of CiviCRM are you using?  Please edit the question and  add an example failing unsubscribe URL.  
  > **username_0**: Hi @username_1, thanks so much! I have added the required info.  
  > **username_1**: So the problem is in the creation of the link going into the mailing, not the processing of it.  If you look at the templates that do and don't work, how is the unsubscribe url being added?  Are you using Mosaico?  
  > **username_0**: Hi @username_1, thanks for getting back to this thread. Yes we use Mosaico, and it appears as though different individuals (from within the company) use different mailing templates, with some using smart groups and some not. My colleague suggested this unsub error could be due to the unsubscribe token not linking to a smart group so I may have to look into each individual email that has been sent. Unless you have any suggestions! Thank you.  
  > **username_1**: Hi @username_0, I'd start by looking at the templates of messages with bad unsubscribe url's and see if there is any difference in the way the unsubscribe token is being added.  Try re-using one of those templates with a test group to get a repeatable error. If you can reproduce that on a test system you can debug there or write it up as an issue but otherwise you may need to investigate further on the live system, or involve someone else to help.  
  > **username_0**: Thanks very much @username_1, that is really helpful.  
  
  ---
  
  ## 0 answers
  
  