Jump to content
entschleunigung

Search function on Windows

Recommended Posts

hi,

i have a strange problem with the search since we had to move to a windows server. what worked fine before, now throws out the following error message:

Error: Exception: SQLSTATE[HY000]: General error: 3696 The regular expression contains an unclosed bracket expression.

the whole thing runs under
Windows Server 2016 (x64) EN
MySQL 8.0.15
PHP 7.2

it is the normal search.php of PW 3.0.213.
i googled a bit but couldn't find anything to help me. has anyone experienced anything like this?

 

greetings

Share this post


Link to post
Share on other sites

ProcessWire currently might not be compatible with this version of MySQL as the RegEx engine is not the same between MySQL 5.x and MySQL 8.x.

Could you paste the full call-stack ?

 

Share this post


Link to post
Share on other sites

hi flydev,

Error: Exception: SQLSTATE[HY000]: General error: 3696 The regular expression contains an unclosed bracket expression. (in D:\inetpub\wwwroot\default\wire\core\PageFinder.php line 416)

#0 D:\inetpub\wwwroot\default\wire\core\Wire.php(386): ProcessWire\PageFinder->___find(Object(ProcessWire\Selectors), Array)
#1 D:\inetpub\wwwroot\default\wire\core\WireHooks.php(723): ProcessWire\Wire->_callMethod('___find', Array)
#2 D:\inetpub\wwwroot\default\wire\core\Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\PageFinder), 'find', Array)
#3 D:\inetpub\wwwroot\default\wire\core\PagesLoader.php(248): ProcessWire\Wire->__call('find', Array)
#4 D:\inetpub\wwwroot\default\wire\core\Pages.php(238): ProcessWire\PagesLoader->find('has_parent=1, t...', Array)
#5 D:\inetpub\wwwroot\default\wire\core\Wire.php(386): ProcessWire\Pages->___find('has_parent=1, t...', Array)
#6 D:\inetpub\wwwroot\default\wire\core\WireHooks.php(723): ProcessWire\Wire->_callMethod('___find', Array)
#7 D:\inetpub\wwwroot\default\wire\core\Wi

This error message was shown because: you are logged in as a Superuser. Error has been logged.

thanks for the moment.

 

Share this post


Link to post
Share on other sites

I tested your setup in a VM but with a Linux distribution instead of a Windows and as a result , ProcessWire run smoothly on it, even the default search feature.

I will install a Windows server today just to see if there is an extension which could mess the setup. Stay tuned..

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
5 hours ago, entschleunigung said:

because I can't get any further here, maybe @ryan has some other idea what to do here to make the search work?

You can post an issue on github, as Ryan may not see this here in the post. But he will see it on Github!

  • Like 1

Share this post


Link to post
Share on other sites
16 hours ago, horst said:

You can post an issue on github, as Ryan may not see this here in the post. But he will see it on Github!

i have unfortunately not yet dealt with github, so far i have been able to ignore it successfully.
if someone wants to do that, i would be very grateful. 

thx

  • Haha 1

Share this post


Link to post
Share on other sites
6 minutes ago, entschleunigung said:

if someone wants to do that, i would be very grateful. 

Well, that would not be a problem at all, but don't you think this would be a good opportunity to create an account there and simply click the "new issue" button on your own (https://github.com/processwire/processwire-issues/issues) to show that you are willing to help resolving this issue? Using GIT was one the the major steps forward in the last few years for myself, so I'm quite sure you won't regret.

PS: I haven't followed this topic; I'm sorry that I can't provide any help.

  • Like 2

Share this post


Link to post
Share on other sites
24 minutes ago, bernhard said:

Using GIT was one the the major steps forward in the last few years for myself, so I'm quite sure you won't regret.

thank you for your encouraging words, thx.

 

  • Like 1

Share this post


Link to post
Share on other sites

Sorry mate, still not downloaded a Windows image as I am now on a 4G router, no more fiber 😞 I have to retrieve it from a friend this afternoon or tomorrow, again stay tuned 🙂

  • Like 2

Share this post


Link to post
Share on other sites
7 minutes ago, flydev said:

Sorry mate

all well, don't stress yourself.
probably you are faster with your download and the installation than i learned github 🙂

  • Haha 2

Share this post


Link to post
Share on other sites
On 5/21/2019 at 8:07 AM, entschleunigung said:

 


Error: Exception: SQLSTATE[HY000]: General error: 3696 The regular expression contains an unclosed bracket expression.

 

I'm having the same issue on a CentOS build using a stack from Bitnami. I only get this error when I search with less than four characters.

Have you had any luck with discovering the bug?

Thanks,

Vivian

Share this post


Link to post
Share on other sites

@entschleunigung and/or @Vivian  Please create an issue on the processwire-issues repository on Github for this, as it needs to be looked at.

@entschleunigung If you don't have a github account, just sign up for a free account, then follow the numbered steps on this page to add the issue to the issues repository.

Thank you for your co-operation!

  • Like 2

Share this post


Link to post
Share on other sites

ryan had helped me a few weeks ago via PN. sorry that i didn't write the solution in the forum before. i hope it's no problem that i write the private message here.

Quote

MySQL's default minimum length for words in a fulltext index is 4 characters, so words under 4 characters aren't going to work unless you reduce that ft_min_word_len setting in MySQL and have it re-create the indexes. Now it doesn't usually throw an Exception, but there are a lot of settings and versions available for MySQL and MariaDB so perhaps your MySQL version or config is more strict in this regard. That's not a bad thing in this case, as it's good to know you've got a word that can't be searched. What I'd suggest doing is changing your operator from "~=" to "%=". If you need word-independent placement matches like ~=, remove your existing $sanitizer->selectorValue and you can do this:

$selector = '';
$words = explode(' ', $q); 
foreach($words as $word) {
  $selector .= "title|teaser|body%=" . $sanitizer->selectorValue($word) . ", ";
}
$selector = rtrim($selector, ", "); 

 

  • Like 3

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...