When using the "ah" purge method (on Acquia Managed Cloud/Dev Cloud) the $proxy_url_base variable is not being set in purge.inc, and so the PURGE request is not passing a valid url to Varnish.

Comments

pbull’s picture

StatusFileSize
new696 bytes

Patch to purge.inc attached.

pbull’s picture

Status: Active » Needs review
tekante’s picture

StatusFileSize
new4.08 KB

It also appears that when building the purge urls they are missing the / between the domain and the path portion of the constructed purge url. The attached patch corrects this and refactors out the construction of the purge URL, which is the same amongst all the methods. It also fixes a small bug in reporting about blocked purge requests.

tekante’s picture

After some more testing the slash is only needed when the "Include base URL in expires" is not enabled. Judging by the comments in #1474876: Error Messages "Notice: Undefined index: host in purge_urls() (line 27 of [...]modules/purge/purge.inc)" being displayed that setting is required with the 1.x branch of purge. Be aware, however, that at present it looks like the expire module produces invalid URLs in that case #1471926: Invalid expire URLs when "Include base URL in expires" is enabled.. So I believe the patch in #1 is the correct one to use but must be combined with a patch to the expire module.

tekante’s picture

StatusFileSize
new4.07 KB

Just noticed that the patch in #1 doesn't maintain query strings. Attached is a reroll of #3 which does but removing the / that had been added based on findings from #4

klezmer41’s picture

I'm using Acquia Dev Cloud, the normal releases of Purge and Expire are definitely not working. Could you please get the official patches/fixes into the current downloads?

SqyD’s picture

Hi all,

Sorry for the late respons. I've just committed the patch from #5 to the 7.x-1.x branch . I'm not an Acquia user so I would like to hear if applying this fixes things for you. Also could you role a D6 version?

SqyD

SqyD’s picture

Status: Needs review » Postponed (maintainer needs more info)

Please provide feedback if the issue is solved or now.

jonathan webb’s picture

Status: Postponed (maintainer needs more info) » Reviewed & tested by the community

I can confirm that the patch from #5 fixes the issue on Acquia Cloud.

SqyD’s picture

Status: Reviewed & tested by the community » Closed (fixed)
asgorobets’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new1011 bytes

Hi SqyD,
This doesn't look like fixed issue since $proxy_url_base variable is still not set in commited code.
I'm referring to this commit

Here is a rerolled #1 patch for latest 7.x-1.x.

Without this change the "ah" method doesn't work for me.

jaydub’s picture

StatusFileSize
new4.13 KB

I've been running around trying to figure out why purging was no longer working on Acquia hosting and it looks like this patch is the answer. I can see that it's only the last couple of commits (in Drupal 6 version in our case) where the bug was introduced. We had asked Acquia for help and they appear to not have taken the time to look in the d.o. issue queue where they would have found this ticket and figured out what the issue was. Oh well it's on us to fix it I guess and tell them where they should have looked :)

I've rolled the patch for D6 based on #5

SqyD’s picture

Thank you all for your patience. I've just committed patches in #11 and #12 AND actually tested them somewhat. Further testing and confirmation is highly appreciated. I'll roll these and other bugfixes into a new 1.x release over the coming days/weeks.

@jaydub: Trust me, Acquia DID look at this module and it's _many_ outstanding issues I was not able to address in the past year at my previous occupation. I hope you agree with me they implemented a very thorough solution to this problem: They hired me last week ;-) I hope to improve this module and better support valued customers like yourself in the future.

SqyD’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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