• Hello Astra,

    I had published my problem here https://www.ads-software.com/support/topic/product-page-not-working-anymore-php-warning/#new-topic-0 but I have been suggested to publish it here…

    So I played with php and I am inserting the prices values directly in database, my script is working fine (no problem at all)…even though I had to do some tests before it worked…Maybe it is because of my mistakes but now product pages are not really working anymore

    at top of page I have 2 php warnings

    ning: foreach() argument must be of type array|object, int given in?/var/home/virtuelt/public_html/***/wp-content/plugins/elementor/core/files/css/post.php?on line?171

    Warning: foreach() argument must be of type array|object, int given in?/var/home/virtuelt/public_html/***/wp-content/plugins/elementor/core/files/css/post.php?on line?171

    and at end of page (only a part of page is being rendered) : here I have a long Fatal error looking like this

    : Uncaught TypeError: Elementor\Core\Page_Assets\Loader::enable_assets(): Argument #1 ($assets_data) must be of type array, string given, called in /var/home/virtuel/public_html//wp-content/plugins/elementor/core/base/elements-iteration-actions/assets.php on line 177 and defined in /var/home/virtuel/public_html//wp-content/plugins/elementor/core/page-assets/loader.php:52
    Stack trace: 0 /var/home/virtuelt/public_html/***/wp-content/plugins/elementor/core/base/elements-iteration-actions/assets.php(177): Elementor\Core\Page_Assets\Loader->enable_assets() 1 /var/home/virtuelt/public_html/***/wp-content/plugins/elementor/core/base/document.php(1927): Elementor\Core\Base\Elements_Iteration_Actions\Assets->__construct() 2 /var/home/virtuelt/public_html/***/wp-content/plugins/elementor/core/base/document.php(1880): Elementor\Core\Base\Document->get_elements_iteration_actions() 3 /var/home/virtuelt/public_html/***/wp-content/plugins/elementor/core/base/document.php(1782): Elementor\Core\Base\Document->get_runtime_elements_iteration_actions() 4 /var/home/virtuelt/public_html/***/wp-content/plugins/elementor/core/base/document.php(1183): Elementor\Core\Base\Document->print_elements() 5 /var/home/virtuelt/public_html/***/wp-content/plugins/elementor/includes/frontend.php(1165): Elementor\Core\Base\Document->print_elements_with_wrapper() 6 /var/home/virtuelt/public_html/***/wp-content/plugins/elementor/includes/frontend.php(1060): Elementor\Frontend->get_builder_content() 7 /var/home/virtuelt/public_html/***/wp-includes/class-wp-hook.php(324): Elementor\Frontend->apply_builder_in_content() 8 /var/home/virtuelt/public_html/***/wp-includes/plugin.php(205): WP_Hook->apply_filters() 9 /var/home/virtuelt/public_html/***/wp-includes/post-template.php(256): apply_filters() 10 /var/home/virtuelt/public_html/***/wp-content/plugins/woocommerce/templates/single-product/tabs/description.php(30): the_content() 11 /var/home/virtuelt/public_html/***/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include(‘/var/home/virtu…’) 12 /var/home/virtuelt/public_html/***/wp-content/plugins/woocommerce/includes/wc-template-functions.php(1870): wc_get_template() 13 /var/home/virtuelt/public_html/***/wp-content/plugins/woocommerce/templates/single-product/tabs/tabs.php(47): woocommerce_product_description_tab() 14 /var/home/virtuelt/public_html/***/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include(‘/var/home/virtu…’) 15 /var/home/virtuelt/public_html/***/wp-content/plugins/woocommerce/includes/wc-template-functions.php(1632): wc_get_template() 16 /var/home/virtuelt/public_html/***/wp-includes/class-wp-hook.php(324): woocommerce_output_product_data_tabs() 17 /var/home/virtuelt/public_html/***/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() 18 /var/home/virtuelt/public_html/***/wp-includes/plugin.php(517): WP_Hook->do_action() 19 /var/home/virtuelt/public_html/***/wp-content/plugins/woocommerce/templates/content-single-product.php(72): do_action() 20 /var/home/virtuelt/public_html/***/wp-includes/template.php(792): require(‘/var/home/virtu…’) 21 /var/home/virtuelt/public_html/***/wp-content/plugins/woocommerce/includes/wc-core-functions.php(284): load_template() 22 /var/home/virtuelt/public_html/***/wp-content/plugins/woocommerce/templates/single-product.php(37): wc_get_template_part() 23 /var/home/virtuelt/public_html/***/wp-includes/template-loader.php(106): include(‘/var/home/virtu…’) 24 /var/home/virtuelt/public_html/***/wp-blog-header.php(19): require_once(‘/var/home/virtu…’) 25 /var/home/virtuelt/public_html/***/index.php(17): require(‘/var/home/virtu…’) 26 {main}

    thrown in on line 52

    thank for for any help that you can give me, I am ready to do all kind of test (deactivate plugin, switch theme, and stuff like that…if you think it can help me)

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Gérald Mardirossian

    (@gerald-mardirossian)

    while modifying the prices, I did a wrong sql query : and I was updating in wp_postmeta the whole “meta_value” which was not the good sql query that I needed : example >

     $sql = "UPDATE wp_postmeta SET meta_value='999666' WHERE post_id='95';";
    

    then I fixed my query (it is working as expected now), but it broke product page (which was working before I did that….)

    Thread Starter Gérald Mardirossian

    (@gerald-mardirossian)

    I tried a few things (repairing database with plugin and wordpress, deactivating and installing again elementor, etc. nothing worked)
    Also : I noticed that I can still access the product page from the backoffice, I can “edit with elementor” (here some of the blocks have disappeared, not a problem though….problem is that when trying to save I get “Server Error 500”
    thank you if you have any idea on how I Could solve the problem….

    Hi @gerald-mardirossian,

    There’s nothing on the error message that points to Astra, so not sure if this is Astra related.

    Anyway, as you mentioned about switching theme and deactivating plugins. Did you mean everything works fine when you switch the theme to the default WooCommerce theme, Storefront? Also, with all of the plugins deactivated, except WooCommerce, you have no issue?

    I look forward to hearing from you.

    Kind regards,
    Herman ??

    Thread Starter Gérald Mardirossian

    (@gerald-mardirossian)

    from all the tests I have done, I couldn’t save the problem
    I gave up…backupped everything that was possible and build the site again withouth messing the database this time….now it is working
    thank again for your help : )

    Hi @gerald-mardirossian,

    As the WooCommerce support mentioned in the thread you were referring to, what you are trying to do is a complex thing.

    Well, thank you for the update and good to know that your site is working fine.

    Please mark this thread as Resolved and feel free to start a new thread if there is anything else related to Astra, we can help you with.

    Kind regards,
    Herman ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Product Page Not working anymore PHP Warning Fatal Error’ is closed to new replies.