News:

Wondering if this will always be free?  See why free is better.

Main Menu

Weird bug with mentions.

Started by Darkness7148, May 18, 2022, 12:52:20 PM

Previous topic - Next topic

Darkness7148

I've encountered a weird bug I think with the mentions. Either that, or I'm just not understanding how they work.

Basically, make a post with a mention. (image 1)
Afterwards, modify the same post and add a second mention of another user. (image 3)

If you check the mentions SQL table, there is only one record for that post for the new member mention but the first one has been wiped out. (image 4)

Then modify the same post a third time. Don't change anything. Just save it. You'll notice this time, that there is now two SQL records for that post. (image 5)

You can see in the screenshots below. It's Post 4. This is on a fresh install of SMF 2.1.2.

This doesn't seem to happen every time. Sometimes, it will work as intended and add a mention record for each person mentioned when you modify a post.

Arantor

I'm still not sure offhand what that table is for. I don't think the alerts table needs it.
Holder of controversial views, all of which my own.


shawnb61

Were the users notified of the mentions?
A question worth asking is born in experience & driven by necessity. - Fripp

Oldiesmann

Quote from: Arantor on May 18, 2022, 12:56:04 PMI'm still not sure offhand what that table is for. I don't think the alerts table needs it.

It's used to get information about any members who may have been mentioned when a post is created. See Sources/tasks/CreatePost-Notify.php and Sources/Mentions.php.

voom

The @mentions don't work, if the user has an apostrophe in their name - all other entities work. The name is found, when typing the first letters, but on posting the name gets no BBCode, thus no alert etc.

Darkness7148

Quote from: shawnb61 on May 18, 2022, 01:15:29 PMWere the users notified of the mentions?

The first mention Pyro, yes, that member got an alert.

But when I added the second mention for TRACER, there was no alert, even after modifying the post a third time.

Arantor

Pretty sure that was by design to not support mentions from edits to prevent abuse.
Holder of controversial views, all of which my own.


Darkness7148

Oh, is that why the Mentions quickselect popup doesn't appear in quickedit? I was curious about that too.

Arantor

No, the entire editor is missing in quick edit (intentionally).

But I'm 95% sure it was intended not to support mentions in edits, and I don't know if the full edit page loads the mentions functionality.
Holder of controversial views, all of which my own.


Advertisement: