• Resolved relicpelican

    (@relicpelican)


    Installed Network Posts Extended a few years ago and it has been working flawlessly since. (Awesome plugin BTW) I moved the website to another server and now no posts are showing for any of the short codes. There doesn’t seem to be any errors, just empty div tags. Tried deleting and reinstalling the plugin. Tried just basic short code and still get nothing. The entire site was cloned to the new server and then the IP updated at the registry, everything else on the WordPress site/network works fine. The server was very similar to the original but a few things changed (Ubuntu 20.04 -> Ubuntu 22.04, MariaDB -> MySQL.)

    Getting this in the debug log

    [16-Jun-2024 22:34:44 UTC] WordPress database error Access denied for user r’@’localhost’ to database ” for query CREATE TEMPORARY TABLE u21_network_posts_results AS SELECT ID,1 as blog_id,post_title,post_excerpt,post_content,post_author,post_date,post_type FROM u21_posts WHERE (post_type=’post’) AND (u21_posts.post_password=”) AND (post_status=”publish”) made by require(‘wp-admin/edit-form-blocks.php’), block_editor_rest_api_preload, array_reduce, rest_preload_api_request, rest_do_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, WP_REST_Posts_Controller->get_item, WP_REST_Posts_Controller->prepare_item_for_response, apply_filters(‘the_content’), WP_Hook->apply_filters, do_shortcode, preg_replace_callback, do_shortcode_tag, netsposts_shortcode, NetworkPosts\Components\db\NetsPostsQuery->get_posts, NetworkPosts\Components\db\NetsPostsQuery->get_rows, NetworkPosts\Components\db\NetsPostsQuery->create_temporary_table

    [16-Jun-2024 22:34:44 UTC] WordPress database error Table ‘.u21_network_posts_results’ doesn’t exist for query INSERT INTO u21_network_posts_results SELECT ID,9 as blog_id,post_title,post_excerpt,post_content,post_author,post_date,post_type FROM u21_9_posts WHERE (post_type=’post’) AND (u21_9_posts.post_password=”) AND (post_status=”publish”) made by require(‘wp-admin/edit-form-blocks.php’), block_editor_rest_api_preload, array_reduce, rest_preload_api_request, rest_do_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, WP_REST_Posts_Controller->get_item, WP_REST_Posts_Controller->prepare_item_for_response, apply_filters(‘the_content’), WP_Hook->apply_filters, do_shortcode, preg_replace_callback, do_shortcode_tag, netsposts_shortcode, NetworkPosts\Components\db\NetsPostsQuery->get_posts, NetworkPosts\Components\db\NetsPostsQuery->get_rows, NetworkPosts\Components\db\NetsPostsQuery->insert_temp_data

    Seems to be a db permission issue. Any suggestions or direction would be greatly appreciated.
    Thanks, Danny

    • This topic was modified 5 months, 1 week ago by relicpelican.
    • This topic was modified 5 months, 1 week ago by relicpelican.
Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Author johnzenausa

    (@johnzenausa)

    @relicpelican

    can you check to see if all the shortcode brackets were converted to their html codes. For example:

    [netsposts] will be converted to [netsposts]

    If everything is okay I’ll look further.

    Thread Starter relicpelican

    (@relicpelican)

    It doesn’t appear they are being converted. I’m using a shortcode block from the block editor to add short code. Here is the code from the code editor:

    <!-- wp:shortcode -->
    [netsposts shortcode_id='npe-3' thumbnail='true' list='20' meta_info='false' link_open_new_window='false' title_length_characters='30' excerpt_letters_length='40' include_link_title='true' order_post_by='date_order desc' taxonomy='cycling,concretelifting,concreterepair,wine,denture-facts,private-preschools,wedding-planning,yoga,law']
    <!-- /wp:shortcode -->
    Thread Starter relicpelican

    (@relicpelican)

    So I tried installing NPE on another WordPress multisite on the same server. This website never had NPE installed before. I did a basic short code [netsposts] and got the same error:

    [17-Jun-2024 15:22:47 UTC] WordPress database error Access denied for user ‘xxxx’@’localhost’ to database ‘xxxx’ for query CREATE TEMPORARY TABLE aam_network_posts_results AS SELECT ID,1 as blog_id,post_title,post_excerpt,post_content,post_author,post_date,post_type FROM aam_posts WHERE (post_type=’post’) AND (aam_posts.post_password=”) AND (post_status=”publish”) made by require(‘wp-blog-header.php’), wp, WP->main, WP->parse_request, do_action_ref_array(‘parse_request’), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, WP_REST_Posts_Controller->update_item, WP_REST_Posts_Controller->prepare_item_for_response, apply_filters(‘the_content’), WP_Hook->apply_filters, do_shortcode, preg_replace_callback, do_shortcode_tag, netsposts_shortcode, NetworkPosts\Components\db\NetsPostsQuery->get_posts, NetworkPosts\Components\db\NetsPostsQuery->get_rows, NetworkPosts\Components\db\NetsPostsQuery->create_temporary_table

    Plugin Author johnzenausa

    (@johnzenausa)

    what version of php are you using?

    Plugin Author johnzenausa

    (@johnzenausa)

    Plus if you’re using fast php change it to standard please.

    Thread Starter relicpelican

    (@relicpelican)

    using php 8.3 (was on 8.2 so I upgraded but it made no difference)

    when you say fast php are you referring to fpm?

    Plugin Author johnzenausa

    (@johnzenausa)

    Seem’s like the path to the database has changed. Looking for a fix.

    Plugin Author johnzenausa

    (@johnzenausa)

    Did you setup a wildcard domain in the new server for your website?

    Plugin Author johnzenausa

    (@johnzenausa)

    Can you do me a favor and run this:

    define (‘WP_ALLOW_REPAIR’, true);

    the following code goes on the wp-config file.

    Plugin Author johnzenausa

    (@johnzenausa)

    If you have access to phpmyadmin try repairing the database this way first. Let me know if you have any problems and also let me know if it worked.

    Plugin Author johnzenausa

    (@johnzenausa)

    One last thing. Is your disk space as big as the last host?

    Plugin Author johnzenausa

    (@johnzenausa)

    According to the image below this is a disk space error. Please show this to your hosting provider.

    Thread Starter relicpelican

    (@relicpelican)

    So I ran the repair.php with define (‘WP_ALLOW_REPAIR’, true); added to the wp-config.php file and here are the results:

    The u21_users table is okay.

    The u21_usermeta table is okay.

    The u21_posts table is okay.

    The u21_comments table is okay.

    The u21_links table is okay.

    The u21_options table is okay.

    The u21_postmeta table is okay.

    The u21_terms table is okay.

    The u21_term_taxonomy table is okay.

    The u21_term_relationships table is okay.

    The u21_termmeta table is okay.

    The u21_commentmeta table is okay.

    The u21_actionscheduler_actions table is okay.

    The u21_actionscheduler_claims table is okay.

    The u21_actionscheduler_groups table is okay.

    The u21_actionscheduler_logs table is okay.

    The u21_blogs table is okay.

    The u21_blogmeta table is okay.

    The u21_signups table is okay.

    The u21_site table is okay.

    The u21_sitemeta table is okay.

    The u21_registration_log table is okay.

    Repairs complete. Please remove the following line from wp-config.php to prevent this page from being used by unauthorized users.

    define('WP_ALLOW_REPAIR', true);

    I also ran a repair and optimize and then a repair again with no luck.

    Here is the errors from the debug log after I ran the repair.

    [18-Jun-2024 00:34:26 UTC] WordPress database error Table ‘xxxx.u21_network_posts_results’ doesn’t exist for query SELECT * FROM u21_network_posts_results GROUP BY ID, blog_id ORDER BY post_date desc LIMIT 0, 100 made by require(‘wp-blog-header.php’), wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts, do_action_ref_array(‘pre_get_posts’), WP_Hook->do_action, WP_Hook->apply_filters, SEOPress\Actions\Sitemap\Render->render, SEOPress\Services\Sitemap\Render\Single->render, include_once(‘/plugins/wp-seopress/templates/sitemap/single.php’), do_shortcode, preg_replace_callback, do_shortcode_tag, netsposts_shortcode, NetworkPosts\Components\db\NetsPostsQuery->get_posts, NetworkPosts\Components\db\NetsPostsQuery->get_rows

    [18-Jun-2024 00:34:26 UTC] WordPress database error Access denied for user ‘xxxx’@’localhost’ to database ‘xxxx’ for query CREATE TEMPORARY TABLE u21_network_posts_results725 (post_id BIGINT UNSIGNED,name VARCHAR(200),slug VARCHAR(200),taxonomy VARCHAR(32),blog_id SMALLINT) made by require(‘wp-blog-header.php’), wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts, do_action_ref_array(‘pre_get_posts’), WP_Hook->do_action, WP_Hook->apply_filters, SEOPress\Actions\Sitemap\Render->render, SEOPress\Services\Sitemap\Render\Single->render, include_once(‘/plugins/wp-seopress/templates/sitemap/single.php’), do_shortcode, preg_replace_callback, do_shortcode_tag, netsposts_shortcode, NetworkPosts\DB\Category\NetsPostsCategoryQuery->get_query_table, NetworkPosts\Components\DB\NetsPostsTemporaryTableManager->create_empty, NetworkPosts\Components\DB\NetsPostsTemporaryTableManager->create_new

    I do not have phpmyadmin installed on the server so I could not use it’s repair utility.

    I have loads of disk space (80Gb left). It is not a shared hosting account. It is a cloud server running Ubuntu 22.04, Nginx w/Redis page cache and MySQL.

    I moved the whole site from another cloud server which was running Ubuntu 20.04 and MariaDB. I used a ‘move site’ utility provide by my cloud server control panel (SpinupWP) so I am not sure how the MariaDB version of my database got converted to the MySQL version and suspect an issue may have arisen there. I thought uninstalling and deleting NPE and then reinstalling would take care of it but that didn’t help. I also tried a fresh install of NPE on different WP multisite running on the same cloud server and it throws the same errors. However that site was also moved the same way (i.e. going from MariaDB to MySQL) so… idk.

    Thank you kindly for your assistance. I am open to any suggestions.

    Plugin Author johnzenausa

    (@johnzenausa)

    when it got moved over some tables are corrupted. I could help but WordPress won’t allow me to. See if you can talk to your host if they can fix it via phpmyadmin.

    Plugin Author johnzenausa

    (@johnzenausa)

    This is a question to wordpress. Am I allowed to have the user go to my site and fill out a support request?

Viewing 15 replies - 1 through 15 (of 17 total)
  • You must be logged in to reply to this topic.