Newsletter Builder Archive Issues - Draft newsletters

By northernpenguin - October 19, 2015

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/

By northernpenguin - October 21, 2015

That worked perfectly!

Thanks Damon.

--
northernpenguin
Northern Penguin Technologies

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

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/

By northernpenguin - October 23, 2015

Damon:  again, great!  

Ragi

--
northernpenguin
Northern Penguin Technologies

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

By northernpenguin - October 24, 2015

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 northernpenguin - October 26, 2015 - edited: October 26, 2015

Damon:  Not exactly how I would do that....  would this work?

'where' => "to_list = '" . coalesce(mysql_escape(@$_REQUEST['to_list']), '2') . "' AND " . $whereMessageNumIs . " AND " . "send IN ('all','archive') AND " . whereRecordNumberInUrl(1),

Ragi

P.S.  It worked!  Thanks Damon.

--
northernpenguin
Northern Penguin Technologies

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

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/