Newsletter Builder Archive Issues - Draft newsletters

I am having a bit of a problem with a Newsletter Builder installation.  I am using CMSB 2.65 and Newsletter Builder 3.02.

When I create a draft newsletter, it shows up on the archive.php page.  It shouldn't, as my testing has shown from other implementations.

I have attached my archive.php file as I believe the error is in there.

Thanks!

Ragi

--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke
Attachments:

archive.php 6K

By Damon - October 21, 2015

Hi Ragi,

Can you try replacing the code on line 28:

'where'       => $where,

with this code:

'where'       =>  "send IN ('all','archive')"

Let me know if that works for you.

Thanks!

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

That worked perfectly!

Thanks Damon.

--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke

Damon:  I just realized I also have the file weeklyMessage.php which only lists the weekly messages.  It has the same issue as the archive.php file, but in this case its a bit more convoluted.  Can you provide me a hint?

Ragi

--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke
Attachments:

weeklyMessage.php 5K

By Damon - October 23, 2015

Hi again,

For the weeklyMessage.php file, on line 22, can you replace this:

 'where'     => "to_list = '" . coalesce(mysql_escape(@$_REQUEST['to_list']), '2') . "' AND " . $whereMessageNumIs,

with this:

'where'       => "send IN ('all','archive') AND " . whereRecordNumberInUrl(1), // If no record # is specified then latest record is shown

Let me know if that works for you.

Thanks!

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Damon:  again, great!  

Ragi

--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke

Woops!  I made a mistake.  Your solution actually brought me back to a previous version.   it appears we’re back to the Messages from the SSC appearing under the weekly message archive.  Only the weekly messages should appear in the weekly message section and archives.
And weekly messages are also appearing in the newsletter achive, when only Messages from the SSC (Owls nest) and 706 on the move! newsletters should be in the newsletter archive.

So, no it did not work.

Ragi

--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke

By Damon - October 26, 2015

Hi Ragi,

You do need this code:

'where'       => "send IN ('all','archive') AND " . whereRecordNumberInUrl(1),

so that only newsletters that have been sent and archived (all) or just archived (archive) will be displayed. Otherwise newsletters that set as drafts (none) are displayed as well. 

Can you add your additional mySQL filtering to the where statement?

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By Damon - October 26, 2015

It worked! 

My two favorite words!  :)

Thanks for the update.

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/