Closed
Bug 470255
Opened 16 years ago
Closed 16 years ago
Searching for "community" and/or "design" doesn't produce results
Categories
(Websites :: communitystore.mozilla.org, defect)
Websites
communitystore.mozilla.org
Tracking
(Not tracked)
VERIFIED
FIXED
2.1
People
(Reporter: stephend, Assigned: abuchanan)
References
()
Details
Attachments
(1 file)
|
6.16 KB,
patch
|
rdoherty
:
review+
|
Details | Diff | Splinter Review |
Any variation of the strings "community" and "design" won't produce search results because those were batch-uploaded and don't have unique names--they're hardcoded.
https://community-store.authstage.mozilla.com/gallery/search?query=design
https://community-store.authstage.mozilla.com/gallery/search?query=community
https://community-store.authstage.mozilla.com/gallery/search?query=community+design
Comment 1•16 years ago
|
||
* Make naming the design required
* Write script to take the current naming scheme for designs with no name and insert the same name into the database, which will fix the search problem.
Target Milestone: --- → 2.1
Comment 2•16 years ago
|
||
Also need to remove all logic that displays 'Community Design #' when there is no design name. (We could leave it because it would still work once all the designs do have a name, but I don't want unused code lying around)
Assignee: nobody → buchanae
Comment 3•16 years ago
|
||
If SQL or PHP needs to be run for this bug, please add it (or a link to the bug) to https://wiki.mozilla.org/CommunityStore:2.1ITUpdates
| Assignee | ||
Comment 4•16 years ago
|
||
Hey,
Here's a patch for the code changes.
I'm waiting on getting an updated DB dump to write the script that changes existing empty design names.
Attachment #381324 -
Flags: review?(rdoherty)
Comment 5•16 years ago
|
||
Comment on attachment 381324 [details] [diff] [review]
patch v1
Looks good, just missed the page title when viewing a design. (controllers/gallery.class.php line 187)
Add that and it's good to go!
Attachment #381324 -
Flags: review?(rdoherty) → review+
Updated•16 years ago
|
Assignee: buchanae → steven
Comment 6•16 years ago
|
||
Reassigning back to Alex as he has a patch for this.
Assignee: steven → buchanae
| Assignee | ||
Comment 7•16 years ago
|
||
r29763 checks in patch v1 + comment #5
| Assignee | ||
Comment 8•16 years ago
|
||
Here's the SQL to change the missing design names:
UPDATE uploads SET designname=CONCAT('Community design #', id) WHERE designname = '';
If it looks good to you, I'll add it to the wiki and close this bug. Thanks.
The transcript,
mysql> select count(*) from uploads where designname = '';
+----------+
| count(*) |
+----------+
| 196 |
+----------+
1 row in set (0.01 sec)
mysql> update uploads set designname=concat('Community design #', id) where designname = '';
Query OK, 196 rows affected (0.01 sec)
Rows matched: 196 Changed: 196 Warnings: 0
mysql> select count(*) from uploads where designname = '';
+----------+
| count(*) |
+----------+
| 0 |
+----------+
1 row in set (0.00 sec)
mysql> select id, designname from uploads where designname like 'Community design%%' limit 5;
+-----+-----------------------+
| id | designname |
+-----+-----------------------+
| 142 | Community design #142 |
| 143 | Community design #143 |
| 128 | Community design #128 |
| 129 | Community design #129 |
| 61 | Community design #61 |
+-----+-----------------------+
5 rows in set (0.00 sec)
Comment 9•16 years ago
|
||
SQL looks good, just tested it.
| Assignee | ||
Comment 10•16 years ago
|
||
added the SQL to the wiki,
https://wiki.mozilla.org/CommunityStore:2.1ITUpdates
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
| Reporter | ||
Comment 11•16 years ago
|
||
SQL's been run on staging, right?
https://community-store.authstage.mozilla.com/gallery/search?query=community+design yields https://community-store.authstage.mozilla.com/gallery/view/421, so if so, this can be verified.
| Assignee | ||
Comment 12•16 years ago
|
||
they haven't. justdave is running them now.
| Assignee | ||
Comment 13•16 years ago
|
||
15:35 <@justdave> Query OK, 196 rows affected (0.01 sec)
15:35 <@justdave> Rows matched: 196 Changed: 196 Warnings: 0
| Reporter | ||
Comment 14•16 years ago
|
||
Verified FIXED; weird that one design was already showing up in comment 11, before the SQL was run.
All the URLs in comment 0 are now showing results.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•