PontusHorn / Pico-Search

Simple search feature for pages in your Pico CMS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Are files in categories folder searched?

paulomorais1981 opened this issue · comments

HI,

I've created search.md, search.twig and the form in index.twig just exactly this readme says.

But when I click search or when i write "localhost:8000/search/something", I get back to home, always.

My posts are on subfolders of content folder. I've done this to create the categories. It's all working fine, except the search form.

Does the search form searches inside the categories folder or i have to set something up?

Thx

Well, i've tested so much the plugin, but instead of what readme says, i can't access the search by typing localhost/search/foobar, but only if localhost/?search/foobar.

The ? can't be forgotten. So, the search form is not working, and I don't know yet how to fix it.

Hey! Sorry to hear about the problem.

I haven't been working actively with Pico for a while, but I just tried doing a fresh Pico install and added the plugin according to the readme, and it all seems to work well for me. What version of Pico are you using? I believe Pico 1.0 introduced some changes to the URL handling, so if you're using 0.9 or lower that might be the issue.

I'm using Pico 2.0 and having the same issue.

I can't reproduce this problem. Is URL rewriting working in the rest of your Pico installation? That is, do your other URLs look like domain.com/sub/page or domain.com/?sub/page?

Hey @PontusHorn,

Just adding my voice that I am also experiencing this issue, but slightly different. I can't search at all. I just get my 404 page when trying to search. If I go to /search directly, I will display every page on my site. Additionally, the search_excludes option does not work in my config.yml file.

Using Pico 2.0.4, via manual install.

What can I collect or provide to help troubleshoot this?

Hey @jonwgeorge

I think it can be a mod_rewrite and AllowOverride's apache2 thing. In the other forum, i've found a solution, read this:

picocms/Pico#495

My files mod_rewrite is working fine. I don't think I have access to AllowOverride with my host, but I would assume it is already enabled.

I solved the problem with this solution:

Looks like the plugin requires URL rewriting to be enabled. Please refer to http://picocms.org/docs/#url-rewriting to enable URL rewriting.

Sorry for the delay on this.

I adjusted the search form example in the readme slightly to account for URL rewriting being disabled. Does that cover everyone's issues?

I'll take that as a yes and close this, but feel free to open a new issue if you're still experiencing issues.