CMS Search strange behavior with Hungarian, Serbian Cyrillic and Serbian Latin languages

Issues related to the CMS tools of WYSIWYG Web Builder.
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/cms_tools.html
A lot of information about the Content Manager System can be found in the help/manual. Please read this first before posting any questions! Also check out the demo template that is include with the software.

CMS trouble shooting / FAQ:
viewtopic.php?f=10&t=43245
User avatar
Pablo
 
Posts: 20822
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: CMS Search strange behavior with Hungarian, Serbian Cyrillic and Serbian Latin languages

Post by Pablo » Tue Feb 11, 2020 12:31 pm

- make sure you have the latest version of WWB.
- enable Unicode in all objects (cms admin, cms view).
- set the character set of the page to UTF8
- set the character set of the database to UTF8

User avatar
NDV
 
 
Posts: 55
Joined: Sun May 19, 2019 8:27 pm

Re: CMS Search strange behavior with Hungarian, Serbian Cyrillic and Serbian Latin languages

Post by NDV » Tue Feb 11, 2020 6:17 pm

WWB 15.2.3
Unicode is enabled in all objects (cms admin, cms view).
Set page encoding to UTF8
Installed database encoding on UTF8
Example:
utf8_unicode_ci.sql
utf8_general_ci.sql
https://www.dropbox.com/sh/fpchcq69cwku ... q4xFa?dl=0

User avatar
Pablo
 
Posts: 20822
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: CMS Search strange behavior with Hungarian, Serbian Cyrillic and Serbian Latin languages

Post by Pablo » Tue Feb 11, 2020 6:54 pm

All settings are correct and see the generated code is Unicode compliant.
So, I think something is wrong on the database side or PHP configuration.

Here is an export of my test database:
https://www.wysiwygwebbuilder.com/support/CMS_PAGES.zip

User avatar
NDV
 
 
Posts: 55
Joined: Sun May 19, 2019 8:27 pm

Re: CMS Search strange behavior with Hungarian, Serbian Cyrillic and Serbian Latin languages

Post by NDV » Tue Feb 11, 2020 7:34 pm

Tried different databases.
Debian v8 MySQL 5.5.62, php5.6
Debian v9 MariaDB 10.3, php7.3

A simple set of rules to create a database

Code: Select all

CREATE DATABASE cmsdb CHARACTER SET utf8 COLLATE utf8_unicode_ci;
GRANT ALL PRIVILEGES ON cmsdb.* TO 'user'@'localhost';
FLUSH PRIVILEGES;
Also created databases via phpmyadmin.
To check, deleted and made a new.
Base utf8_unicode_ci
CMS_SEARCH_WORDS entries are present.
So I can’t imagine. Broken brain :(

What is strange is that extensions Bootstrap Table and MySQL CRUD, database search works and displays data.

Image

Image

User avatar
NDV
 
 
Posts: 55
Joined: Sun May 19, 2019 8:27 pm

Re: CMS Search strange behavior with Hungarian, Serbian Cyrillic and Serbian Latin languages

Post by NDV » Tue Feb 11, 2020 7:40 pm

Thanks for the dump (CMS_PAGES). I will look for an error.

User avatar
NDV
 
 
Posts: 55
Joined: Sun May 19, 2019 8:27 pm

Re: CMS Search strange behavior with Hungarian, Serbian Cyrillic and Serbian Latin languages

Post by NDV » Tue Feb 11, 2020 9:40 pm

Transferred a test page from the home server to hosting (php7.2). The host provider said php settings are correct. Cyrillic, search no result.
CMS_PAGES: Cyrillic, search no result.
Brain explosion. :mrgreen:

User avatar
Pablo
 
Posts: 20822
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: CMS Search strange behavior with Hungarian, Serbian Cyrillic and Serbian Latin languages

Post by Pablo » Wed Feb 12, 2020 7:34 am

Did you use my database?

User avatar
NDV
 
 
Posts: 55
Joined: Sun May 19, 2019 8:27 pm

Re: CMS Search strange behavior with Hungarian, Serbian Cyrillic and Serbian Latin languages

Post by NDV » Wed Feb 12, 2020 9:58 am

I tried your base CMS_PAGES on my Debian server. Cyrillic, вut the search is "no result". Latin Search works, ок.
After, i transferred the pages to paid hosting.
Errors appeared on the hosting when exporting the database CMS_PAGES, php7.2. Booted with errors, but worked. like last time - cyrillic вut the search is "no result". Latin Search works, ок. After, i created a new database, and WWB independently created my own tables, but no result.

Weekends will be a lot of time. I will do CMS.

User avatar
NDV
 
 
Posts: 55
Joined: Sun May 19, 2019 8:27 pm

Re: CMS Search strange behavior with Hungarian, Serbian Cyrillic and Serbian Latin languages

Post by NDV » Thu Feb 13, 2020 11:20 am

A familiar programmer helped
Invalid string
\W will not work Cyrillic utf-8.

Code: Select all

$word = preg_replace('/\W/', '', $word);
Replace, comment or delete out.
Deleted string. Search and Cyrillic works, ок!

User avatar
NDV
 
 
Posts: 55
Joined: Sun May 19, 2019 8:27 pm

Re: CMS Search strange behavior with Hungarian, Serbian Cyrillic and Serbian Latin languages

Post by NDV » Fri Feb 14, 2020 12:21 pm

Changed the line. Cyrillic search works, ok!

Code: Select all

$word = preg_replace('/\W/u', '', $word);
Or this code

Code: Select all

$word = preg_replace('/[^\w]/u', '', $word);

User avatar
Pablo
 
Posts: 20822
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: CMS Search strange behavior with Hungarian, Serbian Cyrillic and Serbian Latin languages

Post by Pablo » Fri Feb 14, 2020 12:31 pm

Thanks, I will investigate if this can be implemented in a future version.

bigdenis
 
 
Posts: 10
Joined: Sat Mar 02, 2019 11:09 am

Re: CMS Search strange behavior with Hungarian, Serbian Cyrillic and Serbian Latin languages

Post by bigdenis » Sat Feb 15, 2020 6:15 pm

I haven't figured out solution for this problem until today. In the meanwhile I made some CMS sites with this "half functional" search. I'm glad that NDV was so persistent and he has found the solution. I tested his solutions with corrected line in the script and I can say that the solution is perfectly working in CMS Search for Serbian Latin, Serbian Cyrillic and Hungarian languages too!
Pablo, please implement this solution in the future release! Thanks in advance.

User avatar
Pablo
 
Posts: 20822
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: CMS Search strange behavior with Hungarian, Serbian Cyrillic and Serbian Latin languages

Post by Pablo » Sun Feb 16, 2020 6:58 pm

The modification has now been implemented in the latest build (02/16/2020)
https://www.wysiwygwebbuilder.com/download.html

User avatar
NDV
 
 
Posts: 55
Joined: Sun May 19, 2019 8:27 pm

Re: CMS Search strange behavior with Hungarian, Serbian Cyrillic and Serbian Latin languages

Post by NDV » Mon Feb 17, 2020 1:32 pm

Thank you! :D

bigdenis
 
 
Posts: 10
Joined: Sat Mar 02, 2019 11:09 am

Re: CMS Search strange behavior with Hungarian, Serbian Cyrillic and Serbian Latin languages

Post by bigdenis » Tue Mar 03, 2020 7:48 pm

Thank you, Pablo!

Post Reply