• Resolved zesty1

    (@zesty1)


    I have authenticated with the API Token method.

    i added all these for the appropriate zone:

    Account – Account Settings – Read
    Account – Worker Scripts – Edit
    Zone – Cache Purge – Purge
    Zone – Page Rules – Edit
    Zone – Zone Settings – Edit
    Zone – Zone – Edit
    Zone – Worker Routes – Edit

    When I hit “enable cache” it actually says sucessfully updated with a green checkmark.

    When i log into cloudflare, there are no cache rules OR page rules. Very clearly it was not successful as no rule got created

    This is what the log file says… so the first problem is that it reports this as ‘success’ when its clearly not success. secondly, i just need it to work:

    [2024-08-11 19:50:06] [cloudflare::try_log_error] Cloudflare API Errors: Authentication error (err code: 10000)
    [2024-08-11 19:50:08] [cloudflare::create_ruleset_id] Could NOT create rulesets ID for zone xxxxx – URL: https://api.cloudflare.com/client/v4/zones/xxxxx/rulesets
    [2024-08-11 19:50:08] [cloudflare::try_log_error] Cloudflare API Errors: Authentication error (err code: 10000)

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor iSaumya

    (@isaumya)

    You also need to give access to Zone – Cache Rules – Edit in your authentication token.

    jeeringly5307

    (@jeeringly5307)

    Hi iSaumya,

    Since the deprecation of Cloudflare page rules, is this still the best practice:
    https://gist.github.com/isaumya/af10e4855ac83156cc210b7148135fa2

    Since you seem to be the expert, I just want to know what is best practice based on your opinion. We use these settings on one of our sites currently, so I wanted to know how setting the plugin this way compares to the “auto config” of just adding the plugin and letting it do the work.

    Lastly, the API token settings don’t seem to be working anymore as I am getting an error code in the plugin that says:

    • Cloudflare (Cache Rule or Worker) is not enabled!
    • Disk Page Caching is functional.

    I was using these settings:

    Account – Account Settings – Read
    Account – Worker Scripts – Edit
    Zone – Cache Purge – Purge
    Zone – Page Rules – Edit
    Zone – Zone Settings – Edit
    Zone – Zone – Edit
    Zone – Worker Routes – Edit

    Right now it doesn’t seem that the plugin is working on multiple sites that I have the API Token setup since the plugin updated. How do I fix this issue?

    Thank you for your time, I greatly appreciate it.

    Best regards,

    Scott

    Plugin Support Ionut Neagu

    (@ionutn)

    Hey Scott,

    I can see that you didn’t gave Cache Rules edit rights to the token, so it won’t work. You can see more info in the logs.

    Regarding the rule, I suggest you do not edit the rule that the plugin create, since for e.g in the next version we’ll update this automatically. If you want to make edits, I recommend creating a different cache rule yourself.

    Thank you Ionut for your reply! For the API tokens, are all the zone and Account settings still applicable or does the plugin no longer need Zone-Page Rules, Zone Worker Routes and Scripts, Zone, etc.? The plugin use to have the rules needed to setup the API token, however, it seems that has been removed.

    Account – Account Settings – Read
    Account – Worker Scripts – Edit
    Zone – Cache Purge – Purge
    Zone- Cache Rules- Edit
    Zone – Page Rules – Edit
    Zone – Zone Settings – Edit
    Zone – Zone – Edit
    Zone – Worker Routes – Edit

    If you can please provide and updated API Token setup as this will help users of the plugin, it would be greatly appreciated.

    Thank you for your time,
    Scott

    Plugin Contributor iSaumya

    (@isaumya)

    Scott,
    Your API Token Permission looks good to me. If you are using Cache Rules you really don’t need to use Worker.

    Thank you iSaumya for your reply!

    I’m still trying to finout out how to create an API token using the simplest settings possible. I’m created the API Token using the previous settings that were suggested when there were “Page Rules”, so now what is the fewest amount of settings needed to create an API Token for the Super Page Cache Plugin.

    Is it possible to get it listed somewhere in the plugin itself like the plugin use to have? Or, can you just list the simplest settings for API Token since certain things aren’t needed anymore.

    I would really appreciate it.

    Thanks,
    Scott

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.