CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • CiviMail installation and configuration (Moderator: Donald Lobo) »
  • OptOutUrl Error Message
Pages: [1]

Author Topic: OptOutUrl Error Message  (Read 3367 times)

Denver Dave

  • Ask me questions
  • ****
  • Posts: 471
  • Karma: 9
OptOutUrl Error Message
February 13, 2008, 10:58:33 am
When clicking on the link created by {OptOutUrl} we get the error message:
Quote
warning: Invalid argument supplied for foreach() in /home/<our user>/public_html/drupal/sites/all/modules/civicrm/CRM/Mailing/Event/BAO/Unsubscribe.php on line 265.
After this we have "... has been successfully opted out." and the contact is correctly flagged as optout.

The url for the error page is:
http://ourdomain.com/drupal/index.php?q=civicrm/mailing/optout&reset=1
&jid=134&qid=10454&h=c1546f59ac47d9c1b5bcc5448c580844a0c5ac8b&confirm=1

The code at Unsubscribe.php line 265 is as follows:
Quote
        foreach ( $groups as $key => $value ) {
            if (!$value) {
                unset($groups[$key]);
            }
        }

We are running: CiviCRM 1.9.11960

Any ideas?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: OptOutUrl Error Message
February 13, 2008, 11:58:14 am

This is fixed in 2.0 beta svn and will be part of the next beta release. The diff can be found at:

http://fisheye.civicrm.org/browse/CiviCRM/branches/v2.0/CRM/Mailing/Event/BAO/Unsubscribe.php?r1=13194&r2=13221

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Denver Dave

  • Ask me questions
  • ****
  • Posts: 471
  • Karma: 9
Re: OptOutUrl Error Message
February 14, 2008, 04:03:06 pm
Thanks - that fixed the optOutUrl error message.
 - - -
Perhaps cosmetics:
The profile standalone forms allow us to specify the URL to end up on, however, the unsubscribeUrl and OptOutUrl leaves us on a page that the visitor can not use and a sign on form that I don't want them to use.  How are others handling this?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: OptOutUrl Error Message
February 15, 2008, 11:17:46 am
You can potentially create custom versions of these templates and add / subtract content, links etc.
http://wiki.civicrm.org/confluence/display/CRMDOC/Customizing+CiviCRM+Screens

The relevant files are:
templates/CRM/Mailing/Page/Unsubscribe.tpl and Optout.tpl
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • CiviMail installation and configuration (Moderator: Donald Lobo) »
  • OptOutUrl Error Message

This forum was archived on 2017-11-26.