Currently module doesn't work very well with multilingual websites, it sends wrong URLs for languages other than default to CloudFlare, which results in a lot of failed purge requests.

I will attach a patch that fixes it.

Comments

Luke_Nuke created an issue. See original summary.

luke_nuke’s picture

StatusFileSize
new2.64 KB

I'm sure it can be done better, but well, didn't have enough time. With this patch cfpurge should work with "Include base URL in expires" (in Expire module) enabled or disabled, and with multilingual URLs.

Be aware of one thing though - when expiring on "Node update" action - the i18n_sync module may kick in (if you have it enabled) to synchronize translations, which will trigger purge for all translations of updated node (because technically, they also will be updated, by triggering node_save() in i18n_sync), it may, or may not be desirable.

luke_nuke’s picture

Status: Active » Needs review
luke_nuke’s picture

Issue summary: View changes
luke_nuke’s picture

Issue summary: View changes
luke_nuke’s picture

StatusFileSize
new2.79 KB

Whoops, I made one mistake in previous patch now it is fixed. Still, I believe it should be done more elegantly.

jh3’s picture

StatusFileSize
new2.68 KB

Rerolled the patch against the latest dev version. Removed a dpm() call too.

jh3’s picture

Assigned: Unassigned » jh3

Status: Needs review » Needs work

The last submitted patch, 7: cfpurge_i18n-integration-2581633-7.patch, failed testing.

jh3’s picture

The test failed due to lack of tests...

jh3’s picture

Status: Needs work » Needs review
jh3’s picture

Version: 7.x-1.2 » 7.x-1.35

Status: Needs review » Needs work

The last submitted patch, 7: cfpurge_i18n-integration-2581633-7.patch, failed testing. View results

pritamsarkar’s picture

Hi jh3,

Reviewed the last Patch, looks like it should work, but as you confirmed that it failed testing, so can you please share the logs after testing?