#wordpress 2020-01-02
2020-01-02 UTC
[KevinMarks], [Michael_Beckwit, [tantek], [fluffy], [LewisCowles], sara_, [amy], [jgmac1106], dmcweeney, [grantcodes], gRegorLove, petermolnar and [CrowderSoup] joined the channel
# [CrowderSoup] I'm having a strange issue with WordPress that I'm wondering if anyone else has ever seen... It's an issue with getting a 404 for a post permalink.
# [CrowderSoup] My permalink setting is set to "Custom Structure" with this value: `/posts/%postname%/`
# [CrowderSoup] The post's permalink is https://crowdersoup.com/posts/1036/ (copied from the "Edit" page)
# [CrowderSoup] When when navigating to that page I get an "Oops! That page canβt be found." message.
# [CrowderSoup] However, for some reason it looks like I can use any of the other settings without issue.
# [CrowderSoup] Even just "Post name", which is just `/%postname%/`. So I'm kinda scratching my head here
chrisaldrich joined the channel
# chrisaldrich [CrowderSoup] I can see those posts in your /feed/; my preliminary guess is that it's a potential conflict with the way Post Kinds may be rewriting your URLs/permalinks?
# chrisaldrich are those missing posts done with a Kind assigned to them?
# [CrowderSoup] I made this particular post from "Indigenous" on android as a "Checkin", and it seems to be assigned in the WordPress UI.
# [CrowderSoup] It seems that adding *any* static text in the "Custom structure" breaks it. I just tried adding `test` instead of `posts` and same issue
# chrisaldrich The feed seems to indicate that the URL for that 1036 post is https://crowdersoup.com/2020/01/02/1036/, but that 404s too.
# [CrowderSoup] But JUST `%postname%` works fine.
# [CrowderSoup] Sorry, I'm messing with the permalinks a bit, so I changed it again
# Loqi [Aaron Crowder] Lunch date with Ruby!Crown Burger
#check-in #rubyjunehttps://crowdersoup.com/t/HG https://crowdersoup.com/wp-content/uploads/2020/01/1577992633044.jpg
# chrisaldrich When I look at your main page I see the crown burger checkin and it has the link https://crowdersoup.com/test/1036/
# Loqi [Aaron Crowder] Hey @bsdrocker, does this work? Trying to figure out more about this IndieWeb stuff.
#testing #twitterhttps://crowdersoup.com/b/6M
# chrisaldrich or it did since you're changing it as we chat...
# [CrowderSoup] I have been changing it, I'm going to leave it as just `%postname%` now, sorry! I didn't expect anyone to be helping so quickly π
# chrisaldrich GWG may also have some ideas about potential conflicts with the way Post Kinds maps WP's permalink structure.
# chrisaldrich Another potential issue you may be seeing is whether or not you're clearing your local browser cache as you test...
# [CrowderSoup] I'm wondering if it IS the post kinds plugin... I might disable it and try changing the permalinks back to `/posts/%postname%/` to see if it works
# GWG So /onthisday and /exclude/kind I believe
# chrisaldrich GWG, I fixed my issue (I think) and sent you a reply to your last note to test your whitelist thing...
# [CrowderSoup] That makes sense. I am going to try disabling it just to rule it out
# chrisaldrich Now I've just got to fix my theme again as somehow I've managed to accidentally update it in the process....
# [CrowderSoup] Yeah, it's definitely *not* the Post Kinds plugin.
# chrisaldrich [CrowderSoup], GWG is right, it shouldn't be a rewrite issue from Post Kinds.
# chrisaldrich Is it a new site with pretty permalinks on?
# chrisaldrich What are pretty permalinks?
# Loqi It looks like we don't have a page for "pretty permalinks" yet. Would you like to create it? (Or just say "pretty permalinks is ____", a sentence describing the term)
# [CrowderSoup] I've had the site for some time. I didn't start noticing the issue until recently
# [CrowderSoup] My `.htaccess` file seems right:
# [CrowderSoup] ```# BEGIN WordPress
# [CrowderSoup] # Any changes to the directives between these markers will be overwritten.
# [CrowderSoup] # The directives (lines) between `BEGIN WordPress` and `END WordPress` are
# [CrowderSoup] # dynamically generated, and should only be modified via WordPress filters.
# [CrowderSoup] <IfModule mod_rewrite.c>
# [CrowderSoup] RewriteEngine On
# [CrowderSoup] RewriteBase /
# [CrowderSoup] RewriteRule ^index\.php$ - [L]
# [CrowderSoup] RewriteCond %
{REQUEST_FILENAME}
!-d# [CrowderSoup] RewriteCond %
{REQUEST_FILENAME}
!-f# [CrowderSoup] RewriteRule . /index.php [L]
# [CrowderSoup] </IfModule>
# [CrowderSoup] # END WordPress
# [CrowderSoup] SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1```
# chrisaldrich [CrowderSoup] perhaps it's this? https://www.wpbeginner.com/wp-tutorials/how-to-fix-wordpress-posts-returning-404-error/
# [CrowderSoup] I've updated / saved the permalinks setting and my `.htaccess` file looks okay. Still seems to be an issue π
# [CrowderSoup] It only seems to be an issue when the permalink is a number. I update the permalink in question to be https://crowdersoup.com/posts/lunch-date-with-ruby/ and now it works fine for this post
# Loqi [Aaron Crowder] Lunch date with Ruby!
#check-in #rubyjunehttps://crowdersoup.com/t/HG https://crowdersoup.com/wp-content/uploads/2020/01/1577992633044.jpg
# [CrowderSoup] That definitely will help narrow down the issue at least
# [CrowderSoup] Oh, this seems to be my issue: https://wordpress.org/support/topic/bug-posts-with-only-numbers-in-slug-show-404/
# [CrowderSoup] Okay, so I think I found the issue. This plugin is really handy: https://wordpress.org/plugins/debug-bar-rewrite-rules/ (I didn't install the "Debug Bar", just used the admin interface)
# chrisaldrich Glad that you seem to have found a fix.
# [CrowderSoup] It seems that the first match is `index.php?year`
# [CrowderSoup] Or rather `year=$matches[1]`
# chrisaldrich I'm heading out for a bit, so hopefully others can help if you run into issues.
# [CrowderSoup] No worries π I appreciate all the help!
# [CrowderSoup] [chrisaldrich] ++
# [CrowderSoup] For anyone catching up, my issue only started happening recently because I just crossed into the "4 digit post ID" territory, and my custom permalink structure conflicted with a rewrite rule for post archives. For now I'm just going to change my permalink structure (not ideal) to play more nicely and not conflict with that rule.
[manton], Doppelgnger9068[ and simons joined the channel