hsqStephenZhang opened a new issue, #19765:
URL: https://github.com/apache/tvm/issues/19765

   Thanks for participating in the TVM community! We use https://discuss.tvm.ai 
for any general usage questions and discussions. The issue tracker is used for 
actionable items such as feature proposals discussion, roadmaps, and bug 
tracking.  You are always welcomed to post on the forum first :smile_cat:
   
   Issues that are inactive for a period of time may get closed. We adopt this 
policy so that we won't lose track of actionable issues that may fall at the 
bottom of the pile. Feel free to reopen a new one if you feel there is an 
additional problem that needs attention when an old one gets closed.
   
   ### Expected behavior
   
   Should be able to view the summary of search results at 
https://tvm.apache.org/docs/search.html
   
   (this was after my local fix)
   
   <img width="829" height="195" alt="Image" 
src="https://github.com/user-attachments/assets/11612d9d-c502-43fd-a4b7-16af1c59ca24";
 />
   
   ### Actual behavior
   
   No summary was shown, and many errors in browser's console on search.html 
page.
   
   <img width="1862" height="423" alt="Image" 
src="https://github.com/user-attachments/assets/4786b2be-bd09-4ec6-9390-7e2726bf4f5d";
 />
   
   ### Environment
   
   Just web browser.
   
   ### Steps to reproduce
   
   1. load page 
https://tvm.apache.org/docs/search.html?q=transform&check_keywords=yes&area=default#
   2. for each search result, there is no summary.
   3. inspect pages browser console(by `Cmd+Option+J` on Mac), and you will see 
the errors of `searchtools.js`.
   
   ## Reasons
   
   1. 
https://github.com/sphinx-doc/sphinx/blob/748a569f474f6295a95914d8729b6dd1aa02126b/sphinx/themes/basic/static/searchtools.js#L104.
 because each python object has `descr`, the `else if (showSearchSummary) ` 
will not be executed for matches of a python object.
   2. there are many errors like "Uncaught (in promise) TypeError: Failed to 
execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'. at 
searchtools.js:106:20" in browser's console, the reason is that 
`Search.makeSearchSummary` will return null in some cases and crash this 
`_displayItems` call. And the miss of `data-content_root` in page's template is 
responsible for the returning of null, where the contentRoot is undefined and 
the content fetch would look like `fetch("undefinedreference/api/python/...")` 
and return null.
    
   ## Solution
   
   As mentioned in the "Expected behavior" section, i have a local fix by:
   
   1. patched the `_displayItems` function provided by sphinx at `load` event.
   2. manually copied `layout.html` from the sphinx plugin and added a 
`data-content_root` attribute. 
   
   I'd like to submit the fix if it's wanted. I'd like to see if there are 
better solutions.
   
   ### Triage
   
   Please refer to the list of label tags 
[here](https://github.com/apache/tvm/wiki/Issue-Triage-Labels) to find the 
relevant tags and add them below in a bullet format (example below).
   
   * needs-triage
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to