@mention members

Started by Dragooon, May 02, 2014, 01:07:58 PM

Previous topic - Next topic

Dragooon

Quote from: FrizzleFried on May 05, 2014, 12:12:32 PM
I will ask if he did anything else.  Any suggestion on how I can get in an read what he did if I am getting a white screen?
Wait, you're getting a white screen when trying to open the post? That can't be mentions then since it doesn't do anything when a post is being viewed. Try uninstalling the mod to be sure

FrizzleFried

OK.... just used PHPMyAdmin to check out the post.... yup... a hundred plus mentions... and that is it.

Not a single character more.  Just mention after mention.

Not sure what is white screening the post if not the tag over and over?!?


Dragooon

Is it the same member 100 times over?

margarett

That is probably related to SMF 2.0.7 and the memory issues when parsing BBC, unfortunately...
Dragooon, for you to reproduce it you need to lower your memory_limit in php.ini

Just guessing, but that's probably the case.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Dragooon

Ah, lowering my memory_limit to 32M crashed my local site as well. Maybe ask your host to raise it to 64M or ban the stupid user :P

FrizzleFried

Quote from: Dragooon on May 05, 2014, 12:26:17 PM
Is it the same member 100 times over?

Yes sir.. me... over and over and over.

As soon as I removed that post via PHPMYADMIN (I deleted the mentions and just added a couple words of text) it uncrashed the post.  No more white screen.

margarett

Yup, exactly the same here, but I needed a bit over 100 mentions :P
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

FrizzleFried

Quote from: Dragooon on May 05, 2014, 12:13:45 PM
Quote from: FrizzleFried on May 05, 2014, 12:12:32 PM
I will ask if he did anything else.  Any suggestion on how I can get in an read what he did if I am getting a white screen?
Wait, you're getting a white screen when trying to open the post? That can't be mentions then since it doesn't do anything when a post is being viewed. Try uninstalling the mod to be sure

I was getting a white screen when I went to page 2 (pagination).  As soon as I removed the last post of the thread ... the one with 100+ mentions... the post now comes up fine.

FrizzleFried

Quote from: Dragooon on May 05, 2014, 12:30:56 PM
Ah, lowering my memory_limit to 32M crashed my local site as well. Maybe ask your host to raise it to 64M or ban the stupid user :P

Ah... is there a mod or setting to limit the number of BBC tags that can be used in a post?

FrizzleFried

OK... I have access to PHP.ini on my server.  Where is the setting that I need to increase to 64M?

EDIT: Found it.... and it's already at 64M.  Maybe I need to go to 96M?  128M?  Maybe there was much more than 150 mentions (it was a ballpark guess)....?

margarett

memory_limit=32M
Increase it to 128M if you have access to it ;)

Don't forget to restart Apache after changing it
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

FrizzleFried

Quote from: margarett on May 05, 2014, 12:42:17 PM
memory_limit=32M
Increase it to 128M if you have access to it ;)

Don't forget to restart Apache after changing it

Ah... I can't restart Apache... I have access to the server via Cpanel...


margarett

But is it your server? If so, you can access it via SSH or whatever.
If not, you really need to ask your host...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Dragooon

128M should cover posts up to SMF's limit of 20k characters (unless you've increased that as well).

Also, I've pushed a new update which changes the way I'm parsing mentions in posts. This'll allow user names with @ symbol to be mentioned without escaping the @, like @K@: What's up? But I'd like someone to help me test it since I did this really quickly and with little testing.

FrizzleFried

Quote from: margarett on May 05, 2014, 12:44:52 PM
But is it your server? If so, you can access it via SSH or whatever.
If not, you really need to ask your host...

Yeah,  I need to ask my host.  Not my server.

FrizzleFried

Also... a few users have asked about deleting mentions.  I posted that the update will include mentions being deleted ever X number of hours (admin defined).  They're asking if it would be possible to simply have mentions delete themselves as they are clicked on.  At the same time,  they complained that if they have multiple mentions and they visit the mention page,  even if they don't click any mentions,  the # next to PROFILE disappears.  In a perfect world,  if you have 10 mentions,  and it says 10 mentions,  you'd visit the mention page,  click one... visit that post... your profile would then show [9] mentions and the 10th one that you visited would no longer be in the mentions screen.

Doable?

FrizzleFried

I also heard from one user who suggested changing the way the mentions are parsed.  He said:

QuoteThis mod is really query intensive and I highly suggest you remove it.

The author shouldn't have implemented it like that, rather than be member=1 for FrizzleFried it should be member=FrizzleFried and when the user clicks the link it looks up the Id and sends the user to the right profile page. That way there is only one query when a user clicks the link, rather than one every time the post is viewed.

It just so happens this was the genius who broke the post....


Dragooon

Quote from: FrizzleFried on May 05, 2014, 01:03:19 PM
I also heard from one user who suggested changing the way the mentions are parsed.  He said:

QuoteThis mod is really query intensive and I highly suggest you remove it.

The author shouldn't have implemented it like that, rather than be member=1 for FrizzleFried it should be member=FrizzleFried and when the user clicks the link it looks up the Id and sends the user to the right profile page. That way there is only one query when a user clicks the link, rather than one every time the post is viewed.

It just so happens this was the genius who broke the post....


What? That's not how the mod works? It doesn't do a single query, the format of bbcode is @<name>, it needs name and ID to generate a valid URL. As margarrett said, it's SMF's BBC parser consuming most of the memory.

FrizzleFried

Quote from: Dragooon on May 05, 2014, 01:05:53 PM
What? That's not how the mod works? It doesn't do a single query, the format of bbcode is @<name>, it needs name and ID to generate a valid URL. As margarrett said, it's SMF's BBC parser consuming most of the memory.

Keep in mind... this is the genius who broke the post...

:D  I let him know he's none-to-bright.

:)


FrizzleFried

My members have found another "maybe" bug.  I say "maybe" because the "bug" happens when you don't use the mod properly.

My members have started changing the name on the tag,  but still tagging people (again,  my site is a fun "locker room" type of site)... when a member tagged @FRITZ and I noticed that it was linked to my profile but I had not gotten a mention.  I had noticed prior that if you create a post with a proper tag @FrizzleFried then went back and edited the name to something else,  the mention remains linked to my profile and I still have a mention in the profile... this time no mention in the profile.  I asked him how he created the mention.

He wrote out the tag manually:  @@FRITZ ... which did NOT create a mention but does create a link to the users profile in the post itself...

I figured I'd let you know that... though since he didn't use the mention properly ... I'm not sure if it's really a bug.

Advertisement: