Support Forum
Support › MB Custom Table › Unregister Custom Table in Database / using Bricks BuilderResolved
Hi, I recently deleted a lot of custom tables. However, even if they are deleted when I want to save an in the Bricksbuilder Template, it tries to save Data or get Data from deleted Custom Tables.
And I checked the Templates that I'm using, and they are not using any of the Old Data Table Custom fields to get data.
My Question is how to completely unregister the deleted Data Tables.
Metabox 5.9.3
AIO 1.24.2
ID not it Tables 25027, 24377, 25073, 24920
tables try to save:
wp_mb_mixed_drinks
wp_mixing_instructions
wp_mb_RecipeIngredient
wp_ProducerGeneral
mb_references
mb_changelog
wp_mb_SAndFPublication
Debug Log
<div> [09-Feb-2024 12:42:24 UTC] WordPress database error Table 'wordpress_staging.wp_ProducerGeneral' doesn't exist for query SELECT * FROM wp_ProducerGeneral WHERE ID = 18828 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, Bricks\Api::render_element, Bricks\Ajax::render_element, Bricks\Element->init, Bricks\Element_Template->render, do_shortcode, preg_replace_callback, do_shortcode_tag, Bricks\Templates->render_shortcode, Bricks\Frontend::render_data, Bricks\Frontend::render_element, Bricks\Element->init, Bricks\Element_Container->render, Bricks\Frontend::render_element, Bricks\Element->init, Bricks\Element_Container->render, Bricks\Frontend::render_element, Bricks\Element->init, Bricks\Element_Template->render, do_shortcode, preg_replace_callback, do_shortcode_tag, Bricks\Templates->render_shortcode, Bricks\Frontend::render_data, Bricks\Frontend::render_element, Bricks\Element->init, Bricks\Element_Container->render, Bricks\Frontend::render_element, Bricks\Element->init, Bricks\Element_Container->render, Bricks\Frontend::render_element, Bricks\Element->init, Bricks\Element_Container->render, Bricks\Frontend::render_element, Bricks\Element->init, Bricks\Element_Accordion_Nested->render, Bricks\Frontend::render_children, Bricks\Frontend::render_element, Bricks\Element->init, Bricks\Element_Container->render, Bricks\Frontend::render_element, Bricks\Element->init, Bricks\Element_Container->render, Bricks\Frontend::render_element, Bricks\Element->init, Bricks\Element_Text->render, Bricks\Helpers::parse_editor_content, do_shortcode, preg_replace_callback, do_shortcode_tag, MBViews\Shortcode->render, MBViews\Renderer->render, eLightUp\Twig\Environment->render, eLightUp\Twig\TemplateWrapper->render, eLightUp\Twig\Template->render, eLightUp\Twig\Template->display, eLightUp\Twig\Template->displayWithErrorHandling, __TwigTemplate_098f63102b4a560346774e18c308719fe1c60b7bc1b4a86e698e8533ce264f14->doDisplay, elightup_twig_get_attribute, MBViews\Renderer\Base->__get, MBViews\Renderer\Post->get_data, MBViews\Renderer\Post->get_fields, MBViews\Renderer\MetaBox->get_data, rwmb_get_value, RWMB_Field::call, RWMB_Field::get_value, RWMB_Field::call, RWMB_Field::raw_meta, MetaBox\CustomTable\Storage->get, MetaBox\CustomTable\Cache::get </div>
Hello,
In the case of using Bricks Builder, please reach out to them if you have any issues with installation, configuration, compatibility, or usage.
Refer to our support policy https://metabox.io/support/topic/support-policy/
Im sorry but this answer, did not even answered my question.
So my issue is, that I have delete a Custom Table created by MetaBox Plugin.
And on my Bricks Template there is no relation in any shortcodes or custom fields to those Deleted Tables.
My question is how can I remove them from the System..... or in what file of MetaBox or WordPress I should search to solve the issue.
WordPress database error: Indicates that the error is related to a database operation in WordPress.
Table 'wordpress.wp_mixing_instructions' doesn't exist for query: States that the table named wp_mixing_instructions is not found in the database named wordpress. The query attempted to access this table.
SELECT * FROM wp_mixing_instructions WHERE ID = 9421: This is the SQL query that caused the error. It's a SELECT query attempting to retrieve all columns (*) from the wp_mixing_instructions table where the ID is equal to 9421.
made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, ...: This part of the error message indicates the sequence of function calls that led to the execution of the problematic query. It traces the path from the initial request to the point where the error occurred. It helps in debugging and identifying the context of the error.
MetaBox\CustomTable\Storage->get, MetaBox\CustomTable\Cache::get: Specific points in the code where the error occurred. It indicates that the issue is related to the MetaBox plugin's custom table functionality, particularly the Storage and Cache classes.
So, I trying to dig deeper.
I have two tabs open, and as long there is no Shortcode from MetaBox everything is fine.
But once I entered the Shortcode, just in the Builder even without saving I'm getting the error messages (that its trying to retrieve Data from Custom Tables That are not existing)
{% for item in post.recipe_source_recipe_source_individual_ta %}
{{ item.name }}
{% endfor %}
My question is then, is it really Bricks related? Because inline dynamic Data is functioning without any issue. It just appears once I use a shortcode
Problem Solved
My Mistake, I had somme Custom Fields still with the option to save into a custom table. So MB was running 3000 queries only on one Shortcode.
Sorry for my huge st++++pidity, shower that one will never happen again =)