Resolving Common Fatal Errors in Yoast Duplicate Post
Content
Yoast Duplicate Post is a powerful tool for WordPress site management, but like any complex plugin, it can sometimes encounter errors that cause conflicts or even crash your site. Based on community reports, this guide covers the most common fatal errors and their solutions.
Common Error 1: Function Redeclaration or Class Not Found
Error Example: Fatal error: Cannot redeclare duplicate_post_is_current_user_allowed_to_copy()... or Fatal error: Uncaught Error: Class 'YoastWPDuplicate_PostAdminOptions_Page' not found...
Why it happens: This typically occurs when your theme or another plugin has bundled an older version of the Duplicate Post code, leading to a conflict when the standalone plugin is activated. The 'Class not found' error can also indicate a incomplete plugin update where the new vendor files were not properly installed.
Solution:
- Check if your theme (e.g., OptimizePress) has its own duplication functionality. If so, you may not need the standalone plugin.
- If you require the plugin's features, contact your theme's support and ask if they can remove their bundled version to prevent the conflict.
- For the 'Class not found' error, try a clean reinstall: completely delete the
duplicate-postfolder via FTP/SFTP and then install a fresh copy from the WordPress repository.
Common Error 2: Argument Type Mismatch (TypeError)
Error Example: Argument 1 passed to ... must be an instance of WP_Post, null/string/bool given...
Why it happens: This was a known bug introduced in version 4.0 of the plugin. The code expected a WP_Post object but was sometimes receiving a different data type (like a user role string or a boolean) from other plugins or themes, particularly on admin screens not related to posts.
Solution:
- Update the plugin. The Yoast Duplicate Post team released patches for these specific issues. Ensure you are running the latest version.
- If updating doesn't resolve the issue, it may be due to a lingering conflict. The fastest way to check is a conflict test:
- Deactivate all other plugins except Yoast Duplicate Post.
- Switch to a default WordPress theme like Twenty Twenty-One.
- See if the error disappears. If it does, reactivate your plugins and theme one by one to identify the culprit. Popular conflict sources include membership/role plugins (like Members), page builders, and other admin utilities.
Common Error 3: Database Error on Settings Save
Error Example: WordPress database error: [Column ‘option_value’ cannot be null] UPDATE wp_options SET option_value = NULL...
Why it happens: This error suggests the plugin is trying to save a NULL value to the database for a setting that should not be empty, which violates the database structure.
Solution: This is often resolved in subsequent plugin updates. Update to the latest version. If the problem persists, you may need to manually check and repair your WordPress database tables using a tool like phpMyAdmin or your hosting provider's database management interface.
Common Error 4: PHP 8.2 Compatibility Error
Error Example: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given...
Why it happens: Newer versions of PHP (8.2+) have stricter type checking. The error occurs when the plugin tries to use the in_array() function with a null value instead of an array.
Solution:
- Update the plugin. The development team is aware of this issue and has fixed it in later releases.
- If an update is not immediately available, a workaround is to access your database (via phpMyAdmin or a similar tool), find the
wp_optionstable, and delete theduplicate_post_taxonomies_blacklistrow. Warning: Always back up your database before making direct changes.
General Troubleshooting Steps
For any error not listed above, follow these universal steps to isolate the cause:
- Update Everything: Ensure WordPress, your theme, and all plugins are updated to their latest versions. Many conflicts are resolved through updates.
- Conflict Test: As described above, deactivate all other plugins and switch to a default theme. This is the most reliable way to determine if the error is a conflict.
- Check Server Logs: Your web hosting provider likely has error logs (e.g., in cPanel) that can provide more detailed information about a fatal error than the white screen you see on the front end.
- Manual Plugin Reset: If your site is crashed and you cannot access the admin area, use FTP or your host's file manager to rename the
duplicate-postfolder insidewp-content/plugins/to something likeduplicate-post-OFF. This will deactivate the plugin and allow you to log back in.
Remember, when reporting bugs, providing the exact error message from your server logs and a list of your active plugins is incredibly helpful for developers to diagnose issues.
Related Support Threads Support
-
Unable to save postshttps://wordpress.org/support/topic/unable-to-save-posts-2/
-
The webpage cannot be found HTTP 400https://wordpress.org/support/topic/the-webpage-cannot-be-found-http-400/
-
WIdgets errorhttps://wordpress.org/support/topic/widgets-error-4/
-
DIVI 4 compatibility issuehttps://wordpress.org/support/topic/divi-4-compatibility-issue/
-
Update brokenhttps://wordpress.org/support/topic/update-broken-6/
-
Compatibility issue with Updateshttps://wordpress.org/support/topic/compatibility-issue-with-updates/
-
Uncaught Error: The script tried to modify a property on an incomplete objecthttps://wordpress.org/support/topic/uncaught-error-the-script-tried-to-modify-a-property-on-an-incomplete-object/
-
Error on plugin after updatehttps://wordpress.org/support/topic/error-on-plugin-after-update/
-
Fatal Error when duplicating a published posthttps://wordpress.org/support/topic/fatal-error-when-duplicating-a-published-post/
-
Error WP_POST_TYPE couldn’t’ be converted to stringhttps://wordpress.org/support/topic/error-wp_post_type-couldnt-be-converted-to-string/
-
PHP Fatal Errorhttps://wordpress.org/support/topic/php-fatal-error-394/
-
Widgets : The editor encountered an unexpected problem.https://wordpress.org/support/topic/widgets-the-editor-encountered-an-unexpected-problem/
-
[NSFW] Fatal Error on Installationhttps://wordpress.org/support/topic/fatal-error-on-installation-18/
-
plugin removing code in htaccess file causing 404 errorshttps://wordpress.org/support/topic/plugin-removing-code-in-htaccess-file-causing-404-errors/
-
WordPress automatic check: fatal errorhttps://wordpress.org/support/topic/wordpress-automatic-check-fatal-error/
-
Unable to save after last updatehttps://wordpress.org/support/topic/unable-to-save-after-last-update-2/
-
Fatal Error when attempting to activate pluginhttps://wordpress.org/support/topic/fatal-error-when-attempting-to-activate-plugin-3/
-
Admin errorhttps://wordpress.org/support/topic/admin-erro/
-
Plugin could not be activated because it triggered a fatal error.https://wordpress.org/support/topic/plugin-could-not-be-activated-because-it-triggered-a-fatal-error-150/
-
Error: call_user_func_array()https://wordpress.org/support/topic/error-call_user_func_array-5/
-
Error after update to 4.0 in amazon-auto-linkshttps://wordpress.org/support/topic/error-after-update-to-4-0-in-amazon-auto-links/
-
Getting Fatal error after Upgrade plugin to V4.0https://wordpress.org/support/topic/getting-fatal-error-after-upgrade-plugin-to-v4-0/
-
crashed site dev.homegrownbabies.comhttps://wordpress.org/support/topic/crashed-site-devhomegrownbabiescom/
-
Fatal error: Uncaught Error: Object of class stdClass could not be converted tohttps://wordpress.org/support/topic/fatal-error-uncaught-error-object-of-class-stdclass-could-not-be-converted-to/
-
TypeError: Cannot read property ‘getEditedPostAttribute’ of nullhttps://wordpress.org/support/topic/typeerror-cannot-read-property-geteditedpostattribute-of-null/
-
Fatal error: Allowed memory size of 536870912 bytes exhaustedhttps://wordpress.org/support/topic/fatal-error-allowed-memory-size-of-536870912-bytes-exhausted-5/
-
Fatal error after updating Yoast Duplicate Post version 4https://wordpress.org/support/topic/fatal-error-after-updating-yoast-duplicate-post-version-4/
-
[Fixed] Conflict with Mailsterhttps://wordpress.org/support/topic/conflict-with-mailster/
-
Critical Error on Post Clonehttps://wordpress.org/support/topic/critical-error-on-post-clone/
-
Uncaught ArgumentCountError: Too few arguments to functionhttps://wordpress.org/support/topic/uncaught-argumentcounterror-too-few-arguments-to-function-3/
-
Fatal error in 4.01https://wordpress.org/support/topic/fatal-error-in-4-01/
-
Update 4.3 Composer Bughttps://wordpress.org/support/topic/update-17-9-composer-bug/
-
WP 4.8 500 Errorhttps://wordpress.org/support/topic/wp-4-8-500-error/
-
Blocks Mailsterhttps://wordpress.org/support/topic/blocks-mailster/
-
Error after update to 4.0 in Members pluginhttps://wordpress.org/support/topic/error-after-update-to-4-0-in-members-plugin/
-
Problem with New WP Widgets Editor on Bridge Themehttps://wordpress.org/support/topic/problem-with-new-wp-widgets-editor-on-bridge-theme/
-
Casuses error ‘Uncaught TypeError: mediaelementplayer is not a function’https://wordpress.org/support/topic/casuses-error-uncaught-typeerror-mediaelementplayer-is-not-a-function/
-
PHP 8 errorshttps://wordpress.org/support/topic/php-8-errors-5/
-
“WordPress database error” when updating plugin settingshttps://wordpress.org/support/topic/wordpress-database-error-when-updating-plugin-settings/
-
After malware cleanup, getting json errorhttps://wordpress.org/support/topic/after-malware-cleanup-getting-json-error/
-
Fatal Error after Update to 4.0 (Classic Editor issue?)https://wordpress.org/support/topic/fatal-error-after-update-to-4-0-classic-editor-issue/
-
Post update failed – Technical issue with duplicate-post-options.phphttps://wordpress.org/support/topic/post-update-failed-technical-issue-with-duplicate-post-options-php/
-
Stopped working sometime after 3.4 for me…https://wordpress.org/support/topic/stopped-working-sometime-after-34-for-me/
-
An error occurred while deleting the Rewrite & Republish copy.https://wordpress.org/support/topic/an-error-occurred-while-deleting-the-rewrite-republish-copy/
-
Can't contact the authorhttps://wordpress.org/support/topic/cant-contact-the-author/
-
FATAL ERROR: Call to undefined method ClassLoader::setClassMapAuthoritative()https://wordpress.org/support/topic/fatal-error-call-to-undefined-method-classloadersetclassmapauthoritative/
-
[Plugin: Duplicate Post] FATAL ERROR on version 1.1https://wordpress.org/support/topic/plugin-duplicate-post-fatal-error-on-version-11/
-
Typ E_ERROR when editing menushttps://wordpress.org/support/topic/typ-e_error-when-editing-menus/
-
PHP Fatal error after updatinghttps://wordpress.org/support/topic/php-fatal-error-after-updating-2/
-
Fatal Error When Rewrite and Republish Is Clickedhttps://wordpress.org/support/topic/fatal-error-when-rewrite-and-republish-is-clicked/
-
Fatal Error on Update to 4.1.2https://wordpress.org/support/topic/fatal-error-on-update-to-4-1-2/
-
Update breaks my multisite!https://wordpress.org/support/topic/update-breaks-my-multisite/