I am using 3.0.3.2 version opencart and not default template.
I have a problem for search page. When i search a word includes Turkish characters like "ürün" first search page is working exactly but pagination links goes to not coded utf-8 link. Checked php.ini, htacess, files utf-8 without bom but couldn't solve this.
Can you give advice ?
Regards and wish healthy days.
Search first page is :
........&search=ürün&submit_search=&route=product%2Fsearch&description=true
Pagination link is :
.......search=%25C3%25BCr%25C3%25BCn&description=true&category_id=0&page=2
Have you checked .user.ini file and ensure, either, php.ini or .user.ini file do not end with semi-colon at the end of each lines? Is the:Checked php.ini, htaccess, files utf-8 without bom but couldn't solve this.
Code: Select all
default_charset = UTF-8
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Exactly checked all .ini files . There are no any semi colons either. Only this character coding problem occurs for search pagination. I have no seo module.straightlight wrote: ↑Sun May 03, 2020 9:49 pmhave you checked .user.ini file and ensure, either, php.ini or .user.ini file do not end with semi-colon at the end of each lines? Is the:Checked php.ini, htaccess, files utf-8 without bom but couldn't solve this.
also implicit in your php.ini or .user.ini file?Code: Select all
default_charset = UTF-8
Code: Select all
magic_quotes_gpc = Off
register_globals = Off
default_charset = UTF-8
memory_limit = 512M
max_execution_time = 36000
upload_max_filesize = 999M
safe_mode = Off
mysql.connect_timeout = 20
session.auto_start = Off
session.use_only_cookies = On
session.use_cookies = On
session.use_trans_sid = Off
session.cookie_httponly = On
session.gc_maxlifetime = 3600
allow_url_fopen = On
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
In your catalog/controller/product/search.php file,
find all instances of:
Code: Select all
urlencode
Code: Select all
utf8_encode
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Unfortunately it didn't solved.straightlight wrote: ↑Sun May 03, 2020 10:27 pmLet's try this (untested since I don't use the Turkish language).
In your catalog/controller/product/search.php file,
find all instances of:
replace all with:Code: Select all
urlencode
See if that solves the issue.Code: Select all
utf8_encode
My web link is below. You can see search word is "granül" in the link. When you go page 2 from pagination it shows hover link true but goes to word "gran%25C3%25BCl" . utf8_encode made the link like this at first page.
First Page :
https://www.mysite.com/index.php?catego ... ption=true
Linked Page 2
https://www.mysite.com/index.php?route= ... rue&page=2
Changed {{autosearch}} to {{search}} for default search . Still same problem.ADD Creative wrote: ↑Mon May 04, 2020 12:58 amTry disabling your search extension to see if the problem goes away.
I think there is bug there. Search box input sends not encoded characters
Disabled from extensions, removed from modifications. And for exact solution changed header search from default template.
Still same. It was not enough for me, backed up my catalog folder and uploaded default template catalog folder. It didn't changed. Removed vqmod cache files.
So i started to think is there any problem for system folder files. Thinking for hours.
Why getting "granül" search word is going "gran%C3%BCl" for breadcrumb or pagination link exactly can't understand.
Code: Select all
http://www.mysite.com/index.php?route=product/search&search=gran%C3%BCl&description=true&category_id=0&sub_category=true">
Did you cleared the OC cache after disabling / uninstalling the extension? viewtopic.php?f=134&t=215776#p718325nickelaj wrote: ↑Mon May 04, 2020 2:54 amDisabled from extensions, removed from modifications. And for exact solution changed header search from default template.
Still same. It was not enough for me, backed up my catalog folder and uploaded default template catalog folder. It didn't changed. Removed vqmod cache files.
So i started to think is there any problem for system folder files. Thinking for hours.
Why getting "granül" search word is going "gran%C3%BCl" for breadcrumb or pagination link exactly can't understand.Code: Select all
http://www.akvaryumyemi.com/index.php?route=product/search&search=gran%C3%BCl&description=true&category_id=0&sub_category=true">
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
That is the correct way to encode those characters in a URL. It's done on this line for the page links.nickelaj wrote: ↑Mon May 04, 2020 2:54 amWhy getting "granül" search word is going "gran%C3%BCl" for breadcrumb or pagination link exactly can't understand.Code: Select all
http://www.akvaryumyemi.com/index.php?route=product/search&search=gran%C3%BCl&description=true&category_id=0&sub_category=true">
https://github.com/opencart/opencart/bl ... h.php#L369
PHP will automatically perform a urldecode on the GET variables. So $this->request->get['search'] will contain the correct decoded characters. Extended characters in searches work fine for me on a clean install of 3.0.3.2. So it's probably an extension, modification or your theme that is causing the issue.
Yes i cleared both of them.straightlight wrote: ↑Mon May 04, 2020 3:10 amDid you cleared the OC cache after disabling / uninstalling the extension? viewtopic.php?f=134&t=215776#p718325nickelaj wrote: ↑Mon May 04, 2020 2:54 amDisabled from extensions, removed from modifications. And for exact solution changed header search from default template.
Still same. It was not enough for me, backed up my catalog folder and uploaded default template catalog folder. It didn't changed. Removed vqmod cache files.
So i started to think is there any problem for system folder files. Thinking for hours.
Why getting "granül" search word is going "gran%C3%BCl" for breadcrumb or pagination link exactly can't understand.Code: Select all
http://www.mysite.com/index.php?route=product/search&search=gran%C3%BCl&description=true&category_id=0&sub_category=true">
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
.htaccessstraightlight wrote: ↑Mon May 04, 2020 4:26 amPlease post your .htaccess, config.php and admin/config.php files without database information.
Code: Select all
Options +FollowSymlinks
Options -Indexes
<FilesMatch "(?i)((\.tpl|.twig|\.ini|\.log|(?<!robots)\.txt))">
Require all denied
</FilesMatch>
RewriteEngine On
RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L]
RewriteRule ^system/storage/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
ürün encodes to %C3%BCr%C3%BCn encodes to %25C3%25BCr%25C3%25BCn
%25C3%25BCr%25C3%25BCn decodes to %C3%BCr%C3%BCn
and that is where you are.
either find the double encode or also double decode.
Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces
“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.
Understood i think. I will check search and pagination files again.
The double encoding is caused by you redirect from http to https.
https://www.akvaryumyemi.com/index.php? ... rue&page=2
Works fine.
http://www.akvaryumyemi.com/index.php?r ... rue&page=2
Gets redirected to https and double encoded.
Users browsing this forum: Google [Bot] and 40 guests