However creating a new topic and having any of these words in the title or body of the post doesn’t seem to set any auto tags. I assume I must be doing something wrong, but no clue as to what.
Same, it’s not working for me either (the ‘test’ works but not in actual topic creation).
I wanted to check to see if it wors for the title as well as the post and whether it appends the tags to the tag field on typing i.e before the user clicks on submit. This would allow them to remove a tag if they don’t think it is suitable.
I just did a quick test of this on my local development site. When I add an auto-tag watched word, the test works for me, but so far I haven’t been able to get it to auto tag a topic when a post contains one of the watched words. I’ll look into this some more.
Edit: I did a quick test of this on a hosted Discourse site and am running into similar issues to what I’m seeing on my development site. Testing this on my dev site, what I’m finding is that the auto_tag method isn’t being called when I create a new topic that contains an auto-tag word. If I edit an existing topic to add an auto-tag word, the auto_tag method is called and the topic gets tagged.
I did just note that on an embedded topic import from a remote site the auto-tagging did work. I thought maybe it had been patched, but tried it on a normal new topic creation and no joy. So it’s working partially anyway.
I came here with the same issue (auto-tagging is not triggering when creating a new topic with watched words). But I also can’t get the tags to be added when editing an existing post.
Turns out I was on tests passed, but for some reason it took a while to be visible na upgrade. Either way I am not on 2.8.0.beta1 db7038e6c2 and have tested again. I still have issues with the js. These are the tags I’m using:
Agh - sorry. Thanks for catching that. It works fine now.
I wonder if catching errors and warning the user would be helpful — especially as non technical people might inadvertently write strings that are invalid regexes? It would also be great if an error in one regex didn’t cascade to the others. In this case there were valid matches with some of the later regexes which didn’t get found because of the error in the first.
Is there anything we can do here to let users know when they are shooting themselves in the foot with regular expressions @sam? Can we put regex behind an advanced mode? Can we default to word boundaries which is what most people want when they put a word in, anyway?
My call would be simply not to need full on regular expressions and support enough stuff out-of-the-box so only 1 out of 10,000 communities need to get hands dirty and use regular expressions.
In this particular example by @ben if we supported ? then:
Going to close this off cause it seems like the feature is working. (yes regex is richer, but this seems good enough to capture what Ben is trying to do)