When Domain access is used, expire_get_base_urls() is called and the result is merged with the $base_urls array. However, the merge doesn't work very well. I get stuff that looks like

$base_urls = array(
  0 => 'https://pre7.mirage',
  1 => array(
    0 => 'http://pre7.mirage/',
  ),
);

(I also have securepages on, and haven't used the patch from #1471926: Invalid expire URLs when "Include base URL in expires" is enabled. yet, so there's no / on the first URL.)
The "1" in that array comes from the domain_id, and I can't see why it's there. Expire doesn't need to keep track of which domains which URLs come from, even when there are aliases. expire_get_base_urls() should just return a flat array, which will merge nicely, and I wont' have "Arraynode/1234" in my expire output logs.

CommentFileSizeAuthor
#1 expire-subdomains-1728652.patch1.8 KBpgrond

Comments

pgrond’s picture

Version: 7.x-1.0-alpha3 » 7.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new1.8 KB

This is because expire_cache_derivative returns an array with all the subdomains. I've added a check to see if the value is an array and loop this.

apemantus’s picture

Patch works great for me.

F.G’s picture

Hi,

I applyed your path to remove this notice (Undefined variable: gid in expire_get_domains). When i read this post, i believed that your patch could solv my problem?

I'm working with boost+domain access and cache expire.

I run a domain.com if i update a node, the cache is flushed for domain.com/node/1 but i need to flush all subdomain.domain/node/1

Thanks for your help.

SqyD’s picture

Status: Needs review » Closed (duplicate)

Marking this as a duplicate of #1471926: Invalid expire URLs when "Include base URL in expires" is enabled.. I just commited pgrond's code in the patch he also provided there.