WDE0025 error

Hi Everyone,
I’m trying to create a search bar for our company intranet. I need the bar to search the enitre site, however I would be happy to just search any documents on the site.
I’m receiving the following error: WDE0025: The masterPage collection does not exist. You cannot work with a collection using the Data API before it is created in the Editor.
My question is how do I create a collection in the Editor?

Hi reception,
This article should help you get started: [CMS (Formerly Content Manager): Getting Started | Help Center | Wix.com](CMS (Formerly Content Manager): Getting Started | Help Center | Wix.com

Thank you.

Thing is I do have content manager already set-up. I have the various AnyFile applications installed, which hold various documents, I want the search bar to search through those documents for if any staff member is looking for a document.

I’m very new to this, we have an intern who is studying coding, so he has been trying to help - my code could be completely wrong.

This is my current code, it is no longer giving me the error (I added “anyFile” items after I submitted this post), however I can’t get it to return any information when searching.

Note this is on the masterPage

import wixData from ‘wix-data’ ; // Filename: public/searchBar.js import wixSearch from ‘wix-search’ ; import wixSite from ‘wix-site’ ; wixData.query( “masterPage” ) // .find( “anyFile1” , “anyFile2” , “anyFile3” , “anyFile4” , “anyFile5” , “anyFile6” ) .then( (results) => { let elem = wixSite.getSiteStructure(); let pages = elem.pages.map(obj => obj.name); console.log(results.items); let filterBuilder = wixSearch.filter(); let myFilter = filterBuilder.hasSome( “phrase” , true ); console.log(results.items); });

Hopefully this helps you to help me :slight_smile: