Closed Bug 1719180 Opened 3 years ago Closed 3 years ago

Searches containing the URL ($) or title (#) restriction tokens yield no results.

Categories

(Firefox :: Address Bar, defect, P3)

defect
Points:
2

Tracking

()

VERIFIED FIXED
91 Branch
Iteration:
91.3 - Jun 28 - Jul 11
Tracking Status
firefox-esr78 --- unaffected
firefox90 --- wontfix
firefox91 --- fixed
firefox96 --- verified

People

(Reporter: bugzilla, Assigned: bugzilla)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

STR:

  1. In a new profile, search for # developer or $ developer.

Expected results:
The built-in bookmark for developer.mozilla.org should appear.

Actual results:
No bookmark/history results appear.

mozregression points to bug 1661949 as the regressor. The relevant test didn't catch this because it's a UnifiedComplete unit test, and the bug is in the providers manager.

This bug blocks bug 1717507 because test_special_search fails when ported, since the results yielded by UnifiedComplete in a unit test are different than those actually displayed.

Interesting that this was not noticed sooner, makes me wonder if those filters are actually used and useful for most people.

This bug was introduced because UnifiedComplete was only filtering tokens when the queryContext contained a restrictToken. UrlbarProvidersManager was only setting queryContext.restrictToken when a source restriction token was typed (i.e. not including $ and #). This meant that # and $ were never filtered from the search string. This patch partially reverts bug 1661949 by not setting restrictSource in UrlbarProvidersManager when a token is typed. As a result, UnifiedComplete knows that when restrictSource is set, it's because it was manually set on the queryContext and thus it should not filter tokens. It filters tokens in all other cases, including when a restriction token of any kind is typed. I tested the behavior fixed in bug 1661949 and verfied this patch does not regress that bug. This is because UrlbarProviderHeuristicFallback checks to see if the search tokens contain a search mode restriction token, which include RESTRICT_SEARCH. Tests are in D119113.

Assignee: nobody → htwyford
Status: NEW → ASSIGNED
Iteration: --- → 91.3 - Jun 28 - Jul 11
Attachment #9229903 - Attachment description: Bug 1719180 - Partially revert bug 1661949 to not set restrictSource when a restriction token is used. r?mak! → Bug 1719180 - Set restrictSource to the first restriction token, dropping support for combined tokens. r?mak!
Pushed by htwyford@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/09febaa9cec9
Set restrictSource to the first restriction token, dropping support for combined tokens. r=mak
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch
Flags: qe-verify+

I managed to reproduce the issue on an older version of Nightly.
I retested everything using latest Nightly 92.0a1 on macOS 10.15, Ubuntu 18.04 x64 and the issue is not reproducing anymore.

However on Firefox 91.0b8 the issue is still reproducing. Is this behaviour expected?

Flags: needinfo?(htwyford)

(In reply to Oana Botisan, Desktop Release QA from comment #5)

However on Firefox 91.0b8 the issue is still reproducing. Is this behaviour expected?

Hm, no. I'm not able to reproduce on 91b8 or 91b9. What platform are you on?

Flags: needinfo?(htwyford)

On all the platforms I mentioned in comment 5 . I can still reproduce the issue with Firefox 91.0b9 on a newly created profile.

However, I tested using a profile I created last week and the issue is not reproducing on it. I am not sure why this is happening, but what I can say is that it doesn't matter if there are any bookmarks or history, it just depends on the fact that the profile is newly created.

Issue still reproduces on Beta 95.0b4 on both Win10 and Mac10.13(see screenshot attached). Should we reopen this issue?
Thank you.

Flags: needinfo?(htwyford)
Attached image Screenshot.png

the developer.mozilla.org bookmark is only present in Nightly, you cannot use that example on Beta or release.
You can probably use "customize" instead, that bookmark seems to be available in all the versions.

(In reply to Marco Bonardo [:mak] from comment #10)

the developer.mozilla.org bookmark is only present in Nightly, you cannot use that example on Beta or release.
You can probably use "customize" instead, that bookmark seems to be available in all the versions.

I did not know it was only for Nightly builds.
I checked again and in latest NB_96.0a1 (20211109093712) the issue is fixed on Win10, Mac 10.13 and Ubuntu 20.4.

Flags: needinfo?(htwyford)
Has Regression Range: --- → yes

Update fields based on comment 11.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: