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

The script tried to modify a property on an incomplete object. #316

Open
3 of 9 tasks
Cooky101 opened this issue Jul 30, 2023 · 0 comments
Open
3 of 9 tasks

The script tried to modify a property on an incomplete object. #316

Cooky101 opened this issue Jul 30, 2023 · 0 comments

Comments

@Cooky101
Copy link

Cooky101 commented Jul 30, 2023

  • I've searched for any related issues and avoided creating a duplicate issue.

Please give us a description of what happened

Recently, the function "new draft" in the post list started throwing an uncaught PHP error and shows the white screen with "Your page encountered a severe issue." instead of the WP admin backend. Something goes wrong inside the duplicate_post function as it looks...

To Reproduce

Step-by-step reproduction instructions

  1. In the post list, click on "New draft"

Expected results

  1. The post is cloned into a new draft without errors.

Actual results

  1. The post is cloned into a new draft and an uncaught PHP error is issued: The script tried to modify a property on an incomplete object.

Screenshots, screen recording, code snippet

[30-Jul-2023 08:16:07 UTC] PHP Fatal error: Uncaught Error: The script tried to modify a property on an incomplete object. Please ensure that the class definition "Wpil_Model_Link" of the object you are trying to operate on was loaded before unserialize() gets called or provide an autoloader to load the class definition in /var/web/site/public_html/wp-includes/formatting.php:5058

PHP Stacktrace:

undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
/var/web/site/public_html/wp-includes/formatting.php(5053): map_deep(Object(__PHP_Incomplete_Class), 'duplicate_post_...')
/var/web/site/public_html/wp-content/plugins/duplicate-post/admin-functions.php(400): map_deep(Array, 'duplicate_post_...')
/var/web/site/public_html/wp-content/plugins/duplicate-post/admin-functions.php(424): duplicate_post_addslashes_deep(Array)
/var/web/site/public_html/wp-content/plugins/duplicate-post/admin-functions.php(386): duplicate_post_wp_slash(Array)
/var/web/site/public_html/wp-includes/class-wp-hook.php(310): duplicate_post_copy_post_meta_info(19351, Object(WP_Post))
/var/web/site/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array)
/var/web/site/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
/var/web/site/public_html/wp-content/plugins/duplicate-post/admin-functions.php(721): do_action('dp_duplicate_po...', 19351, Object(WP_Post), 'draft')
/var/web/site/public_html/wp-content/plugins/duplicate-post/src/handlers/link-handler.php(87): duplicate_post_create_duplicate(Object(WP_Post), 'draft')
/var/web/site/public_html/wp-includes/class-wp-hook.php(308): Yoast\WP\Duplicate_Post\Handlers\Link_Handler->new_draft_link_action_handler('')
/var/web/site/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array)
/var/web/site/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
/var/web/site/public_html/wp-admin/admin.php(419): do_action('admin_action_du...')
{main} thrown in /var/web/site/public_html/wp-includes/formatting.php on line 5058

Technical info

  • If relevant, which editor is affected (or editors):
  • Block Editor
  • Gutenberg Editor
  • Classic Editor
  • Other:
  • Which browser is affected (or browsers):
  • Chrome
  • Firefox
  • Safari
  • Other:

Used versions

  • Device you are using: HP ENVY x360
  • Operating system: Windows 11 Home
  • PHP version: 8.0
  • WordPress version: 6.2.2
  • WordPress Theme: Astra 4.1.6
  • Yoast Duplicate Post version: 4.5
  • Gutenberg plugin version:
  • Classic Editor plugin version:
  • Relevant plugins in case of a bug:
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

No branches or pull requests

1 participant