diff --git a/includes/admin/class-rop-admin.php b/includes/admin/class-rop-admin.php index 93b4ab746..4e5b30596 100644 --- a/includes/admin/class-rop-admin.php +++ b/includes/admin/class-rop-admin.php @@ -796,8 +796,7 @@ public function publish_now_attributes( $default ) { global $post; if ( in_array( $post->post_status, array( 'future', 'publish' ), true ) ) { - $default['action'] = 'yes' === get_post_meta( $post->ID, 'rop_publish_now', true ); - $default['instant_share_by_default'] = $default['action']; + $default['action'] = 'yes' === get_post_meta( $post->ID, 'rop_publish_now', true ); } $default['page_active_accounts'] = get_post_meta( $post->ID, 'rop_publish_now_accounts', true ); diff --git a/vue/src/vue-elements/sign-in-btn.vue b/vue/src/vue-elements/sign-in-btn.vue index eccb6da2e..54f3fe385 100644 --- a/vue/src/vue-elements/sign-in-btn.vue +++ b/vue/src/vue-elements/sign-in-btn.vue @@ -30,7 +30,7 @@ viewBox="0 0 512 512" fill="currentColor" > - + @@ -570,9 +570,12 @@ export default { updateState: false, data: data }).then(response => { - window.removeEventListener("message", event => this.getChildWindowMessage(event)); - this.authPopupWindow.close(); - window.location.reload(); + try { + window.removeEventListener("message", event => this.getChildWindowMessage(event)); + this.authPopupWindow.close(); + } finally { + window.location.reload(); + } }, error => { this.is_loading = false; Vue.$log.error('Got nothing from server. Prompt user to check internet connection and try again', error) @@ -589,8 +592,8 @@ export default { updateState: false, data: data }).then(response => { - window.removeEventListener("message", event => this.getChildWindowMessage(event)); try { + window.removeEventListener("message", event => this.getChildWindowMessage(event)); this.authPopupWindow.close(); // Sometimes this throws an error because of cross-origin frame. } catch(e) { // nothing to do @@ -613,9 +616,14 @@ export default { updateState: false, data: data }).then(response => { - window.removeEventListener("message", event => this.getChildWindowMessage(event)); - this.authPopupWindow.close(); - window.location.reload(); + try { + window.removeEventListener("message", event => this.getChildWindowMessage(event)); + this.authPopupWindow.close(); + } catch(e) { + // nothing to do + } finally { + window.location.reload(); + } }, error => { this.is_loading = false; Vue.$log.error('Got nothing from server. Prompt user to check internet connection and try again', error) @@ -632,9 +640,14 @@ export default { updateState: false, data: data }).then(response => { - window.removeEventListener("message", event => this.getChildWindowMessage(event)); - this.authPopupWindow.close(); - window.location.reload(); + try { + window.removeEventListener("message", event => this.getChildWindowMessage(event)); + this.authPopupWindow.close(); + } catch(e) { + // nothing to do + } finally { + window.location.reload(); + } }, error => { this.is_loading = false; Vue.$log.error('Got nothing from server. Prompt user to check internet connection and try again', error) @@ -651,9 +664,14 @@ export default { updateState: false, data: data }).then(response => { - window.removeEventListener("message", event => this.getChildWindowMessage(event)); - this.authPopupWindow.close(); - window.location.reload(); + try { + window.removeEventListener("message", event => this.getChildWindowMessage(event)); + this.authPopupWindow.close(); + } catch(e) { + // nothing to do + } finally { + window.location.reload(); + } }, error => { this.is_loading = false; Vue.$log.error('Got nothing from server. Prompt user to check internet connection and try again', error) @@ -670,9 +688,14 @@ export default { updateState: false, data: data }).then(response => { - window.removeEventListener("message", event => this.getChildWindowMessage(event)); - this.authPopupWindow.close(); - window.location.reload(); + try { + window.removeEventListener("message", event => this.getChildWindowMessage(event)); + this.authPopupWindow.close(); + } catch(e) { + // nothing to do + } finally { + window.location.reload(); + } }, error => { this.is_loading = false; Vue.$log.error('Got nothing from server. Prompt user to check internet connection and try again', error)