Hi, last week I setup the CloudFlare purging following the guide here: https://github.com/d8-contrib-modules/cloudflare/blob/8.x-1.x/docs/freet... as I have a free CloudFlare account.

Now I noticed that the only messages generated in my log from the purger are like this:

purger_cloudflare_c57b2f805a: Client error: `DELETE https://api.cloudflare.com/client/v4/zones/959614d6781c9fe79a9fae42bfbf9...` resulted in a `400 Bad Request` response: @"success":false,"errors":[{"code":1107,"message":"Only enterprise zones can purge by tag."],"messages":[],"result":nul (truncated...)

Any ideas what might be wrong and how to fix it? Thanks!

Comments

pgp111 created an issue. See original summary.

adam.weingarten’s picture

pgp111 you found a bug in the documentation! The solution is to disable: purge_queuer_coretags! I'll keep this issue open with the goal of updating the docs.

pgp111’s picture

Thank you Adam, that makes sense. I just disabled the module, will keep an eye on it.

vibrasphere’s picture

Does not fix disabling purge_queuer_coretags

root@dev /var/www/htdocs # drush pmu purge_queuer_coretags -y
purge_queuer_coretags is already uninstalled.                                                                                                                                                            [ok]
There were no extensions that could be uninstalled.

Keep getting errors:

purger_cloudflare_230de137ce: Client error: `DELETE https://api.cloudflare.com/client/v4/zones/d4cb97b6fdd0ee15f4f86f2cbff3f100/purge_cache` resulted in a `400 Bad Request` response: @"success":false,"errors":[{"code":1107,"message":"Only enterprise zones can purge by tag."],"messages":[],"result":nul (truncated...)

vibrasphere’s picture

Also the docu for 8.x is outdated, the - clear stale tag clear requests: `drush ev "delete from queue where name = 'purge'"` does not work and ends up in error, as I understand it's set for D7 version or something:

ParseError: syntax error, unexpected 'from' (T_STRING) in drush_core_php_eval() (line 1 of phar:///usr/local/bin/drush/commands/core/core.drush.inc(1165) : eval()'d code) #0                            [error]
phar:///usr/local/bin/drush/includes/command.inc(422): drush_core_php_eval('delete from que...')
#1 phar:///usr/local/bin/drush/includes/command.inc(231): _drush_invoke_hooks(Array, Array)
#2 phar:///usr/local/bin/drush/includes/command.inc(199): drush_command('delete from que...')
#3 phar:///usr/local/bin/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#4 phar:///usr/local/bin/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#5 phar:///usr/local/bin/drush/includes/startup.inc(458): drush_main()
#6 phar:///usr/local/bin/drush/includes/startup.inc(365): drush_run_main(false, '/', 'Phar detected. ...')
#7 phar:///usr/local/bin/drush/drush(114): drush_startup(Array)
#8 /usr/local/bin/drush(10): require('phar:///usr/loc...')
#9 {main}.
ParseError: syntax error, unexpected 'from' (T_STRING) in phar:///usr/local/bin/drush/commands/core/core.drush.inc(1165) : eval()'d code on line 1 #0 phar:///usr/local/bin/drush/includes/command.inc(422): drush_core_php_eval('delete from que...')
#1 phar:///usr/local/bin/drush/includes/command.inc(231): _drush_invoke_hooks(Array, Array)
#2 phar:///usr/local/bin/drush/includes/command.inc(199): drush_command('delete from que...')
#3 phar:///usr/local/bin/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#4 phar:///usr/local/bin/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#5 phar:///usr/local/bin/drush/includes/startup.inc(458): drush_main()
#6 phar:///usr/local/bin/drush/includes/startup.inc(365): drush_run_main(false, '/', 'Phar detected. ...')
#7 phar:///usr/local/bin/drush/drush(114): drush_startup(Array)
#8 /usr/local/bin/drush(10): require('phar:///usr/loc...')
#9 {main}
ParseError: syntax error, unexpected 'from' (T_STRING) in drush_core_php_eval() (line 1 of phar:///usr/local/bin/drush/commands/core/core.drush.inc(1165) : eval()'d code).
Drush command terminated abnormally due to an unrecoverable error.             
adam.weingarten’s picture

Try doing drush pqe. That will empty the queue. It should work after that. I'll update the documentation accordingly.

vibrasphere’s picture

I have no idea what's purge pqe and how to do it.

adam.weingarten’s picture

apologies I meant to write drush pqe

pedrop’s picture

I confirm that disabling purge_queuer_coretags and enabling purge_queuer_url , then running drush pqe solves the problem (free tier).
I submitted a pull request to fix the documentation: https://github.com/d8-contrib-modules/cloudflare/pull/61

esolitos’s picture

Version: 8.x-1.0-alpha7 » 8.x-1.x-dev
Category: Support request » Bug report
Related issues: +#3165072: Split purgers by type

This can be worked around by using the patch from #3165072: Split purgers by type and enabling only the "Cloudflare URL" purger.