Skip to:
Content

BuddyPress.org

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#5833 closed defect (bug) (fixed)

What's new activity update failing on undefined js var

Reported by: hnla Owned by: imath
Milestone: 2.1 Priority: normal
Severity: major Version:
Component: Activity Keywords: dev-feedback
Cc: hnla

Description

Attempting to post an activity update is failing due to var ltext being undefined.

We appear to have re-factored a section of js for activity stream updates lines: 184 through to 190.

line 190 if ( ltext !== '' ) {

was != and it was declared earlier as var ltext = jq('#activity-stream li.new-upd...

This now hangs on undefined variable after submitting the update.

Strict type comparison or 'null' doesn't change matters so to get running I've declared the variable before L:184 if block.

Change History (3)

#1 @imath
5 years ago

  • Component changed from Core to Activity
  • Milestone changed from Awaiting Review to 2.1

Hi @hnla,

Thanks for your feedback, I think it's due to the fact there's a '.' instead of a ',' at line 186.

As a result, I confirm that posting an activity from the user's profile generates the js error you mentioned.

I'm going to commit, it should fix the issue.

#2 @imath
5 years ago

  • Owner set to imath
  • Resolution set to fixed
  • Status changed from new to closed

In 8961:

On member's profile, make sure posting an activity updates the member's header latest activity.

in r8378, a mispunctuation: '.' instead of ',' introduced a javascript error preventing the member's latest activity to be updated.

Props hnla

Fixes #5833

#3 @hnla
5 years ago

Hmm interesting there's a discrepancy in files from my end, as that line termination error didn't show in the file updated from trunk it was correctly stated as ';', yet when I do a 'Diff' it does show, it's to do with fact I incorrectly used the src dir when setting up the new path to checkout from but I'm puzzled as to how this new format an grunt stuff does work.

Note: See TracTickets for help on using tickets.