Skip to content
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

Sidebar Search not working with Elementor Pro #55

Open
curtd59 opened this issue Jan 27, 2023 · 8 comments
Open

Sidebar Search not working with Elementor Pro #55

curtd59 opened this issue Jan 27, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@curtd59
Copy link

curtd59 commented Jan 27, 2023

Pretty sure this is my fault, but I don't know what I might have done. ;)

  1. Admin -> Docspress -> Settings -> Sidebar->"Display Search" is checked. So is Sidebar -> Ajax.
  2. File System -> Plugins > Docspress -> Templates -> Single -> Sidebar.php appears correct and unmodified.
  3. When displaying the page containing the DocsPress Article Block, the search field renders, the TOC renders, and the Content renders ...
  4. But there is no submit button. And no js/ajax appears to activate upon typing or "enter". No results appear. But...
  5. The console displays the following error:
script.min.js?ver=2.3.0:1 Uncaught TypeError: Cannot read properties of undefined (reading 'outerHTML')
    at Object.success (script.min.js?ver=2.3.0:1:1083)
    at c (jquery.min.js?ver=3.6.1:2:28327)
    at Object.fireWith [as resolveWith] (jquery.min.js?ver=3.6.1:2:29072)
    at l (jquery.min.js?ver=3.6.1:2:80045)
    at XMLHttpRequest.<anonymous> (jquery.min.js?ver=3.6.1:2:82499)

  1. And the Search form HTML looks correct:
        
    <form role="search" method="get" class="docspress-search-form" action="https://naturallawinstitute.com/">
        <input type="search" class="docspress-search-field" placeholder="Type to search" value="" name="s" autocomplete="off">
        <input type="hidden" name="post_type" value="docs">
        <input type="hidden" name="child_of" value="263501">                           
    </form>
    <div class="docspress-search-form-result"></div>
        

Advice?
Thanks.

@nk-o
Copy link
Collaborator

nk-o commented Feb 3, 2023

Hey.

Not sure, but maybe it somehow depends on the custom Docs template? I have tested it with a standard TwentyTwenty-Three theme and search is working fine.

Regards, nK.

@curtd59
Copy link
Author

curtd59 commented Feb 3, 2023

Happens with either the stock or custom template.
The JS jQuery that tries to find the outerHTML, can't find the outerhtml, so it means it can't find the element.
Its in the minimized js:

.find(".docspress-search-list").get(0).outerHTML;s.next(".docspress-search-form-result").html(t),

So this looks fine to me. It should find it. :(

`

<div class="docspress-single-sidebar-wrap">
        <form role="search" method="get" class="docspress-search-form" action="https://naturallawinstitute.com/">
            <input type="search" class="docspress-search-field" placeholder="Type to search" value="" name="s" autocomplete="off">
            <input type="hidden" name="post_type" value="docs">
                     <input type="hidden" name="child_of" value="263501">                            
        </form>
        <div class="docspress-search-form-result"></div>
 </div>
( ... )`

@nk-o
Copy link
Collaborator

nk-o commented Feb 6, 2023

The problem here is in the page rendering. When we open the page with specific parameters, the search template should be rendered from our plugin. For example, our Visual Portfolio site uses DocsPress, and when you open this link - https://visualportfolio.co/?s=term&post_type=docs you will see that this page contains an element with class docspress-search-list

When we open a similar link on your site https://naturallawinstitute.com/?s=term&post_type=docs it renders the standard search template from your theme.

@curtd59
Copy link
Author

curtd59 commented Feb 8, 2023 via email

@curtd59
Copy link
Author

curtd59 commented Feb 12, 2023

So the question is, then why isn't the right search page being rendered?
I have the same problem with the home page. Why isn't the right home page being rendered?
Where are these controlled (set)?

@nk-o
Copy link
Collaborator

nk-o commented Feb 17, 2023

Most probably something is conflicting. Try to test this on a standard theme Twenty Twenty Three and with disabled 3rd-party plugins.

@mrkohan
Copy link

mrkohan commented Jan 2, 2024

I've identified a conflict between this plugin and Elementor Pro, but I haven't pinpointed the exact cause yet.

@curtd59
Copy link
Author

curtd59 commented Jan 6, 2024 via email

@nk-o nk-o changed the title Sidebar Search not working Sidebar Search not working with Elementor Pro May 17, 2024
@nk-o nk-o added the bug Something isn't working label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants