Page 1 of 1

NMS archive list and messages

Posted: Mon Mar 10, 2008 1:18 pm
by Stryker777
When clicking on a link in the archive list of newsletter messages, I get the following error:
"One or more required parameters are missing from the request. This action cannot proceed"

I am using mod-rewrite and the link I get in the archive list to go to the message is in the following structure:
http://www.mydomain.com/NMS/message/3.html

I looked at the action.showmessage.php file and it appears it is that it is not getting the message id here:

Code: Select all

if( !isset($params['msgID']) )
  {
    $this->_DisplayErrorPage($id,$params,$returnid,
			     $this->Lang('error_insufficientparams'));
    return;
  }
Can anyone help me with where this is filled or where the link is being parsed out?  Even better, does anyone know how to fix it already lol.
Thanks

Re: NMS archive list and messages

Posted: Mon Mar 10, 2008 2:32 pm
by calguy1000
Looks like pretty url support for NMS is very broken.  I would suggest you don't use it.

Re: NMS archive list and messages

Posted: Mon Mar 10, 2008 2:40 pm
by Stryker777
Meaning turn off mod-rewrite for the whole site?
Maybe I should just fix it lol.  This is for a homeschool site that uses the website for its main comm.  Preferences and unsubscribe do work, just so everyone knows.  So far, this is the only one that does not so I will post it when I figure out where to fix it.
Thanks Calguy.

Re: NMS archive list and messages

Posted: Mon Mar 10, 2008 2:43 pm
by calguy1000
NMS can read pretty urls but it doesn't generate them.... the functionality is just not properly implemented.

To get this one function working you need the returnid (which isn't given on the url) and there's no preference for it in the application, so the URL itself has to be changed.

Then, the value parameter has to be changed to msgID.  this part is easy.

Re: NMS archive list and messages

Posted: Mon Mar 10, 2008 3:39 pm
by Stryker777
Thanks for the heads up :) I will get it fixed today.
Take care and great job on everything.

Re: NMS archive list and messages

Posted: Mon Mar 10, 2008 4:05 pm
by Stryker777
Found the problem.  The message value is not going into $params['msgID'] it is going into $params['uniqueid']
So, to fix it you can open action.showmessage.php and edit every msgID to uniqueid or for code integrity, just add the following  which can easily be removed later if needed for future versions:
replace:

Code: Select all

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

Code: Select all

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

Thats it.  All fixed now.

Thanks again.

Re: NMS archive list and messages

Posted: Mon Jul 07, 2008 2:49 pm
by jack4ya
Does not work for me...  :'(

From the archive list to the detail... > wrong detail/newsletter is shown
It shows the right messageid, subject line, tect message, but wrong html message.
When more htmlcontents are made, all are wrong

simplified piece of output on detail page

Code: Select all

Message ID  	1
Subject 	1
...
Text Message 	1
HTML Message 	2