• Resolved Michael Sutter

    (@michih)


    Hi

    I have a weird db error in my debug.log which prevents me creating new blog posts and new pages on my website (get the white screen there).
    So I deactivated the BLC plugin and installed it again, no luck.

    What causes this following issues and how I can fix them? Thanks in advance.

    [15-Nov-2023 07:49:08 UTC] WordPress database error Table 'db-name.wp_blc_links' doesn't exist for query SELECT link_id FROM wp_blc_links WHERE url = 'URL' made by do_action('wp_ajax_blc_work'), WP_Hook->do_action, WP_Hook->apply_filters, wsBrokenLinkChecker->ajax_work, wsBrokenLinkChecker->work, blcLink->check, blcLink->save
    [15-Nov-2023 07:49:08 UTC] WordPress database error Table 'db-name.wp_blc_links' doesn't exist for query INSERT INTO wp_blc_links( url, first_failure, last_check, last_success, last_check_attempt, check_count, final_url, redirect_count, log, http_code, request_duration, timeout, result_hash, broken, warning, false_positive, may_recheck, being_checked, status_text, status_code, dismissed ) VALUES( 'URL', '0000-00-00 00:00:00', '2023-11-15 07:49:03', '2023-11-15 07:49:03', '2023-11-15 07:49:03', 0, 'URL', 0, '=== HTTP-Code: 200 ===\n\nResponse headers\n================\nHTTP/2 200 \r\nx-pingback: /xmlrpc.php\r\nx-ua-compatible: IE=edge\r\nlink: </wp-json/>; rel="https://api.w.org/"\r\nlink: </wp-json/wp/v2/posts/13219>; rel="alternate"; type="application/json"\r\nlink: </?p=13219>; rel=shortlink\r\nvary: Accept-Encoding\r\ncontent-type: text/html; charset=UTF-8\r\ndate: Wed, 15 Nov 2023 07:49:08 GMT\r\nserver: Apache\r\n\r\nRequest headers\n================\nHEAD / HTTP/2\r\nHost: \r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.34 Safari/537.36\r\nAccept: */*\r\nReferer: \r\nConnection: close\r\n\r\n\nLink ist gültig.', 200, 0.108625, 0, '200|0|0|URL', 0, 0, 0, 1, 0, '', '', 0 ) made by do_action('wp_ajax_blc_work'), WP_Hook->do_action, WP_Hook->apply_filters, wsBrokenLinkChecker->ajax_work, wsBrokenLinkChecker->work, blcLink->check, blcLink->save
    [15-Nov-2023 07:49:08 UTC] WordPress database error Table 'db-name.wp_blc_links' doesn't exist for query SELECT DISTINCT links.*
    FROM wp_blc_links AS links
    				INNER JOIN wp_blc_instances AS instances USING(link_id)
    				WHERE
    					(
    						( last_check_attempt < '2023-11-12 07:49:08' )
    						OR
    						(
    							(broken = 1 OR being_checked = 1)
    							AND may_recheck = 1
    							AND check_count < 3
    							AND last_check_attempt < '2023-11-15 07:19:08'
    						)
    					)
    
    				AND
    					( instances.container_type IN ('comment', 'post', 'page', 'dummy', 'blogroll', 'vc_grid_item', 'vc4_templates', 'wp_template') )
    					AND ( instances.parser_type IN ('link', 'image', 'plaintext-url', 'youtube-iframe', 'youtube-embed', 'youtube-playlist-embed', 'googlevideo-embed', 'smart-youtube-embed', 'metadata', 'url_field', 'acf', 'vimeo-embed') )
    				
    ORDER BY last_check_attempt ASC
    LIMIT 30 made by do_action('wp_ajax_blc_work'), WP_Hook->do_action, WP_Hook->apply_filters, wsBrokenLinkChecker->ajax_work, wsBrokenLinkChecker->work, wsBrokenLinkChecker->get_links_to_check
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Michael Sutter

    (@michih)

    Got a new error now:

    [15-Nov-2023 08:35:41 UTC] PHP Fatal error:  Uncaught Error: Attempt to assign property "post_content" on null in /wp-admin/includes/post.php:795
    Stack trace:
    #0 /wp-admin/post-new.php(66): get_default_post_to_edit('page', true)
    #1 {main}
      thrown in /wp-admin/includes/post.php on line 795
    Plugin Support Zafer – WPMU DEV Support

    (@wpmudevsupport15)

    Hi @michih,

    I hope you are doing well today!

    The function get_default_post_to_edit is trying to generate a new page post for you in admin, where you can drop the content and publish it. Often this problem happens when a hook operated on post object even before it is initialized and ready for use.

    Please make sure your all installed plugins are compatible with your WordPress version. Incompatibility might break the object and it results null.

    Conduct plugin/theme conflict test by turning off all plugins and switch to the default theme to see if the error persist. If it disappears, then activate one by one to see which one causes it.

    Look if you have hooks (like ‘save_post’,’wp_insert_post’) connected, that are supposed to be executed during post creation in your theme/plugin, they might mess with post object during initialization phase.

    Please also provide us Site Health report which you can get from the WordPress admin dashboard Tools->Site Health->Info->Copy site info to clipboard

    Kind regards,
    Zafer

    Thread Starter Michael Sutter

    (@michih)

    Hi Zafer

    Thanks for your reply – tried several things, no luck.

    Solution
    Went over to phpmyadmin, selected the table “wp_posts“, choose the field “ID” and checked the flag for auto increment. Now it works like a charm.

    Cheers
    Michael

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘DB error with table “wp_blc_links”’ is closed to new replies.