Page 1 of 1

Unsubscribe from NMS or newsletter alternative

Posted: Fri Jun 01, 2007 7:13 am
by caramello
Hi,

  I've tried to use NMS module (v 1.0.1) and it works for the subscription, but I've some problem with the unsubscribe function.

The portal report:
Error!
One or more required parameters are missing from the request. This action cannot proceed

This is the code insert into the page:

{cms_module module="NMS" mode="unsubscribe"}

Is there an alternative to NMS?

Thanks a lot

 

Re: Unsubscribe from NMS or newsletter alternative

Posted: Mon Jun 04, 2007 11:43 am
by ikatt
I also seem to have the same problem when using the unsubscribe form. Direct link in e-mails work fine (after adding a fix that changes & into &'s).

It seems like the problem with the unsubscribe form is also related to the & / & issue...

Re: Unsubscribe from NMS or newsletter alternative

Posted: Tue Jun 26, 2007 2:43 pm
by Splynx
Have the same problem and Im very insterested in a solution for this!

(aka - bump!!!)

Re: Unsubscribe from NMS or newsletter alternative

Posted: Tue Jun 26, 2007 3:21 pm
by alby
Splynx wrote: Have the same problem and Im very insterested in a solution for this!

(aka - bump!!!)
Check this (in italian)

There is a problem for action.unsubscribe_email.php. Dowload revision 108 and substitute (after backup) the relative file in modules/NMS folder.

Alby

Re: Unsubscribe from NMS or newsletter alternative

Posted: Wed Jun 27, 2007 8:27 pm
by Splynx
Thanks for the help mate

I tried the 108 and the 96 as suggested in the link (allthough I didnt understand the italian part :-D) but to no help :-(

I then visited the Newsletter part of SVN at http://viewsvn.cmsmadesimple.org/viewsv ... newsletter and downloaded the latest versions of action.unsubscribe.php & action.unsubscribe_email.php but again getting the same error :-(

This is really frustrating because everything else works neatly - but I have to have this feature in it as well

Any more help would be very much appreciated (Ill be sure to post when / if I find a fix on my own)

Re: Unsubscribe from NMS or newsletter alternative

Posted: Wed Jun 27, 2007 8:32 pm
by Splynx
It seems to be these lines
if( !isset( $params['uniqueid'] ) )
  {
    $this->_DisplayErrorPage( $id, $params, $returnid,
      $this->Lang('error_insufficientparams'));
    return;
  }
That generates the error - but I aint no hardcore programmer so dont know what to do :-(

Re: Unsubscribe from NMS or newsletter alternative

Posted: Thu Jun 28, 2007 10:49 am
by Splynx
Found solution by downloading the files from

http://svn.cmsmadesimple.org/svn/newsletter/

Re: Unsubscribe from NMS or newsletter alternative

Posted: Thu Jun 28, 2007 12:21 pm
by caramello
Try this version.

Remember to rename the file from NMS_1.01_ok.zip.txt to NMS_1.01_ok.zip

Bye

Re: Unsubscribe from NMS or newsletter alternative [SOLVED]

Posted: Wed Jul 11, 2007 10:29 pm
by namloc
The problem with the Error message in the unsubscribe is that action_unsubscribe_email.php is trying to use a uniqueid when all you get from the web form is an email address

change the following code at the start of the file


------------------- start old code -----------------------

if( !isset( $params['uniqueid'] ) )
  {
    $this->_DisplayErrorPage( $id, $params, $returnid,
      $this->Lang('error_insufficientparams'));
    return;
  }

  $db = $this->GetDb();

  $query = "SELECT * from ".cms_db_prefix().$this->table_prefix."users where uniqueid = ?";
  $record["uniqueid"] = $params['uniqueid'];
  $dbresult = $db->Execute($query, $record);
  if( !$dbresult || ( $dbresult->RecordCount() == 0 ) )
    {
      $this->_DisplayErrorPage( $id, $params, $returnid,
$this->Lang('error_invaliduniqueid'));
      return;
    }

----------------------- end old code ---------------

to


--------------------- start new code ---------------------

if( !isset( $params['email'] ) )
  {
    $this->_DisplayErrorPage( $id, $params, $returnid,
      $this->Lang('error_insufficientparams'));
   
    return;
  }

  $db = $this->GetDb();
  $query = "SELECT * from ".cms_db_prefix().$this->table_prefix."users where email = ?";
  $record["email"] = $params['email'];
  $dbresult = $db->Execute($query, $record);
  if( !$dbresult || ( $dbresult->RecordCount() == 0 ) )
    {
      $this->_DisplayErrorPage( $id, $params, $returnid,
$this->Lang('error_invalidemail'));
      return;
    }



--------------------- end new code -------------------------


this made the unsubscribe work for me on version 1.0.1 of NMS with the latest SVN fixes version 119 of action_unsubscribe_email.php
and 1.0.8 of CMS

could somebody check this into SVN , as I do not have access

Re: Unsubscribe from NMS or newsletter alternative [SOLVED]

Posted: Sun Oct 07, 2007 11:10 pm
by NomadSoul
that worked for me!

Changes in file action_unsubscribe_email.php :
namloc wrote:
change the following code at the start of the file


------------------- start old code -----------------------

if( !isset( $params['uniqueid'] ) )
  {
    $this->_DisplayErrorPage( $id, $params, $returnid,
      $this->Lang('error_insufficientparams'));
    return;
  }

  $db = $this->GetDb();

  $query = "SELECT * from ".cms_db_prefix().$this->table_prefix."users where uniqueid = ?";
  $record["uniqueid"] = $params['uniqueid'];
  $dbresult = $db->Execute($query, $record);
  if( !$dbresult || ( $dbresult->RecordCount() == 0 ) )
    {
      $this->_DisplayErrorPage( $id, $params, $returnid,
$this->Lang('error_invaliduniqueid'));
      return;
    }

----------------------- end old code ---------------

to


--------------------- start new code ---------------------

if( !isset( $params['email'] ) )
  {
    $this->_DisplayErrorPage( $id, $params, $returnid,
      $this->Lang('error_insufficientparams'));
   
    return;
  }

  $db = $this->GetDb();
  $query = "SELECT * from ".cms_db_prefix().$this->table_prefix."users where email = ?";
  $record["email"] = $params['email'];
  $dbresult = $db->Execute($query, $record);
  if( !$dbresult || ( $dbresult->RecordCount() == 0 ) )
    {
      $this->_DisplayErrorPage( $id, $params, $returnid,
$this->Lang('error_invalidemail'));
      return;
    }



--------------------- end new code -------------------------
Thank You namloc !

Re: Unsubscribe from NMS or newsletter alternative

Posted: Sun Oct 07, 2007 11:15 pm
by calguy1000
Soon (hopefully November) I will be catching up on the NMS issues (hopefully) however I won't be searching through the forum to find solved vs. unsolved NMS issues.

so please put an item into the forge under the NMS project for everything that needs fixing.
and if that includes a patch, it's even better.

I'd also like to get external vs embedded images into the next version.

funny thing, Is, I don't even use it.