Advisory not displaying (RESOLVED)

Everything going great and now two posts for help in a week. It appears my alerts aren’t displaying. On my home page you see the alert at top, which is correct. You click on the alert and it says no alerts and the page was updated 3 days ago. The national alert map below is also correct. I get the same results when going to my advisory page. I have done all the recent updates at the end of January. I also checked the cache directory on the web server and it has the updated advisory. It seems like the page just isn’t “pulling” it in. Any ideas? Thanks.
jim

http://www.jolietwx.com/wxadvisory.php

In your Settings.php, you have

$SITE['NWSalertsSidebar'] = false; // =true to insert in menubar, =false no insert to menubar

and so the nws-alerts.php is not invoked to do updates (unless you are running nws-alerts with a cron job.

I’d suggest you change to

$SITE['NWSalertsSidebar'] = true; // =true to insert in menubar, =false no insert to menubar

and see if that fixes the issue of stale alerts in wxadvisory.php

Thanks Ken. I made the change you suggested above and the Advisory is on the menu bar but it says NONE when there actually is an Advisory.
jim

Also, in nws-alerts-config.php, you have

$noCron        = false;                     // true=not using cron, update data when cache file expires

which implies the script is to run via cron. If you have not set up a cron job to run nws-alerts.php, you need to change that to

$noCron        = true;                     // true=not using cron, update data when cache file expires

so the script will auto-run when invoked in the menubar.

Ken,
I haven’t made the change yet you suggested above but Advisories are now showing and are correct. I’ll still make the suggested change. Thanks again

Do make the change… I manually ran nws-alerts on your site to get a refresh :slight_smile:

I just did. Your manual refresh must have done it.
jim

The last issue is in your header.php file

require_once("common.php");
############################################################################
 
if (isset($SITE['uomTemp']) ) {

which is missing the code to run nws-alerts. It should read

require_once("common.php");

// add support for noCron=true fetch of nws-alerts to get current alerts
    if(isset($SITE['NWSalertsCodes']) and count($SITE['NWSalertsCodes']) > 0) {
		include_once("nws-alerts-config.php"); // load the configuration for nws-alerts
		if(isset($noCron) and $noCron) {
			print "<!-- nws-alerts noCron=true .. running nws-alerts.php inline -->\n";
			include_once("nws-alerts.php");
		}
	}

############################################################################
if (isset($SITE['uomTemp']) ) {

then nws-alerts should function properly on your site automatically w/o cron.

I made the above change, thanks again.

You’re welcome! Now your pages (in a view-source) show

so your alerts will be kept up-to-date.

Great! I just don’t know how everything got so messed up, but it’s fixed now, you da man…