Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NULL value of duplicate_post_taxonomies_blacklist is not processed correctly #263

Closed
aleks-lynx opened this issue Aug 16, 2022 · 2 comments · Fixed by #360
Closed

NULL value of duplicate_post_taxonomies_blacklist is not processed correctly #263

aleks-lynx opened this issue Aug 16, 2022 · 2 comments · Fixed by #360

Comments

@aleks-lynx
Copy link

Hi,

I found that "duplicate_post_taxonomies_blacklist" can be NULL sometimes, but the code expects an empty string only.

// duplicate-post/admin-functions.php:287
if ( $taxonomies_blacklist === '' ) {
    $taxonomies_blacklist = [];
}

NULL should be checked here as well, by using empty() for example.

Original post in the support forum:
https://wordpress.org/support/topic/taxonomies-are-not-copied-because-duplicate_post_taxonomies_blacklist-is-null/

We're using version 4.5 of the plugin at the moment.

@michael-sumner
Copy link
Contributor

Hey @aleks-lynx

Letting you know that I have also encountered the issue. I have created a fix for this:

#360

Were you still facing the issue, or did you manage to find an alternative — out of curiosity?

@aleks-lynx
Copy link
Author

Hey, as a temporary solution, I fixed that locally via actions dp_duplicate_page and dp_duplicate_post, so my code copies the taxonomies always correctly but after the plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants