I set the module to turn off but the splash window continues to open

Comments

seanr’s picture

Do you have caching turned on? Try flushing the cache and testing again.

seanr’s picture

Status: Active » Fixed

Going to assume that was it. If not, please reopen with more info.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

greenmachine’s picture

Status: Closed (fixed) » Active

In my opinion, this is an existing and valid bug with Splash 6.x-2.5. I've witnessed this behavior on two sites. Steps are essentially:

-- enable splash module
-- set the "what"/"how" to display a static chunk of HTML (pasted into the config field)
-- set the "when" to once a week or once a session
-- splash page starts appearing for new visitors (redirected to domainname.com/splash)
-- set the "when" to "never" (in my cases a couple weeks later)
-- splash page continues to appear for new visitors (again, redirected to domainname.com/splash)

On the most recent site, Drupal caching is turned on ("normal"), with page compression and block cache enabled, css optimization disabled and javascript optimization enabled.

I have not investigated to try to figure out the mechanism. I did try flushing caches with the button on the Performance settings page: that did not seem to have any effect. Workaround in my case is to disable the module.

codewatson’s picture

Version: 6.x-2.3 » 6.x-2.5

It looks like the culprit might the frequency logic of the splash.module.

starting at 102:

		// Frequency
		if ($splash) {
			
			// No cookie
			if (!$cookie_data['time']) {
				$splash = TRUE;
				
			} else {
	  
			  // Once
			  if ($splash_when['frequency'] == 'once') {
			  	$splash = FALSE;
			
			  // Every day
			  } else if ($cookie_data['time'] && $splash_when['frequency'] == 'daily' && (time() - $cookie_data['time'] < 86400)) {
			  	$splash = FALSE;
			  	
			  // Every week
			  } else if ($cookie_data['time'] && $splash_when['frequency'] == 'weekly' && (time() - $cookie_data['time'] < 604800)) {
			  	$splash = FALSE;
			  	
			  // Never
			  } else if ($splash_when['frequency'] != 'always') {
				  $splash = FALSE;
			  }
		  }
	  }

Before it does any checking for the frequency, it checks to see if there is a cookie, and if not sets splash to display and ignores the rest of the frequency logic.

Not sure yet what the best logic for this section of code would be...

seanr’s picture

StatusFileSize
new734 bytes

This patch should fix it. Can you give it a try?

sirkitree’s picture

Status: Active » Needs review
StatusFileSize
new3.1 KB

Same issue, but the patch isn't working for me. IMHO 'never' should be all inclusive, whether there is a cookie or not.

capellic’s picture

Same problem in 2.6 and 2.7. Never means off.

sirkitree’s picture

Version: 6.x-2.5 » 6.x-2.7

Ah, right - sorry - i missed changing the version number. Should have done against -dev too, but looks like this applies.

mail@victorquinn.com’s picture

Status: Needs review » Closed (fixed)

@sirkitree patch committed! Thanks!!