Teaching Template Sites: Posts return 404 Error
Following up on this zen desk ticket: https://cunycommons.zendesk.com/agent/tickets/2807
When a Commons user sets up a new site using the teaching template, clicking into posts from the blog roll results in a 404 error. The teaching template comes with a static "home" page setup and posts re-routed to a page called posts. Luke has found that visiting Settings>Permalinks on a teaching template site will resolve the 404 error.
I was able to recreate this issue in the site linked below and I have not visited Settings>Permalinks so the error is not resolved.
Also, can we add Luke as a watcher here? (I am not able to add watchers.)
#1 Updated by Boone Gorges over 3 years ago
- Category name set to Blogs (BuddyPress)
- Status changed from New to Reporter Feedback
- Target version set to 1.14.6
Hi Laurie - Thanks for the detailed report. I've confirmed that the permalinks are the issue. I've added a programmatic permalink flush at the end of the cloning process, and deployed the changes to the production site. This appears to have solved it. Can you please confirm?
#2 Updated by Laurie Hurson over 3 years ago
I set up a new site (https://testing404fix.commons.gc.cuny.edu/posts/) and it appears to be working. No more 404 error when I click into a post from the blog roll (posts page).
I checked the error on the site made before the fix (https://testing404.commons.gc.cuny.edu/posts/) and it was still happening (likely because it was created before the permalink flush). When I visited Settings>Permalinks and clicked "save", this did reset the post links and they are accessible now. I did get a weird notification about updating my .htaccess file after clicking save on the permalinks page though (screenshot attached).
#3 Updated by Boone Gorges over 3 years ago
- Status changed from Reporter Feedback to Resolved
Thanks for confirming, Laurie!
I've seen the "you should update your .htaccess file now" issue before, on the City Tech OpenLab. Here's the ticket (private) http://redmine.citytech.cuny.edu/issues/1983 and https://core.trac.wordpress.org/ticket/39547 Since it doesn't affect functionality, I'll open a separate low-priority ticket and we can probably mark this one resolved.
CC Marilyn - if you get Zendesk reports like this, advise users to go to Dashboard > Settings > Permalinks and resave their existing settings.