Support #21122
closedQ & A Plugin permalink issue
0%
Description
I know that the Q & A plugin was deprecated awhile back. The Commons Help site is (I think) the only site that is still using it. We use it on four pages (example: https://help.commons.gc.cuny.edu/frequently-asked-questions-when-getting-started-with-the-commons/). We use the short code to pull FAQ by category. However, when a search is performed and the FAQ page is returned in the results, the permalink does not work. Actually none of the permalinks work, but this is only an issue when searching (since we use the short code).
For example, here we search by "existing site" (https://help.commons.gc.cuny.edu/?s=existing+site). The first result is a FAQ - its permalink does not resolve (https://help.commons.gc.cuny.edu/ faqs /attach-existing-site-to-group/) Even if you remove the /faqs/ the permalink doesn't work.
Is there an easy solution to this?
Updated by Boone Gorges about 2 months ago
- Assignee changed from Boone Gorges to Raymond Hoh
I spent a minute looking at this. The way that the plugin registers its post type causes some problems with the way it uses the 'taxonomies' flag when it registers a post type. But this alone didn't fix things on the production site - instead of 404ing, the site would then throw a white screen.
Ray, do you have a minute to have a look?
Updated by Raymond Hoh about 2 months ago
The issue is due to Q&A's wonky custom template loading when using a new-school block theme: https://github.com/cuny-academic-commons/cac/blob/9af2cb1c04fbbd784507ac7ef3c172a674118ad6/wp-content/plugins/q-and-a/inc/functions.php#L112-L119
Since twentytwentytwo
has a blank index.php
, that is what is causing the white screen of death. I commented out the custom template loading line -- https://github.com/cuny-academic-commons/cac/blob/9af2cb1c04fbbd784507ac7ef3c172a674118ad6/wp-content/plugins/q-and-a/inc/functions.php#L127 -- and that fixed things.