All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Building index triggers error (LS 5.0 and EE 3.1.1)

Derek 22 Jan 2016 16:04 problem, complete

Just setting up some collections for the first time using Low Search 5.0 and EE 3.1.1. I'm getting an error when trying to build either the index, lexicon, or both. When I click the "View Response" link, I get this:



When I try loading the Build Index URL directly, I get "Error: Invalid action" - yet when I look in exp_actions, the action ID in the URL is indeed there and registered to Low_search and build_index.

Replies

  1. Low 22 Jan 2016 16:12

    Weird, can't seem to replicate. I presume you're working locally?

    Derek 22 Jan 2016 16:17

    Aye, I am indeed. Anything I can investigate on my end?

    Low 22 Jan 2016 16:20

    Try and build the index with the build URL, appending &collection_id=1 to it (change the ID where needed). That should not give you the Invalid Action response.

    Also, if you look in your browser's inspector, do you see a JS error at all, or the response from the XHR request?

    Derek 22 Jan 2016 16:28

    When I append the collection_id to the build URL and load it directly, it works. Looking a the XHR, it's actually getting a 200 response, but the URL it's loading is just the URL to the Collections admin screen.

  2. Derek 22 Jan 2016 16:26

    Found the issue: if the CP session is set to cookies and session ID, indexing fails. Changing to cookies-only fixes it.

  3. Low 22 Jan 2016 16:28

    Ah, strange. Will investigate.

  4. Low 22 Jan 2016 16:38

    OK, to fix, open /low_search/javascript/low_search.js and look up line #45, which reads...

    var url = location.href.replace(/collections$/i, 'build');


    ...and change that to...

    var url = location.href.replace('low_search/collections', 'low_search/build');


    ...then save and reload.

  5. Derek 22 Jan 2016 16:46

    That did it, thanks Low.