Search

I wouldn't know how to fix myself though.

It's just a case of stripping tags and running through various string checks. Use the XSS filter extension as a guide. I simply don't have the time to install, set up test cases and fix an extension I'm deprecating.

Neither do I really, I'm packing to move house ;o)

I'm packing to move house ;o)

I hope you have a little house or a big box ;-)

Many many little boxes ;o)

For those of you looking for the ultimate search solution and have the flexibility on your server, please check out Nick's latest extension (which he has invested an enormous amount of time into): ElasticSearch

Hi, everyone! Just yesterday I've made public my first site (world-of-stones.ru). First of all, big thanks to all the developers of Symphony!
Here, I would like to share the remedy to an issue I've stumbled against while testing the Search Index extension.
I should admit that I'm not a PHP guru. The fix, description of which will be present at the end of this post, was suggested by my friend, who, amazingly, spent just a couple of minues to figure it out.
All my site's SQL tables have character_set set to utf8 and collation set to utf8_general_ci.
And the following directives are present in the .httaccess file:

  • php_value mbstring.internal_encoding UTF-8
  • php_value mbstring.func_overload 2

And most things worked fine, except that when I tried to search by a word (in Russian lang) which matches the name of one of my pages, then I was given the following error message:

 mb_strpos() [function.mb-strpos]: Offset not contained in string


An error occurred in /home/users1/n/nshmakov/domains/world-of-stones.ru/extensions/search_index/lib/class.search_index.php around line 728

723: echo "n###pos=";
724: print_r($pos);
725: echo "n###endn";
726:
727:
728:             return mb_strpos($str1, $str2, $pos);
729:         } else {
730:             return strpos($str1, $str2, $pos);
731:         }
732:     }.

To make long story short, the remedy was this:

In the file class.search_index_php in the body of function parseExcerpt($keywords, $text).
the expression (line 399)
$p = $match[0][1];
was replaced by
$p = $match[0][1]/2; 

PS I'm using the latest version of Symphony (2.2.5) and of the Search Index extension.
PS2 There is no preview button in this forum :-o ?

Because the CKEDITOR makes entities of text, I've a problem when I search a term and an entity is near to the end of the index field, the entity is cutted and the result is the error "loadXML(): Input is not proper UTF-8, indicate encoding !". Solutions?

How could I hide the Search Index Menu in the back-end from non-admin authors?

At each element of the navigation add this pair:

'limit' => 'developer'

eg:

return array(
    array(
        'location'  => __('Search Index'),
        'name'      => __('Indexes'),
        'link'      => '/indexes/',
        'limit'     => 'developer'
    ),
    array(
        'location'  => __('Search Index'),
        'name'      => __('Synonyms'),
        'link'      => '/synonyms/',
        'limit'     => 'developer'
    ),
    array(
        'location'  => __('Search Index'),
        'name'      => __('Logs'),
        'link'      => '/logs/',
        'limit'     => 'developer'
    ),
);

Will this extension work on 2.3 already? I’m surprised not to find it at the symphonyextensions site, how come? Hope Nick is not leaving this jewel in the dirt because of his even more exciting elastic search :)

He's already declared he's depreciating it. He's not planning on providing extended support - so hope someone else will.

Hope Nick is not leaving this jewel in the dirt because of his even more exciting elastic search

Yep!

Sorry, I missed Nick’s statement. Hope so too! :{ Still thanks!

Search Index is the only extension left that I’m missing on 2.3. I’d love to help making it compatible, but I wouldn’t know where to start, and my PHP-skills are rather basic. Maybe we should make this a kickstarter project? :)

Hello,

I have a problem. I want to show 2 articles a page. So as the README says I change my search form to this :

<div id="search">
  <form method="get" id="searchform" action="http://test.tamarawobben.nl/search-page/" >
   <input type="text" value="" name="keywords" id="s" class="txtField" />
   <input type="submit" id="searchsubmit" class="btnSearch" value="Find It " />
    <input type="hidden" name="per-page" value="1" />
 </form>

`

But still the pagination xml shows 20 articles. What did I do wrong ?

You've been asked before to not post the same issue on multiple threads. The issue is not related to the Search Index extension, it's related to pagination as you have asked elsewhere.

Unless the data source you're trying to paginate, and limit, is the Search Index data source?

Yes, I try to paginate the Search index DS because I use this for my search function on my site.

I'm having a problem using multiple sections in the front end submission form. My search form has a hidden input field with multiple comma separated section names (value="section1,section2"). When the form is submitted (via GET), the resultant URL shows each section name separated by %252C, not the comma that it should be.

Replacing %252C with a comma in the URL gives the correct results. Is this a known bug?

Does anyone know which file I need to alter to change the encoding rules?

Thanks

Sorry, ignore that last post. If anyone else is having the same problem it seems it's easily remedied by using a relative rather than absolute path in the action attribute of the form. Thanks to @s_e for posting the fix here:

Thanks for a fantastic extension Nick!

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details