Author Topic: Revolution: SimpleSearch URL Encode problem  (Read 6953 times)

0 Members and 1 Guest are viewing this topic.

Offline kudykam

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Revolution: SimpleSearch URL Encode problem
« on: September 01, 2011, 11:43:51 PM »
I am using SimpleSearch snippet in Modx Revolution, for searching webpage content. Using form like this:
Code: [Select]
<form class="sisea-search-form" action="[[~[[+landing]]]]" method="get"> <input type="text" name="hledej" id="hledej" /> <input type="hidden" name="id" value="[[+landing:default=[[*id]]]]" /> <input type="submit" value="[[%sisea.search? &namespace=sisea&topic=default]]" /> </form>Searching on webpage works, except string with specials characters like "ěščřžýáá" (different language). Problem is that method get encode pass this character in url like this:
../search-result.html?search=str%25C3%25A1nce&id=13
and find 0 results.... if the search string in url is not encoded (tried to rewrite it manually), it returns some results...
I also tried to use method post, but id doesnt work at all...
Any idea?

Offline goldsky

  • tweets @_goldsky
  • Administrator
  • Sr. Member
  • *****
  • Posts: 345
  • Karma: +1/-0
  • Less is more
    • Virtudraft Intermedia Telematika
Re: Revolution: SimpleSearch URL Encode problem
« Reply #1 on: September 01, 2011, 11:50:40 PM »
Take a look at the non-ASCII character inside your MySQL.
Make a test.
Type in here the content.
« Last Edit: September 01, 2011, 11:55:10 PM by goldsky »
Rico
Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
MODx is great, but knowing how to use it well makes it perfect!

Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets | IE 6 must die !

Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

PING ME ON TWITTER @_goldsky

Offline goldsky

  • tweets @_goldsky
  • Administrator
  • Sr. Member
  • *****
  • Posts: 345
  • Karma: +1/-0
  • Less is more
    • Virtudraft Intermedia Telematika
Re: Revolution: SimpleSearch URL Encode problem
« Reply #2 on: September 01, 2011, 11:57:10 PM »
Rico
Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
MODx is great, but knowing how to use it well makes it perfect!

Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets | IE 6 must die !

Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

PING ME ON TWITTER @_goldsky

Offline kudykam

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0

Offline goldsky

  • tweets @_goldsky
  • Administrator
  • Sr. Member
  • *****
  • Posts: 345
  • Karma: +1/-0
  • Less is more
    • Virtudraft Intermedia Telematika
Re: Revolution: SimpleSearch URL Encode problem
« Reply #4 on: September 02, 2011, 12:05:55 AM »
Uhmm...
Code: [Select]
<form class="sisea-search-form" action="[[~[[+landing]]]]" method="get">
    <input type="text" name="hledej" id="hledej" />
    <input type="hidden" name="id" value="[[+landing:default=[[*id]]]]" />
    <input type="submit" value="[[%sisea.search? &namespace=sisea&topic=default]]" />
</form>

What is your snippet call on the landing page?
Rico
Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
MODx is great, but knowing how to use it well makes it perfect!

Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets | IE 6 must die !

Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

PING ME ON TWITTER @_goldsky

Offline kudykam

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: Revolution: SimpleSearch URL Encode problem
« Reply #5 on: September 02, 2011, 12:07:56 AM »
Code: [Select]
[[!SimpleSearch? &containerTpl=`SSresultTpl`  &searchIndex=`hledej`   ]]
SSresultTpl:
Code: [Select]
<p class="sisea-results">[[+resultInfo]]</p>
 
<div class="sisea-results-list">
    [[+results]]
</div>
 
<div class="sisea-paging"><span class="sisea-result-pages">[[%sisea.result_pages? &namespace=`sisea` &topic=`default`]]</span>[[+paging]]</div>

Offline goldsky

  • tweets @_goldsky
  • Administrator
  • Sr. Member
  • *****
  • Posts: 345
  • Karma: +1/-0
  • Less is more
    • Virtudraft Intermedia Telematika
Re: Revolution: SimpleSearch URL Encode problem
« Reply #6 on: September 02, 2011, 12:13:39 AM »
do you have the use_multibyte option turned on?
Rico
Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
MODx is great, but knowing how to use it well makes it perfect!

Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets | IE 6 must die !

Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

PING ME ON TWITTER @_goldsky

 

term