Opened 7 years ago

Closed 6 years ago

#2786 closed defect (bug) (fixed)

Follow link: JS error, JS confirm, and inability to unfollow

Reported by: afercia's profile afercia Owned by: obenland's profile obenland
Milestone: Priority: low
Component: Make (Get Involved) / P2 Keywords:


On a make post, for example:

When I click the "Follow" link below the post I get a JS error:
base.js:149 Uncaught TypeError: Cannot use 'in' operator to search for 'data' in null

then, when I click on any other link to leave the page, I get a JS confirm "stay/leave".

When clicking again on the link to unfollow, same JS error and when I visit again the page later, the link is still set on "Follow".

Change History (4)

#1 @ocean90
7 years ago

  • Component changed from General to Make (Get Involved) / P2
  • Priority changed from normal to low

Jetpack Subscriptions doesn't provide an API to unsubscribe so you'd have to do that on

#2 @obenland
6 years ago

  • Owner set to pento
  • Status changed from new to assigned

@pento Is this something you could look at? I was able to reproduce

#3 @pento
6 years ago

  • Owner pento deleted

In mu-plugins/pub/jetpack-follow-link-for-o2.php, add this before the final die in handle_following_action().

(I saw you were shuffling these plugins around, so I haven't made the change. Also, I'm AFK from the end of this week.)

// Echo success if this was an AJAX request, otherwise redirect
if ( isset( $_GET['ajax'] ) ) {
        echo '1';
} else {
        wp_safe_redirect( get_permalink( $post_id ) );

#4 @obenland
6 years ago

  • Owner set to obenland
  • Resolution set to fixed
  • Status changed from assigned to closed

In 6423:

O2 Follow: Avoid JS errors when following comments.

Props pento.
Fixes #2786.

Note: See TracTickets for help on using tickets.