Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Jaroslav Vaňkát
    @JVankat
    @mkcrandall:matrix.org perfect, just let me know if you have any other issues.
    mkcrandall
    @mkcrandall
    Well, now that you mention it, I may have spoken too soon. :)
    I seem to have solved the styling issue, but now I have an issue with submitting the search term. Neither ENTER nor the input button submits any query, or at least I don't get a results screen afterwards.
    Jaroslav Vaňkát
    @JVankat
    @mkcrandall - do you have a sample page where I could check this?
    mkcrandall
    @mkcrandall
    I do, but it's behind a login that I'd prefer to not post on an open forum.
    Jaroslav Vaňkát
    @JVankat
    @mkcrandall sure, if you can provide us an access, you can just invite us with mail@sitesearch360.com and I will try to check it asap.
    mkcrandall
    @mkcrandall
    Okay, I've sent it. I've got a js file (navb.js) that injects the navigation at the top of the page (so we can have a single file from which to change navigation globally on the site). You can use web tools to open the file and have a look if you'd like. The <section> tags for the search box as well as the <script> that calls it are injected into the page via that javascript file. At least that's the idea. The only time I've gotten it to work is when the <script> to call sitesearch360-v13.min.js (on your site) was actually part of the HTML of the page and not injected by the javascript on our site (navb.js)
    mkcrandall
    @mkcrandall
    Just posting to confirm you have the information you need. Did you receive the login credentials and are you able to access my test page?
    Jaroslav Vaňkát
    @JVankat
    @mkcrandall I got it, I don't really understand what's going on, but looks like the search plugin isn't being injected, let me look into it and I'll get back to you (and sorry for the delay, it's 10PM in our timezone).
    @mkcrandall okay, can you maybe try to execute the var e=document.createElement("script");e.async=!0,e.src="https://cdn.sitesearch360.com/v13/sitesearch360-v13.min.js",document.getElementsByTagName("body")[0].appendChild(e); part of the code directly in the navb.js instead of adding it as a part of the script tag inner text?
    mkcrandall
    @mkcrandall
    There's something undefined... Web developer kit says: "navb.js:155 Uncaught TypeError: Cannot read property 'appendChild' of undefined at navb.js:155"
    And Sorry, I was uncertain how late your support was available.
    Jaroslav Vaňkát
    @JVankat
    @mkcrandall got it, your navb.js is render blocking, that seems to be the issue, can you try using the following code in navb.js? https://pastebin.com/6LJMBFPq
    @mkcrandall no problem, just saying that it might take slightly longer for me to get back to you :)
    mkcrandall
    @mkcrandall
    I pasted the code you provided onto the end of the navb.js file (and removed the line that injected the HTML <script> so as not to duplicate it). No immediate change that I've noticed. I'll try changing the elements where the script injects things.
    That didn't seem to do anything either, so I reverted it back.
    Back to the <selection><input> elemenbts it was before, that is. The javascript executing in the navb.js file I've left as you suggested.
    mkcrandall
    @mkcrandall
    I'm wondering if the order this is executed in is the problem. Since the <section> element is being injected into the HTML by the same javascript that's executing the sitesearch360-v13.min.js, can the sitesearch360-v13.min.js not find a <section> element to write to when it is executed?
    If so, what would be the difference when the sitesearch360-v13.min.js script was embedded in the page HTML? (the search function works then) But even then, the elements that sitesearch360-v13.min.js is writing to were still not being written until the navb.js file wrote them to the HTML so... I'm not sure what the difference would be.
    Jaroslav Vaňkát
    @JVankat

    Sorry, forgot to change one thing, please try the following: https://pastebin.com/TAcZsa1K

    And let me look into the rest of your questions tomorrow morning, need a fresh pair of eyes.

    mkcrandall
    @mkcrandall
    Okay. Understood. Thank you for the effort. If you want, I can un-comment the <script> tags in the HTML. The styling gets a little off then, but the search function works then if it's useful for comparison. However, that will not be an idea solution as I'm hoping not to have to manually add that script tag to multiple hundreds of web pages, which is why we have a single javascript to inject shared content across all of them.
    Jaroslav Vaňkát
    @JVankat
    Hey @mkcrandall the search seems to be working, and the search box seems to have all classes now, are there still any issues for you?
    James
    @jmshey90
    @JVankat is there an easy way of changing the results links to relative?
    Jaroslav Vaňkát
    @JVankat
    @jmshey90 not really, you could try to use a postSearch (to replace the links by modifying the DOM), or a preRender (to replace the links directly in the search response) callback, but that would be the only options I can think of atm.
    James
    @jmshey90
    Thanks, I'll give them a go
    James
    @jmshey90
    PostSearch works for my purposes, thanks!
    Jaroslav Vaňkát
    @JVankat
    Perfect!
    mkcrandall
    @mkcrandall
    @JVankat Good morning (or good afternoon there). The search is only working because I uncommented the script that calls sitesearch360-v13.min.js that is part of the original HTML of the page. (Not injected by navb.js.) When the script is part of the original page, the search works. But I need to be able to inject it from an outside file (the navb.js) is the problem. When I remove the script from the actual page code and try to inject it solely with a javascript, that's when it won't work.
    Jaroslav Vaňkát
    @JVankat
    @mkcrandall and did you try the last code I've sent you? Otherwise I'm not at my computer anymore, so I'll be able to take a look on Monday.
    mkcrandall
    @mkcrandall
    If you're referring to the code here: https://pastebin.com/TAcZsa1K then, 'yes' and sadly, it did not seem to change the results. (The results being that sitesearch360-v13.min.js is still not being executed on the page.)
    Jaroslav Vaňkát
    @JVankat
    @mkcrandall looks like I didn't save the changes on Pastebin, please try the following one - https://pastebin.com/LSnfnQ8K
    mkcrandall
    @mkcrandall
    @JVankat Great! We've made headway! Thank you. This does execute the search function, however all it displays are the page image (or placholder icons) and the title. There is no sample text with the search term(s) highlighted as previously. I've been looking through your ss360Config configuration options and I'm not finding what I assume is missing that's causing this result. Any ideas?
    Jaroslav Vaňkát
    @JVankat
    @mkcrandall the search snippet is not being extracted since it's diabled in the control panel under search settings.
    mkcrandall
    @mkcrandall
    Great! I love an easy answer and an easy fix! :) That was probably changed when I was poking around trying to troubleshoot it last week.
    Now I just need to re-adjust the CSS. Do I need to call the CSS separately (with it's own .css file), or can I put a long string of it in the ss360Config settings using the "additionalCss" parameter? Which would you suggestion?
    Which would you suggest, that is. still waking up and my typoes are showing that.
    Previously I'd been calling the CSS from it's own .css file.
    Jaroslav Vaňkát
    @JVankat
    @mkcrandall having this in an own .css file is the better approach in my opinion, as long as this is easy enough for you to manage. The additionalCss parameter is mainly there to target some specific use-cases where the customer cannot easily access the site's stylesheets.
    mkcrandall
    @mkcrandall
    Yeah, I think that visually, it be much easier to manage and edit/troubleshoot that way too as opposed to having it all crunched into one long string. Thank you.
    Jaroslav Vaňkát
    @JVankat
    @mkcrandall definitely, also you don't need to worry about string escaping :) Glad to help, just let me know if you run into any other issues.
    AEKercher
    @AnneKercher
    Hello. We have many pages behind a custom login. I entered our login url, the login "form" xpath, as well as the username and password inputs and values. However, when I try to index a password protected page, it just indexes our login page (protected pages redirect to login page). Could you please advise on how to get this working?
    Jaroslav Vaňkát
    @JVankat
    Hi @AnneKercher - we don't currently support custom login screens that just trigger custom JS handlers (so basically a POST request on the form submit is required), might that be the issue here?
    AEKercher
    @AnneKercher
    @JVankat I dont think so. Our login Submit button sends a POST request to our login api and returns a token. our login inputs are not in their own form (they are in the main page form). Would that have something to do with it?
    Jaroslav Vaňkát
    @JVankat
    @AnneKercher can you send me a link to the login page? I will take a look.
    AEKercher
    @AnneKercher
    Jaroslav Vaňkát
    @JVankat
    @AnneKercher thank you, I'll take a look and will get back to you in ~30 minutes.
    Jaroslav Vaňkát
    @JVankat
    @AnneKercher looks like we don't currently support this type of authentication, I think the authentication should be rather easy to enhance on our side, but let me take a deeper look and I'll get back to you tomorrow.
    AEKercher
    @AnneKercher
    @JVankat Thank you. I could possibly modify our login page code behind to recognize when the requests are coming from your crawler, and authenticate then, but would need more info on how your crawler is indexing. I am trying to find a way to utilize the SS360 crawling capability as much as possible, so any suggestions on how to get your crawler to see our protected pages would be appreciated.
    Jaroslav Vaňkát
    @JVankat
    @AnneKercher we do use the Mozilla/5.0 (compatible; SiteSearch360/1.0; +https://sitesearch360.com/) user agent, and the IPs listed over here, if that's helpful. But if you can wait until tomorrow, then I'll definitely look into it since a very similar request came to our mail support earlier today.
    AEKercher
    @AnneKercher
    @JVankat Yes it can wait until tomorrow, thank you.