Forum Replies Created
Just updated Trac.
Here’s my latest findings/ questions on this matter:
Hey JJ, just wanted to drop back in here.
I’ve duplicated my live site on a brand new dedicated server and the behaviour I was seeing on my shared server is still there.
I’ve been doing some tests with a server analyst from my host and his initial thoughts are that WP or BBPress, BP is waiting for a ‘true’ return on mail confirmation before it’s actually allowing any php to continue/ refresh the page to let the user see his post.
If I open up a new browser window and refresh the activity stream for example – AS THE OTHER WINDOW IS STILL PROCESSING THE POST – I can see that it has actually ALREADY been posted.
This means the post is being written to the DB pretty quickly and mail is starting to be sent with the topic reply subscription notifications, but it seems that the page can’t refresh for the poster until the mail has been sent and some kind of confirmation of that has been received.
It makes no difference whether I send the email locally or through SMTP (Google Apps), so it’s not the mail server being slow.
The topic that this is worst on still only has about 30 subscribers though, so it’s hardly hundreds or thousands.
I’m guessing that not many users even on BIG sites will get loads more than 30 or so for each topic, so this is why this may have gone unnoticed in the past.
Could you guys explain to me the process of what BBPress is actually going through BEFORE it is allowed to refresh the page the user who is posting is on.
Their post is being posted way before they get to see it – does the page wait for confirmation of the emails being sent.
There isn’t a problem posting new topics with no replies or very few voices.
I think it has to be something along these lines. Thanks!
Awesome JJ, you were on that like lightning!
Thanks so much for checking it out!
Nice one JJ,
ticket is here: http://bbpress.trac.wordpress.org/ticket/2185
Phew… glad that wasn’t just me going mad!
Just to update on testing too, I have fully tested this now and can recreate it on all of my installs and a brand new install of BP 1.6.3, WP 3.5 and BBPress 2.2.4.
Admin can post @mentions freely, but regular BP members (assigned participant role) can’t without that error in the log appearing.
The @mention still works as it should but I can’t for the life of me see why it’s throwing that error.
I’ve tried it and get the same result on 3 separate servers now too. I have tried it with BP-Default and NO plugins except for BP and BBPress.
If you guys need me to test anything else at all, please shout up.
Should I create a ticket in TRAC?
@johnjamesjacoby Cheers JJ. I’ve just tested with bbpress2.3 beta 1 and I still get the same behaviour.
Admin can use @mentions and no syntax error appears in the error log.
As soon as a regular participant does, then they get this error:
`[29-Jan-2013 12:51:38 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘http://www.mysite.tv/members/admin/’ rel=’nofollow’>@admin mentio’ at line 1 for query SELECT ID FROM wp_posts WHERE post_type = ‘reply’ AND post_status != ‘trash’ AND post_author = 40 AND post_content = ‘Now testing @admin mention in a forum post.’ AND post_parent = ’9865′ LIMIT 1 made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), do_action(‘template_redirect’), call_user_func_array, bbp_template_redirect, do_action(‘bbp_template_redirect’), call_user_func_array, bbp_post_request, do_action(‘bbp_post_request’), call_user_func_array, bbp_new_reply_handler, bbp_check_for_duplicate`
Only happens with participants.
Can you replicate this in your error log at all?
Haha, sorry for being such a bloody noob JJ, do you have a version packaged up anywhere? I’ve never used SVN before or bleeding edge versions of stuff?
Is there a regular download link to the latest 2.3 beta?
Did you get a chance to test this @netweb?
I am only seeing this error when posting as a participant and using an @mention.
When I post as admin, I don’t get it?
Any ideas? Can you recreate it?
I’ve been debugging this for a while and it appears that I don’t get the erro if I post as admi, I only get it if I’m posting as a participant.
Could you try posting an @mention as a regular participant in the forum and see if you get it?
No idea why that would affect things, but it does seem to.
Will keep testing various scenarios!
Yep, looking at my error log, I get the same error occurring whenever anybody uses an @mention at all.
Not quite sure what to explore here as a cause.
Will see if I can recreate on any other installs.
Legendary! Yeah the blogname had that exact issue, so if that patch works, that’s absolutely awesome!
In terms of the @mentions, I’m going to go through the error log and see if it affects EVERY one of them, or just if it affects certain ones.
Will update soon!
Could this also be anything to do with the way I have my DB set up by any chance? Is there any kind of optimisation that can be done to speed up MySQL queries here?
Bloody hell, now the email subject looks fine above as it HASN’T been output as raw html in this forum.
The subject in the emails shows the apostrophe as pure html though.
It’s hard to show here as the forums seem to change html to how it should be displayed.
So to clarify:
- In my DB issue with the syntax, that ’ DOESN’T show in the error log – JUST IN THE FORUM POST – it shows in the error log as another single quote.
- The subject line of the bbpress notification emails is outputting the apostrophe as raw html.
The from address is fine and shows the apostrophe normally. It’s just the subject line that is wrong.
No it doesn’t, but ignore that ’ – it’s tripped for security here.
Hope that’s not confused stuff?
Just realised, the reason that you see the ’ in the URL is JUST THIS FORUM. It’s obviously stripping the second apostrophe JUST IN THIS FORUM.
Ignore that, it’s in 2 single quotes in my error log, it’s just because I’ve not posted it as code here.
I’ll try again here, see if it includes the second single quote.
`[19-Jan-2013 00:40:03 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘http://www.actonthis.tv/members/hardylane/’ rel=’nofollow’>@hardylane Trish ‘ at line 1 for query SELECT ID FROM wp_posts WHERE post_type = ‘reply’ AND post_status != ‘trash’ AND post_author = 11 AND post_content = ‘No worries! Say hello to Trish from me!
@hardylane Trish is still at Man Met isn\’t she Annie? I know Niamh has departed now.’ AND post_parent = ’12436′ LIMIT 1 made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), do_action(‘template_redirect’), call_user_func_array, bbp_template_redirect, do_action(‘bbp_template_redirect’), call_user_func_array, bbp_new_reply_handler, bbp_check_for_duplicate`
The URL displays fine in the error log, hopefully it will here now too.
Cheers for the update Stephen!
I’m still getting it, every single time I use an @mention>
Here’s one I got tonight:
[19-Jan-2013 00:40:03 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘http://www.mysite.com/members/hardylane/’ rel=’nofollow’>@hardylane Trish ‘ at line 1 for query SELECT ID FROM wp_posts WHERE post_type = ‘reply’ AND post_status != ‘trash’ AND post_author = 11 AND post_content = ‘No worries! Say hello to Trish from me!
@hardylane Trish is still at Man Met isn\’t she Annie? I know Niamh has departed now.’ AND post_parent = ’12436′ LIMIT 1 made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), do_action(‘template_redirect’), call_user_func_array, bbp_template_redirect, do_action(‘bbp_template_redirect’), call_user_func_array, bbp_new_reply_handler, bbp_check_for_duplicate
Any idea what I may need to change in my DB to stop this?
With regards to the email being sent out, the SUBJECT appears like this: (apostrophe is output as '
[My Site - The Actors' Network] Topic Name
So the apostrophe should appear as The Actors’ Network, but it’s stripped.
Not sure if the 2 problems are associated?
Thanks so much for your time!
Just wondering if anyone has had time to check their error log and see if ou get this also?
Write a forum post with an @mention and see if you get the error reported regarding syntax.
Sorry guys, was just testing out how tweets look embedded in forums. Must be some custom stuff going on in the main post over in these forums as it’s not embedded correctly.
Saying that though, submitting replies here on this site is pretty snappy!
Anything we can do to streamline our own sites?
I too would love to know if I can speed up my forums in buddypress.
I use regular site wide forums and the actual loading of the pages of the forums is great.
The sluggishness comes when posting an actual reply or topic.
Does anyone know if the number of voices in a thread, number of subscribers to it should have adverse affects on load time?
I have one topic that has 77 voices in it and quite a few may be subscribed. It takes about 7 seconds to submit a reply after hitting post.
Is that normal?
Strange thing is, is that even starting a new topic from scratch is slooowww too.
Has there been any changes to bbpress lately that will cause this? I don’t think it used to seem so sluggish.
yeah right now my site is heavily BuddyPress focused on a single site install and will more than likely never use multisite so I think the dynamic user role of ‘Member’ assigned to EVERYONE except admins will work just fine.
It’s nice to be able to control the forum privileges separately, I’d be wondering for a while how we could do that.
This way I can use all of my s2 member roles and then upgrade certain members to forum mods without affecting any of their paid for privileges.
Should help give my forums a boost too!
Thanks for your patience with all of my questions, it’s much appreciated! :O
Would that only really affect sites that were running BBPress standalone with WP?
It wouldn’t affect Buddypress profiles would it?
I’ve checked on my staging site, and the forums tabs with ‘created topics’ ‘replies’ etc still work great for users just assigned a ‘Member’ role with no specific BBPress role.
Nice explanation JJ, I now get it mate!
So all NEW signups that register will be assigned the ‘Member’ label dynamically if I don’t tick the box in the backend to make all new sign-ups a participant for example.
I’m cool with that if it’s the case.
I don’t anyone to have a specific role other than ‘Member’ unless I upgrade someone to a mod for example.
Leaving the box unchecked would thus stop any members thinking “why am I just a member when that guy is a participant’.
As long as all future members who end up with a S2 Member role will still be able to post as a ‘Member’, that works just great for me.
Is that right?