Skip to content

Loading…

Custom cosmetic filter fails to apply #976

Closed
Haikuch opened this Issue · 41 comments

5 participants

@Haikuch

Hi, sometimes the cosmetic filter doesnt work after reload, example on this page:
Startpage.com
I'am trying to filter the red box, it works with the content but the red box itself always appears again after reloading, so the filter
###footer > .box-red
doesn't work

@gorhill

I don't see a red box.

@gorhill

Worked fine from here, red box is gone for good.

@gorhill

Need: your filter lists + any and all settings different from default settings.

@gorhill

Let me see, you were asking me earlier about dynamic filtering in #974... Did you create an allow rule (green) for startpage.com?

@Haikuch

no I didnt, had the problem already before playing with the dynamic rules
but I solved it now with adding the rule
startpage.com###footer > .box-red
manually to the filterlist (my filters). But if I try using the pipette, it disappears, and comes back after reloading

@gorhill

That's what I used, the eye dropper.

@gorhill

You did not use the eye dropper originally, or else your filter would have been startpage.com###footer > .box-red, while you said it was ###footer > .box-red.

@Haikuch

mh ok, I'am using Firefox might be interesting?

@gorhill

Me too.

@gorhill

Try to reproduce your own test case as described here, see for yourself.

@gorhill

The only way for the red box to re-appear is to disable cosmetic filtering. So you had somehow disabled cosmetic filtering. As said, becareful with the settings, and you won't be able to reproduce your own case.

@gorhill

Filter created. Reload page, red box doesn't come back.

@gorhill gorhill closed this
@Haikuch

Id did use it originally, but that might be the proble. I reporduced it now.
1. I deleted all https://startpage.com/deu filters in myFilters
2. I reloaded and used the eye dropper
3. It creates the rule ###footer > .box-red > a[href="/deu/cebit.html"]
4. then the red box is still there
5. I use eyedropper again for the red box
6. it shows rule ###footer > .box-red
7. but after reloading the red box is still there and the rule of 6. isnt saved

If I change in 3. the rule manually (in the confirm task) in ###footer > .box-red --> it works

seems that the first rule blocks saving the second one?

@gorhill gorhill reopened this
@gorhill

No, it worked fine, even if you create the wrong filter the first time.

@gorhill gorhill closed this
@gorhill

This is the filters which were created and I can't bring back the red box:

! 3/9/2015, 7:42:38 PM https://startpage.com/deu/
startpage.com###footer > .box-red > a[href^="/deu/cebit.html"]

! 3/9/2015, 7:42:44 PM https://startpage.com/deu/
startpage.com###footer > .box-red

You will have to paste here the same filters which you have in your custom filters if you want this issue to go somewhere. I just can't reproduce.

@gorhill

Note that you still didn't answer gorhill/uBlock#976 (comment). I can't help you if you do not provide key information.

@Haikuch

As I told, I can't paste it, because the second one isn't saved in the filter list! Thats what is written in myFilters after I did step 1-7:

startpage.com###footer > .box-red > a[href="/deu/cebit.html"]

@gorhill

startpage.com###footer > .box-red > a[href="/deu/cebit.html"] does not get rid of the red box.

Just pick the right one in the list of candidate filters.

@Haikuch

So the second rule I created using the eyedropper is unsaved.
how can I get: "any and all settings different" to you?

@gorhill

No it's not unsaved, It saved very well here. You are simply not following exactly the steps in gorhill/uBlock#976 (comment). Please, do so.

@gorhill gorhill added the available label
@Haikuch

yes I know I can pick it (in the meantime I learned it :)) but in fact there is a problem beacause it doenst work if I follow the steps like above. Of course one can say you can do it better when you select directly the parent level, but there might be other users with the same issue.

@Haikuch

It IS unsaved if I follow the steps 1-7 I described above! And that shouldn't be, no matter that it is not the smartest way doing it

@gorhill

Of course one can say you can do it better

I have no clue what that means. I will let somebody else try to figure why you have problems.

@Haikuch

Please reproduce the steps 1-7 as I described and I think you will see it

@Haikuch

that means, that my first approach, creating 2 rules not knowing that I can easily pick a parent level wasn't very clever, but I guess tehre are other peoples doing it like this

@gorhill

reproduce the steps 1-7

I did here, and re-did again just now: it is saved.

@Haikuch

The problem is, that the red box after step 6 first disappears, but comes back after reloading, thats not very nice

@gorhill

comes back after reloading

No, it doesn't come back. I've zero success at making it come back once the filter is created.

@Haikuch

ok, lets say, it doesn't come back for you, but it does for me, Iam not joking.

@TheSweetLily

Why not try recording your steps?
This will be 100% proof that you are in fact doing everything right and there is a bug, or that you are doing something wrong.

@Haikuch

However, I just updated to 0.9.0.0 and the bug is gone ;) the video stays at proof that it has been there. Sad that it is necessary to proof that I'am not lying.

@Mikey1993

@Haikuch More sadly is that you aren't testing issues you open on the latest version.

@TheSweetLily

I gotta agree with @Mikey1993 ...
New versions exist for a reason; to fix bugs or to enhance something...
Always try out new versions of addons before reporting about bugs that might've already been fixed...

@Haikuch

That is also true. But I had this issue already for some time but was too lazy reporting it. And new version is just out for 2 days, and this issue is not reported in changelog. However, done

@alejandrolemus

@Haikuch if I use your rule (startpage.com###footer > .box-red > a[href="/deu/cebit.html"]) redbox is there, even in last version. It seems you are only blocking the link, not what's behind it. I would say you need this rule only (works perfect for me):

startpage.com###footer > .box-red

Cheers

@gorhill

I tried with 0.8.9.1, and I could reproduce, on Firefox or Chromium.

Investigating.

@gorhill gorhill reopened this
@gorhill

proof that I'am not lying

Nothing to do about "lying". It's about the need for the dev to reproduce the bug. Without this, nothing can move forward. And to reproduce, as much information as possible is needed: settings, browser, browser version, uBlock version, special browser flags, etc.

This should go without saying, but I will be creating a template for bug reporting, because there is way too much time wasted on back and forth requests for information. If it's all provided as an issue is opened, this will save a whole lot of time for everybody.

@gorhill

By the way, the bug is gone from the latest version through pure luck. It's because now the filter is created with a comment above it with the timestamp + URL, which prevents the bug to manifest itself. It still need to be fixed though.

@gorhill gorhill added a commit that closed this issue
@gorhill gorhill this fixes #976 bf50e87
@gorhill gorhill closed this in bf50e87
@Haikuch

I totally see, that reproducing ist necessary and informations about browser etc. are important. Actually, I was a little bit surprised I wasn't asked for (maybe this was: gorhill/uBlock#976 (comment)) but was not fit enough to post them unbidden.

A template would be fine, and good to know how the bug is gone, even good idea with the comment.
Anyway, thanks for the plugin, its great!

@gorhill gorhill changed the title from cosmetic filter to Cosmetic filter fails to apply
@gorhill gorhill changed the title from Cosmetic filter fails to apply to Custom cosmetic filter fails to apply
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.