-
-
Notifications
You must be signed in to change notification settings - Fork 851
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linkwiz update (#3498) #3499
Linkwiz update (#3498) #3499
Conversation
Linkwiz Searches title if useheading option is 1 or content
The solution in the above commit #4668fa1 looks strange: I mean if 'useheading' option is 'always' or 'content' we must ALWAYS search first pagetitles and either not search by pagenames at all or amend the pagenames search results with the results from mandatory pagetitles search, no? |
I was actually afraid to make big behavior change, since this was my early contribute. That's why I made this function as 'sub function' - Whan search fails, it will look for pagetitles. So your suggestion is that ONLY search with pagetitles when 'useheading' is 'always' or 'content', right? I agree with this, and will make changes if this is right. |
Yes. To be explicit:
The only point I am not clear myself is: can we only search first heading on the page in p.2 above, when 'useheading' is 'always' or 'content'? If yes it would be perfect. If not, still the above logic would be great step forward compared to current reality, when headings are completely ignored by the link wizard at all! Hope it clarifies |
Okay, I've made changes to linkwiz always seaches with pagetitles, if 'useheading' option is 'always' or 'content'. I decided to keep original search function with pagenames - Since there can be some pagetitles that contains special characters can't be entered with keyboard easily. (I meant ALWAYS instead of ONLY in above comment...) |
Thank you @alexdraconian |
@sokolgeo Right. If you encounter any bugs, please let me know. |
Does not work.
Now In the link wizard I can see the first headings of my wiki pages listed, as it was originally, but entering these heading into search box in the link wizard results in "Nothing was found.". Anything else I can try to make this work? Any explicit ways to reset the browser cache or anything else? |
Can you test if this works? If you can, please open Note: You don't have to rebulid index and discard browser cache. In my case, just patch |
This made the trick! All seems to be working as it should now! Thank you @alexdraconian
This was already correctly stored without quotation marks, thank you for the tip.
Thank you. Can you please update the commit with 2 equal signs? How could it land in the main tree for the next official release? |
I've updated and commit changed code. Since I'm first-time contributor, maintainer must approve this pull request. I can't sure if this update become part of next release; I'm just contributor. |
Thank you for the patch @alexdraconian |
For your information, you can wrap you code in a action plugin that uses the search_query_pagelookup event if you don't want to wait for the approval. |
This is pull request about issue #3498.