Closed
Bug 556672
Opened 15 years ago
Closed 15 years ago
Point search links to Kitsune
Categories
(support.mozilla.org :: Knowledge Base Software, task, P1)
support.mozilla.org
Knowledge Base Software
Tracking
(Not tracked)
VERIFIED
FIXED
1.5.4
People
(Reporter: jsocol, Assigned: jsocol)
References
()
Details
(Whiteboard: update module)
Attachments
(2 files, 2 obsolete files)
8.50 KB,
patch
|
paulc
:
review+
|
Details | Diff | Splinter Review |
2.70 KB,
patch
|
paulc
:
review+
|
Details | Diff | Splinter Review |
Just like 1.5, when we moved searches from tiki-newsearch.php to search.php, we now get to move them to %LOCALE%/search.
There's probably also a little clean-up w/r/t the query string parameters.
Assignee | ||
Comment 1•15 years ago
|
||
This includes a couple of rewrites for Kitsune-friendliness:
RewriteRule ^([a-zA-Z\-]+)/search(.*) /k/$1/search$2 [L,QSA]
# Will redirected based on Accept-Language
RewriteRule ^search(.*) /k/search$1 [L,QSA]
Assignee: nobody → james
Updated•15 years ago
|
Assignee | ||
Comment 2•15 years ago
|
||
Moves the forms on the start page (the module is changed via the admin area) and makes search.php and tiki-newsearch.php redirect correctly.
Attachment #440257 -
Flags: review?(paulc)
Comment 3•15 years ago
|
||
Comment on attachment 440257 [details] [diff] [review]
point searches to Kitsune
>Index: webroot/templates/styles/mozms2/searchbar.tpl
>===================================================================
>--- webroot/templates/styles/mozms2/searchbar.tpl (revision 66181)
>+++ webroot/templates/styles/mozms2/searchbar.tpl (working copy)
>@@ -35,14 +33,12 @@
> foreach ($terms as $term) {
> $params = http_build_query(array(
> 'q' => mb_trim($term),
>- 'where' => 'all',
>- 'locale' => $_REQUEST['locale'] ? $_REQUEST['locale'] : 'en',
> 'qs' => 'h' // bug 532214 - tracking for queries
> ));
> if ($count) echo ', ';
> echo '<a ';
> if ($count > 4) echo 'class="small" ';
>- echo "href='/search.php?{$params}'>" . mb_trim($term) . '</a>';
>+ echo "href='/search{$params}'>" . mb_trim($term) . '</a>';
Links are missing the ? part, I see e.g. "searchq=bookmarks".
There's also a search box on en-US/kb/Support+Website+Forums which includes mozcommon/searchbar.tpl
Would be nice to fix that one too.
Attachment #440257 -
Flags: review?(paulc) → review-
Assignee | ||
Comment 4•15 years ago
|
||
Attachment #440312 -
Flags: review?(paulc)
Comment 5•15 years ago
|
||
Comment on attachment 440312 [details] [diff] [review]
fix bits from r-
WFM. Should we mark the whiteboard that we need to update the sidebar module?
Attachment #440312 -
Flags: review?(paulc) → review+
Assignee | ||
Comment 6•15 years ago
|
||
r66220.
Also need to double-check that support-stage-new pulls from SVN on cron as well as from Git.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Whiteboard: update module
Assignee | ||
Comment 7•15 years ago
|
||
I forgot to grab the AAQ form.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 8•15 years ago
|
||
Bug 560965 was a 4-character patch, so I just did it here at the same time.
With this, search results from Kitsune actually work with the AAQ. (And they don't go through /search.php first.)
Attachment #440257 -
Attachment is obsolete: true
Attachment #440817 -
Flags: review?(paulc)
Comment 9•15 years ago
|
||
Comment on attachment 440817 [details] [diff] [review]
fixes up AAQ and also bug 560965
>Index: webroot/js/forumquestion.js
>===================================================================
>--- webroot/js/forumquestion.js (revision 66308)
>+++ webroot/js/forumquestion.js (working copy)
>@@ -376,8 +376,8 @@
>- $.getJSON(TIKIROOT + 'search.php?q=' + escape($('#forumquestion_question').val()) +
>- '&locale=' + LOCALE + '&format=json',
>+ $.getJSON('/search?q=' + escape($('#forumquestion_question').val()) +
>+ '&format=json',
This change forces searches to be in the locale of the browser's Accept-Language header. So if I am on:
/fr/forum/1?openpost=1
and search, I still get English results. Doesn't seem like expected behavior.
Assignee | ||
Comment 10•15 years ago
|
||
(In reply to comment #9)
> This change forces searches to be in the locale of the browser's
> Accept-Language header. So if I am on:
> /fr/forum/1?openpost=1
> and search, I still get English results. Doesn't seem like expected behavior.
"expected" behavior is a good question here. Since we don't technically offer multilingual forums (you can't navigate to /fr/forum/1, you have to type it) one could argue that we should only search English.
Cheng: what do you think we should do here?
Comment 11•15 years ago
|
||
(In reply to comment #10)
> "expected" behavior is a good question here. Since we don't technically offer
> multilingual forums (you can't navigate to /fr/forum/1, you have to type it)
> one could argue that we should only search English.
>
> Cheng: what do you think we should do here?
That's a good point. However, the search also pulls KB articles. That's what made me point it out. If it was just searching the forum, it wouldn't matter.
Assignee | ||
Comment 12•15 years ago
|
||
(In reply to comment #11)
> That's a good point. However, the search also pulls KB articles. That's what
> made me point it out. If it was just searching the forum, it wouldn't matter.
This search is supposed to pull both.
Comment 13•15 years ago
|
||
Let's stick to English results since the form is in English. We don't support non-English forum users anyway because if they don't read any English, they can't understand any of the form fields.
As for what to search, let's leave it at everything. We don't know how behavior will change once we switch the forums to the new model but we should plan on revisiting this decision.
Assignee | ||
Comment 14•15 years ago
|
||
Based on feedback from Cheng, always use English search from the AAQ.
Attachment #440817 -
Attachment is obsolete: true
Attachment #441084 -
Flags: review?(paulc)
Attachment #440817 -
Flags: review?(paulc)
Comment 15•15 years ago
|
||
Comment on attachment 441084 [details] [diff] [review]
use /en-US/search for AAQ and fix bug 560965
WFM.
Attachment #441084 -
Flags: review?(paulc) → review+
Assignee | ||
Comment 16•15 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 15 years ago → 15 years ago
Resolution: --- → FIXED
Verified FIXED; on the AAQ form, I verified (via Live HTTP Headers), that we don't do double redirects:
https://support-stage-new.mozilla.com/search?qs=s&q=deleting+bookmarks&sa=
GET /search?qs=s&q=deleting+bookmarks&sa= HTTP/1.1
Host: support-stage-new.mozilla.com
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: https://support-stage-new.mozilla.com/en-US/kb/Ask+a+question
Cookie: s_vi=[CS]v1|25E6625B051604A5-4000018220004E5B[CE]; __utma=183859642.849408222.1271716455.1271751289.1271752185.11; __utmz=183859642.1271716455.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); s_vsn_mozillacom_1=8792852906265; WT_FPC=id=2284eb090aeaccdcac41271793022334:lv=1272064860071:ss=1272064860071; wtspl=302774; sessionid=605b86ad0071703f370882dd32068636; SSID=ibqUse0Iqd6b0NsUv70b; __unam=f7237fc-128288e1b53-47b5b952-1; s_cc=true; s_sq=%5B%5BB%5D%5D
Authorization: Basic c3VwcG9ydDpzdGFnZQ==
HTTP/1.1 301 MOVED PERMANENTLY
Date: Sat, 24 Apr 2010 00:20:07 GMT
Server: Apache/2.2.3 (Red Hat)
Vary: Accept-Language
Location: https://support-stage-new.mozilla.com/en-US/search?qs=s&q=deleting+bookmarks&sa=
Cache-Control: max-age=0
Expires: Sat, 24 Apr 2010 00:20:07 GMT
Content-Length: 0
Keep-Alive: timeout=5, max=998
Connection: Keep-Alive
Content-Type: text/html; charset=utf-8
----------------------------------------------------------
https://support-stage-new.mozilla.com/en-US/search?qs=s&q=deleting+bookmarks&sa=
GET /en-US/search?qs=s&q=deleting+bookmarks&sa= HTTP/1.1
Host: support-stage-new.mozilla.com
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: https://support-stage-new.mozilla.com/en-US/kb/Ask+a+question
Cookie: s_vi=[CS]v1|25E6625B051604A5-4000018220004E5B[CE]; __utma=183859642.849408222.1271716455.1271751289.1271752185.11; __utmz=183859642.1271716455.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); s_vsn_mozillacom_1=8792852906265; WT_FPC=id=2284eb090aeaccdcac41271793022334:lv=1272064860071:ss=1272064860071; wtspl=302774; sessionid=605b86ad0071703f370882dd32068636; SSID=ibqUse0Iqd6b0NsUv70b; __unam=f7237fc-128288e1b53-47b5b952-1; s_cc=true; s_sq=%5B%5BB%5D%5D
Authorization: Basic c3VwcG9ydDpzdGFnZQ==
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•