Skip to content

Commit

Permalink
Uncaught TypeError: Cannot read properties of undefined (reading 'non…
Browse files Browse the repository at this point in the history
…ce') at coauthors-migration.min.js #1884
  • Loading branch information
ojopaul committed Aug 7, 2024
1 parent 83f4334 commit 5382799
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion defines.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
defined('ABSPATH') or die('No direct script access allowed.');

if (!defined('PP_AUTHORS_LOADED')) {
define('PP_AUTHORS_VERSION', '4.7.1');
define('PP_AUTHORS_VERSION', '4.7.1.1');
define('PP_AUTHORS_FILE', 'publishpress-authors/publishpress-authors.php');
define('PP_AUTHORS_BASE_PATH', plugin_dir_path(__DIR__ . '/publishpress-authors.php'));
define('PP_AUTHORS_MODULES_PATH', PP_AUTHORS_BASE_PATH . 'src/modules/');
Expand Down
2 changes: 1 addition & 1 deletion src/assets/js/coauthors-migration.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/assets/js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jQuery(document).ready(function ($) {

var ppmaTab = 'ppma-tab-general';

if (typeof ppmaSettings != 'undefined' && typeof ppmaSettings.tab != 'undefined') {
if (typeof ppmaSettings != 'undefined' && typeof ppmaSettings.tab != 'undefined' && ppmaSettings.tab !== '') {
ppmaTab = ppmaSettings.tab;
$('#publishpress-authors-settings-tabs a[href="#' + ppmaTab + '"]').click();
} else if (browserSupportStorage() && getStorageData('ppma_settings_active_tab')) {
Expand Down
10 changes: 5 additions & 5 deletions src/modules/multiple-authors/assets/js/coauthors-migration.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class PPAuthorsCoAuthorsMigrationBox extends React.Component {
async: false,
data: {
action: 'get_coauthors_migration_data',
nonce: this.props.nonce
nonce: self.props.nonce
},
success: function (response) {
self.setState({
Expand Down Expand Up @@ -82,7 +82,7 @@ class PPAuthorsCoAuthorsMigrationBox extends React.Component {
async: false,
data: {
action: 'finish_coauthors_migration',
nonce: this.props.nonce
nonce: self.props.nonce
},
success: function (response) {
onFinishCallBack();
Expand All @@ -108,8 +108,8 @@ class PPAuthorsCoAuthorsMigrationBox extends React.Component {
url: ajaxurl,
data: {
action: 'migrate_coauthors',
nonce: this.props.nonce,
chunkSize: this.state.chunkSize
nonce: self.props.nonce,
chunkSize: self.state.chunkSize
},
success: function (response) {
let totalMigrated = self.state.totalMigrated + self.state.chunkSize;
Expand Down Expand Up @@ -194,7 +194,7 @@ class PPAuthorsCoAuthorsMigrationBox extends React.Component {
url: ajaxurl,
data: {
action: 'deactivate_coauthors_plus',
nonce: this.props.nonce
nonce: self.props.nonce
},
success: function (response) {
self.setState({
Expand Down
Loading

0 comments on commit 5382799

Please sign in to comment.