nilsnolde / wordpress-markdown-git

:loop: WordPress plugin to add file content (Markdown, Jupyter notebooks) from a Git based VCS to a WordPress post; replaces https://github.com/gis-ops/md-github-wordpress
GNU General Public License v3.0
48 stars 14 forks source link

since update: error message that I reached API call limit #31

Closed LuiseFreese closed 3 years ago

LuiseFreese commented 3 years ago

Versions Wordpress: 5.7.2 Documents for Git: 2.0.0

Describe the bug

I get this message on my posts, but no consistently. I authenticated with my GitHub username and a personal access token. I don't think that I reach 1000 calls/hour.

{"message":"API rate limit exceeded for 81.169.144.135. (But here's the good news: Authenticated requests get a higher rate 
limit. Check out the documentation for more details.)","documentation_url":"https://docs.github.com/rest/overview/resources- 
   in-the-rest-api#rate-limiting"}

image

site: m365princess.com/how-to-beautify-your-power-apps/ (and other posts, of course)

Paste the shortcode and the censored contents of config.json

As there is no config.json anymore, I will copy the new settings section:

image

The posted shortcode is [git-github-markdown url="https://github.com/LuiseFreese/blog/blob/main/PowerApps-beautify.md"] shortcode

To Reproduce Steps to reproduce the behavior:

  1. go to https://m365princess.com
  2. select the first blog post "How to beautify your PowerApps"

Expected behavior should render my blogpost from https://github.com/LuiseFreese/blog/blob/main/PowerApps-beautify.md

Screenshots

Additional context

nilsnolde commented 3 years ago

sorry for the long wait @LuiseFreese.. Hm, I can't reproduce on my end. When I install the official latest version I can access my private github repos with the credentials set (same as you). I recently got a warning from github about old-style access tokens getting deprecated (apparently they introduced a new token generator); can't remember what exactly it said, but maybe try to generate a new access token? Other than that I don't see anything wrong in your setup, so I hope it's that:)

btw, just a suggestion: 60 seconds cache is quite low. what I usually do (lacking dynamic web hook cache abilities still): set it to 1 day or so and adjust the TTL setting manually by a second in case I really want the update to happen right away (changing a General setting will invalidate the cache). that way caching is still somewhat effective and I don't have to worry that markdown updates are waiting forever if I forget to invalidate the cache manually.

nilsnolde commented 3 years ago

I just tested your blog post on my local WP instance and it works fine for me ([git-github-markdown url="https://github.com/LuiseFreese/blog/blob/main/PowerApps-beautify.md"]). And yeah that one doesn't seem to render on your site. I'm fairly sure it has smth to do with your specific Github token. Let me know if this persists.