#4225 closed defect (bug) (fixed)
Messages - View/1/ reply to: results in undefined index /headers sent
Reported by: | hnla | Owned by: | |
---|---|---|---|
Milestone: | 1.6 | Priority: | normal |
Severity: | minor | Version: | 1.2 |
Component: | Messages | Keywords: | has-patch |
Cc: | hnla |
Description
Not sure why this is occurring (BP 1.6), but sending reply to a message results in undefined index 'subject' in bp-messages-actions.php line 35.
line 35 checks for a $_POSTsubject?
if ( messages_new_message( array( 'thread_id' => $thread_id, 'subject' => $_POSTsubject?
/single/messages/single.php sends no 'subject'
<input type="hidden" id="thread_id" name="thread_id" value="<?php bp_the_thread_id(); ?>" />
<input type="hidden" id="messages_order" name="messages_order" value="<?php bp_thread_messages_order(); ?>" />
To correct this pro tem I've had to add:
<input type="hidden" id="thread_subject" name="subject" value="<?php bp_the_thread_subject() ?>" />
Haven't tested earlier versions, but checked the two files in 1.5.3.1 and they appear same as 1.6
Feel as though I've overlooked something somewhere
Attachments (2)
Change History (9)
#2
@
12 years ago
:) You can replicate it if you disable JS - yes I had forgoten I had disabled it *sigh*
However this exposes a weakness, in order to send messages you must have JS enabled?? why? shouldn't be the case really as that's not progressive enhancement.
If I leave the hidden input I added above to pass the subject line over with JS enabled it appears to not cause any upset but does mean there's a fallback.
#4
@
12 years ago
Hey hnla, duplicated! :)
Instead of adding the hidden input field, I've opted to add an empty subject check for messages_new_message()
in messages_action_view_message()
.
Great that you're testing BP without JS enabled!
I can't duplicate this bug. Testing on r6057. Can anyone else?