Skip to:
Content

bbPress.org

Opened 5 years ago

Closed 4 years ago

#3385 closed defect (bug) (fixed)

"Answer to" (_bbp_reply_to) will not be stored

Reported by: peterkueger's profile peterkueger Owned by: johnjamesjacoby's profile johnjamesjacoby
Milestone: 2.6.6 Priority: low
Severity: normal Version:
Component: Component - Replies Keywords:
Cc:

Description

This is my first report here. I hope, I give you all wanted infomation...

If I click to "ANSWER" to an existing reply (or topic) the answer will not stored into the database.

If I click to that link, I will be forwarded to:
forums/topic/test-topic/page/2/?bbp_reply_to=2002&_wpnonce=2fa94ab9df#new-post
This is a GET request.

After this, the form field "bbp_reply_to" should be filled in
bbpress/includes/common/template.php on line 1757 with this code:

<input type="hidden" name="bbp_reply_to"    id="bbp_reply_to"    value="<?php bbp_form_reply_to(); ?>" />

The function bbp_form_reply_to calls the function bbp_get_form_reply_to in
bbpress/includes/replies/template.php and the result should be generated with this code in line 2496:

		if ( bbp_is_reply_form_post_request() && isset( $_REQUEST['bbp_reply_to'] ) ) {
			$reply_to = bbp_validate_reply_to( $_REQUEST['bbp_reply_to'] );
		}

But this fails, since bbp_is_reply_form_post_request() results with "false", because we're on a GET request.

So the mentioned form field will not be filled and because of this not inserted into the database.

PS
I'm very impressed about bbPress: It's very stable!!!

Attachments (1)

jjj-sc-2020-08-13 at 14.33.57@2x.png (156.8 KB) - added by johnjamesjacoby 5 years ago.

Download all attachments as: .zip

Change History (13)

#1 follow-up: @johnjamesjacoby
5 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 2.6.6
  • Owner set to johnjamesjacoby
  • Status changed from new to assigned

Hey @peterkueger, thank you for finding this, and for the kind words about bbPress!

I’ll make sure this gets fixed up in the next minor release. Sorry for the trouble and thank you for the detailed report.

#2 in reply to: ↑ 1 @peterkueger
5 years ago

Hey @johnjamesjacoby,

you are greasy! I have to spend so much time to find a bug - and you want to fix them immediately? Seems I have to search further more... ;-)

Thanks a lot!!!

PS
Before I installed bbPress I tried to use wpForo. Until now, I found nearly 100 bugs there. And the developer are not interested to understand them.

#3 follow-up: @peterkueger
5 years ago

Hey @johnjamesjacoby,

the "ANSWER" link of the topic (first reply in the topic) does not set the bbp_reply_to too. There will not be initiated an extra GET request and because of this the hidden input field will not be set.

Did I find a second bug?

#4 @johnjamesjacoby
5 years ago

In 7130:

Replies: remove post-form check from bbp_get_form_reply_to().

This commit reinstates the reply-to hierarchy when used inside of a non-POST request, namely via theme-side GET requests where JavaScript may not be relied upon.

In trunk, for 2.7.

See #3385.

#5 @johnjamesjacoby
5 years ago

In 7131:

Replies: remove post-form check from bbp_get_form_reply_to().

This commit reinstates the reply-to hierarchy when used inside of a non-POST request, namely via theme-side GET requests where JavaScript may not be relied upon.

In branches/2.6, for 2.6.6.

See #3385.

#6 in reply to: ↑ 3 @johnjamesjacoby
5 years ago

Replying to peterkueger:

the first reply in the topic does not set the bbp_reply_to
Did I find a second bug?

I don't think this is another bug, but it may be related. It appears to work OK in my testing. Going to attach a screenshot shortly to show a reply to the first reply.

#7 @johnjamesjacoby
5 years ago

  • Keywords needs-patch removed
  • Resolution set to fixed
  • Status changed from assigned to closed

Closing as fixed. Please reopen if this ends up not being fixed for you, or not fixed correctly/fully.

Thanks again for helping make bbPress better @peterkueger!

#8 @peterkueger
4 years ago

Now (2.6-7137) works fine for me. Thank you.

#9 @peterkueger
4 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Sorry, but the problem still exists.

It's present, since "bbp_thread_replies()" returns 'false' on my end and because of this, the 'js/reply.js' will not be enclosed.

bbpress/src/templates/default/bbpress-function.php, line 183

#10 @johnjamesjacoby
4 years ago

It's present, since "bbp_thread_replies()" returns 'false' on my end and because of this, the 'js/reply.js' will not be enclosed.

If I understand correctly, this is intentional. If replies are not threaded, there is no parent reply for _bbp_reply_to ID to be saved against, other than the topic ID, which is already represented in other ways.

If what you're asking for, is the "reply" link to continue to store the reply hierarchy even when threaded replies are disabled, I think that might be a different type of feature request. If so, please re-close this ticket and create a new enhancement, if you would be so kind. 🙏

#11 @johnjamesjacoby
4 years ago

In 7147:

Replies: fix clicking "Reply" link from the lead topic.

This commit adjusts reply.js and bbp_get_topic_reply_link() so clicking "Reply" from the lead topic now behaves similarly to clicking "Reply" from a reply. This includes support for hierarchical replies being on or off.

In branches/2.6, for 2.6.6. See #3385.

#12 @johnjamesjacoby
4 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 7148:

Replies: fix clicking "Reply" link from the lead topic.

This commit adjusts reply.js and bbp_get_topic_reply_link() so clicking "Reply" from the lead topic now behaves similarly to clicking "Reply" from a reply. This includes support for hierarchical replies being on or off.

In trunk, for 2.7. Fixes #3385.

Note: See TracTickets for help on using tickets.