Project

General

Profile

Actions

Bug #20388

open

Help with Debugging Relanvanssi Plugin

Added by Laurie Hurson 24 days ago. Updated 23 days ago.

Status:
New
Priority name:
Normal
Assignee:
-
Category name:
-
Target version:
-
Start date:
2024-05-23
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

Hi All,

A user is working with the Relevanssi plugin on this site:

https://fysresourceguide.commons.gc.cuny.edu

They would like to have the excerpts in the search results contain the keyword that was searched, which the plugin claims to do. For example, if you searched the term "google" the excerpt on the post returned in search would pull the section of the post that contains keyword "google".

As far and I can tell, the only page that contains content so far is "Time management" here:

Page: https://fysresourceguide.commons.gc.cuny.edu/study-skills/time-management/

I also created tests post to see if results would vary by content type (no)

Test Post: https://fysresourceguide.commons.gc.cuny.edu/uncategorized/time-management-no-accord/

Additionally, for some reason when I search "time management" I only get one search result, even though there are multiple pages and posts with that title.

https://fysresourceguide.commons.gc.cuny.edu/?s=time+manangement

I am wondering if all these issues are related to database connections the plugin requires. See here for possible issue with query post: https://www.relevanssi.com/knowledge-base/query_posts/

So three questions:

1.Are you able to determine if the relevanssi plugin is working at all? I do not see any indication it is working on the site, unless it is causing these issues.

2. Most importantly, is it possible to get the search keyword to appear in the excerpt on returned search results? That is the role of the plugin, Relevanssi, but I cannot figure out the options to do this and/or identify the bug.

3. Is the returning only one search result (when there should be many) a related issue or something else?

Thanks for any insight you can provide!

Actions #1

Updated by Colin McDonald 24 days ago

Hi Laurie, has the user in question followed the initial setup steps here, including building the index?

https://www.relevanssi.com/user-manual/installing-relevanssi-and-adjusting-the-settings/

They may be able to get closer to what they want to achieve by adjusting certain settings, also.

Actions #2

Updated by Laurie Hurson 24 days ago

  • File Screenshot 2024-05-23 at 2.08.51 PM.png added

Hi Colin,

Thanks for this question. Yes, I re-ran the indexing process and it still will not hightlight the keyword search term in the excerpts returned in search.

I guess the question I should have asked was: will this plugin work on a site within a multisite, and is there a possible issue with the "query-posts" call the plugin uses?

The user keeps suggesting i need to "make sure the template is using the the_excerpt() function and not the_content()" but I haven't been able to figure that out and that seems like a issue with the functions.php file, which should be changed by the plugin, not manually on our end.

I have toggled with the options in multiple ways but I cannot seem to change any of the search results outputs. I'll keep poking at it and will be interested to know if there is a bug or code-level issue that makes this plugin unworkable on the commons.

Thanks

Actions #3

Updated by Laurie Hurson 24 days ago

  • File deleted (Screenshot 2024-05-23 at 2.08.51 PM.png)
Actions #4

Updated by Colin McDonald 23 days ago

Hi Laurie, thanks for the extra info. I'm adding Boone and Ray as watchers here. They'll best to speak on the multisite question, and probably some of the other technical questions about Wordpress hooks and the like. I'm worried this user may be looking for code customizations beyond what we usually offer, but we'll see what they say.

Actions #5

Updated by Laurie Hurson 23 days ago

Thanks Colin.

Sorry, I am a bit scattered this week. I should have added that the user originally asked about this from the documentation: "To see the excerpts, make sure your search results template is using the_excerpt(). If your search results template uses the_content() or something else to show the post content, it’s possible you won’t see the Relevanssi excerpts."

https://www.relevanssi.com/user-manual/installing-relevanssi-and-adjusting-the-settings/

I do think that customizing the "search results template" that the user was asking about may require editing search.php files, which I don't think will be possible. I just wanted to make sure my understanding was correct. It just seems strange that a plugin would require php file editing to function? See here re: editing php files.

https://generatepress.com/forums/topic/how-to-customize-search-results-template-to-add-relevanssi-excerpts/

I know we have the groups redesign release coming out soon -- this is not pressing.

Actions #6

Updated by Boone Gorges 23 days ago

Thanks for the ping. By the looks of things, this is a limitation of Relevanssi when combined with full block themes like Twenty Twenty Three (running on the site in question). See the 'Excerpts' section at https://www.relevanssi.com/knowledge-base/gutenberg-full-site-editing/. Unfortunately, I think that the Commons team can't be in the business of putting global fixes like this into place, since they may have side effects across the site (including potential security issues) that are difficult to predict. If the user needs this functionality, they might consider a different theme. It's also possible that Relevanssi itself will ship a global fix in a future version.

Actions

Also available in: Atom PDF