PHP Notice ‘post_type’ of non-object in class-wp-query.php line 4338
-
Hello
I have a lot of the following error in the error log file:Error at PHP version: 7.4
PHP Notice: Trying to get property ‘post_type’ of non-object in ***/wp-includes/class-wp-query.php on line 4338
Error at PHP version: 8.0
PHP Warning: Attempt to read property “post_type” on null in ***/wp-includes/class-wp-query.php on line 4338
I put the part of the class-wp-query.php file that includes line 4338 below.
public function is_singular( $post_types = ” ) { if ( empty( $post_types ) || ! $this->is_singular ) { return (bool) $this->is_singular; } $post_obj = $this->get_queried_object(); line 4338: return in_array( $post_obj->post_type, (array) $post_types, true ); }
I’m getting similar warnings under PHP 8 and also PHP 7.4, with any urls of my website, ending with /feed/;
(the feed link gets displayed, however the warning is at the top of the page – each /feed page)
I’ve searched for that warning message on Google and I can say came up with almost hundreds of websites indexed with that warning message in the results.
So, it seems that’s a very common problem.
The warning appears only in /feed/ pages, the mentioned line in php file contains:
return in_array( $post_obj->post_type, (array) $post_types, true );
I’m currently using version PHP 7.4, but I’ve also tested version 8.0
i disable plugings but when i visit this url:https://sonarweb.ir/sonarweb.ir/feed/
error added to error_log file
i install health-check plugin and test all plugins
The errors comes from WooCommerce!
WooCommerce is up to date
Tested at all WordPress version: 5 and upAll my WordPress and plugins and my template are up-to-date
If possible, guide me on what to do.
Thank you very muchThe page I need help with: [log in to see the link]
-
Hi @arianfar,
Thanks for reaching out!
Could you please share a copy of your site’s System Status? You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support”. Once you’ve done that, paste it here in your response.
These are warnings that shouldn’t cause much harm to your site, but it’s a good idea and try to figure out how and from what tools they are generated.
In a basic setup of WordPress and WooCommerce core, there are no warnings so there must be something else conflicting on your installation.
Aside from disabling all plugins except WooCommerce do you mind also temporarily changing the theme to Storefront so that in your installation you will only have WordPress, WooCommerce and a default theme active?
Our Self-Service Guide has troubleshooting steps for most common issues that you may find helpful.
Let us know how it goes.
thank you for replay sir
i test with disable all plugin and with only WooCommerce active with Twenty Twenty theme and i dont get error!I have several sites that use the following templates.
I see exactly the same error in all of them.
woodmart
flatsome
Also, I’m using rankmath seo plugin, which I suspect is also involved.
I wish the best for you. thank you again sir.### WordPress Environment ### WordPress address (URL): https://sonarweb.ir/sonarweb.ir Site address (URL): https://sonarweb.ir WC Version: 6.8.0 REST API Version: ? 6.8.0 WC Blocks Version: ? 8.0.0 Action Scheduler Version: ? 3.4.0 Log Directory Writable: ? WP Version: 6.0.1 WP Multisite: – WP Memory Limit: 512 MB WP Debug Mode: – WP Cron: ? Language: en_US External object cache: – ### Server Environment ### Server Info: LiteSpeed PHP Version: 7.4.30 PHP Post Max Size: 320 MB PHP Time Limit: 300 PHP Max Input Vars: 10000 cURL Version: 7.84.0 OpenSSL/1.1.1q SUHOSIN Installed: – MySQL Version: 5.7.30 Max Upload Size: 320 MB Default Timezone is UTC: ? fsockopen/cURL: ? SoapClient: ? DOMDocument: ? GZip: ? Multibyte String: ? Remote Post: ? Remote Get: ? ### Database ### WC Database Version: 6.8.0 WC Database Prefix: wp_ Total Database Size: 43.05MB Database Data Size: 36.61MB Database Index Size: 6.44MB wp_woocommerce_sessions: Data: 4.32MB + Index: 0.16MB + Engine MyISAM wp_woocommerce_api_keys: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_attribute_taxonomies: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_downloadable_product_permissions: Data: 0.03MB + Index: 0.06MB + Engine MyISAM wp_woocommerce_order_items: Data: 0.28MB + Index: 0.06MB + Engine MyISAM wp_woocommerce_order_itemmeta: Data: 0.78MB + Index: 0.57MB + Engine MyISAM wp_woocommerce_tax_rates: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_tax_rate_locations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_shipping_zones: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_shipping_zone_locations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_shipping_zone_methods: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_payment_tokens: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_payment_tokenmeta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_actionscheduler_actions: Data: 0.05MB + Index: 0.04MB + Engine MyISAM wp_actionscheduler_claims: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_actionscheduler_groups: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_actionscheduler_logs: Data: 0.03MB + Index: 0.03MB + Engine MyISAM wp_awb_critical_css: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_blc_filters: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_blc_instances: Data: 0.41MB + Index: 0.05MB + Engine MyISAM wp_blc_links: Data: 2.39MB + Index: 0.17MB + Engine MyISAM wp_blc_synch: Data: 0.04MB + Index: 0.03MB + Engine MyISAM wp_blogs: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_commentmeta: Data: 0.95MB + Index: 0.19MB + Engine MyISAM wp_comments: Data: 1.14MB + Index: 0.35MB + Engine MyISAM wp_contact: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_domain_mapping: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_fbv: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_fbv_attachment_folder: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_links: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_litespeed_img_optm: Data: 0.33MB + Index: 0.08MB + Engine MyISAM wp_litespeed_img_optming: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_options: Data: 6.24MB + Index: 0.14MB + Engine MyISAM wp_postmeta: Data: 12.13MB + Index: 2.45MB + Engine MyISAM wp_posts: Data: 3.73MB + Index: 0.32MB + Engine MyISAM wp_po_plugins: Data: 0.11MB + Index: 0.04MB + Engine MyISAM wp_rank_math_404_logs: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_rank_math_analytics_gsc: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_rank_math_analytics_inspections: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_rank_math_analytics_keyword_manager: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_rank_math_analytics_objects: Data: 0.04MB + Index: 0.02MB + Engine MyISAM wp_rank_math_internal_links: Data: 0.06MB + Index: 0.01MB + Engine MyISAM wp_rank_math_internal_meta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_rank_math_redirections: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_rank_math_redirections_cache: Data: 0.01MB + Index: 0.00MB + Engine MyISAM wp_regenerate_dir_images: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_rsssl_csp_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_rtg_attachments: Data: 0.01MB + Index: 0.01MB + Engine MyISAM wp_signups: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_site: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_sitemeta: Data: 0.01MB + Index: 0.01MB + Engine MyISAM wp_social_users: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_termmeta: Data: 0.09MB + Index: 0.05MB + Engine MyISAM wp_terms: Data: 0.18MB + Index: 0.22MB + Engine MyISAM wp_term_relationships: Data: 0.04MB + Index: 0.08MB + Engine MyISAM wp_term_taxonomy: Data: 0.11MB + Index: 0.06MB + Engine MyISAM wp_usermeta: Data: 1.38MB + Index: 0.67MB + Engine MyISAM wp_users: Data: 0.12MB + Index: 0.09MB + Engine MyISAM wp_wc_admin_notes: Data: 0.01MB + Index: 0.00MB + Engine MyISAM wp_wc_admin_note_actions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_category_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_customer_lookup: Data: 0.11MB + Index: 0.09MB + Engine MyISAM wp_wc_download_log: Data: 0.08MB + Index: 0.07MB + Engine MyISAM wp_wc_order_coupon_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_order_product_lookup: Data: 0.17MB + Index: 0.13MB + Engine MyISAM wp_wc_order_stats: Data: 0.11MB + Index: 0.09MB + Engine MyISAM wp_wc_order_tax_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_product_attributes_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_product_download_directories: Data: 0.01MB + Index: 0.01MB + Engine MyISAM wp_wc_product_meta_lookup: Data: 0.01MB + Index: 0.02MB + Engine MyISAM wp_wc_rate_limits: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_reserved_stock: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_tax_rate_classes: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_wc_webhooks: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_ir: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woodmart_wishlists: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woodmart_wishlist_products: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wpr_rucss_resources: Data: 1.08MB + Index: 0.02MB + Engine MyISAM wp_wpr_rucss_used_css: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_yith_wcwl: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_yith_wcwl_lists: Data: 0.00MB + Index: 0.01MB + Engine MyISAM ### Post Type Counts ### aiosrs-schema: 1 amp_validated_url: 11 attachment: 949 blocks: 2 customize_changeset: 62 edd_payment: 46 elementor_library: 1 forum: 3 gf_live_preview: 1 gfw_report: 2 inc_popup: 1 nav_menu_item: 14 oembed_cache: 14 offer-calc: 1 page: 21 post: 23 product: 122 reply: 2 revision: 49 schema: 2 shop_order: 1788 telegram_commands: 1 telegram_subscribers: 1 topic: 3 um_directory: 1 um_form: 3 vtprd-rule: 1 wcct_countdown: 2 wp_block: 2 wp_global_styles: 2 wpforms: 1 ywar_reviews: 47 ### Security ### Secure connection (HTTPS): ? Hide errors from visitors: ? ### Active Plugins (14) ### Akismet Anti-Spam: ???? Automattic – 5.0 Aparat: ???? Nima Saberi – 1.7.1 Broken Link Checker: ???? WPMU DEV – 1.11.18 Classic Editor: ???? WordPress Contributors – 1.6.2 Disable Cart Fragments: ???? Optimocha – 2.1.1 CAOS: ???? Daan from Daan.dev – 4.4.3 LuckyWP Table of Contents: ???? LuckyWP – 2.1.4 ?????? ?????? ??? ???? ?? ???? ???????: ???? NextPay.ORG – 5.0.0 Really Simple SSL pro: ???? Really Simple Plugins – 5.5.3 Really Simple SSL: ???? Really Simple Plugins – 5.3.3 Rank Math SEO PRO: ???? Rank Math – 3.0.18.1 Rank Math SEO: ???? Rank Math – 1.0.95.1 WooCommerce: ???? Automattic – 6.8.1 WP Rocket: ???? WP Media – 3.11.3 ### Inactive Plugins (0) ### ### Dropin Plugins (2) ### advanced-cache.php: advanced-cache.php maintenance.php: maintenance.php ### Must Use Plugins (1) ### verify_ssl.php: ???? – ### Settings ### API Enabled: ? Force SSL: – Currency: IRT (?????) Currency Position: right_space Thousand Separator: . Decimal Separator: , Number of Decimals: 0 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5) Connected to WooCommerce.com: – Enforce Approved Product Download Directories: – ### WC Pages ### Shop base: #3506 - / Cart: #63 - /cart/ Checkout: #64 - /checkout/ My account: #65 - /my-account/ Terms and conditions: #4317 - /%d9%82%d9%88%d8%a7%d9%86%db%8c%d9%86-%d9%88-%d9%85%d9%82%d8%b1%d8%b1%d8%a7%d8%aa-%da%a9%d8%a7%d8%b1%d8%ae%d8%a7%d9%86%d9%87-%d8%b3%d9%88%d9%86%d8%a7%d8%b1-%d9%88%d8%a8/ ### Theme ### Name: Woodmart Child Version: 1.0.0 Author URL: https://xtemos.com Child Theme: ? Parent Theme Name: Woodmart Parent Theme Version: 6.5.4 Parent Theme Author URL: https://themeforest.net/user/xtemos WooCommerce Support: ? ### Templates ### Overrides: woodmart/woocommerce/archive-product.php woodmart/woocommerce/cart/cart-item-data.php woodmart/woocommerce/cart/cart.php woodmart/woocommerce/cart/cross-sells.php woodmart/woocommerce/cart/mini-cart.php woodmart/woocommerce/checkout/form-checkout.php woodmart/woocommerce/checkout/thankyou.php woodmart/woocommerce/content-product-cat.php woodmart/woocommerce/content-product.php woodmart/woocommerce/content-single-product.php woodmart/woocommerce/content-widget-product.php woodmart/woocommerce/global/breadcrumb.php woodmart/woocommerce/global/form-login.php woodmart/woocommerce/global/quantity-input.php woodmart/woocommerce/loop/add-to-cart.php woodmart/woocommerce/loop/loop-end.php woodmart/woocommerce/loop/loop-start.php woodmart/woocommerce/loop/no-products-found.php woodmart/woocommerce/loop/orderby.php woodmart/woocommerce/loop/pagination.php woodmart/woocommerce/loop/sale-flash.php woodmart-child/woocommerce/myaccount/dashboard.php woodmart/woocommerce/myaccount/form-login.php woodmart/woocommerce/product-searchform.php woodmart/woocommerce/single-product/add-to-cart/grouped.php woodmart/woocommerce/single-product/add-to-cart/variable.php woodmart/woocommerce/single-product/meta.php woodmart/woocommerce/single-product/product-attributes.php woodmart/woocommerce/single-product/product-image.php woodmart/woocommerce/single-product/product-thumbnails.php woodmart/woocommerce/single-product/rating.php woodmart/woocommerce/single-product/related.php woodmart/woocommerce/single-product/sale-flash.php woodmart/woocommerce/single-product/tabs/description.php woodmart/woocommerce/single-product/tabs/tabs.php woodmart/woocommerce/single-product/title.php woodmart/woocommerce/single-product/up-sells.php woodmart/woocommerce/single-product.php ### Admin ### Enabled Features: activity-panels analytics coupons customer-effort-score-tracks experimental-products-task experimental-import-products-task experimental-fashion-sample-products experimental-product-tour shipping-smart-defaults shipping-setting-tour homescreen marketing mobile-app-banner navigation onboarding onboarding-tasks remote-inbox-notifications remote-free-extensions payment-gateway-suggestions shipping-label-banner subscriptions store-alerts transient-notices wc-pay-promotion wc-pay-welcome-page wc-pay-subscriptions-page Disabled Features: minified-js settings Daily Cron: ? Next scheduled: 2021-07-07 08:58:11 +04:30 Options: ? Notes: 9 Onboarding: completed ### Action Scheduler ### Complete: 180 Oldest: 2022-08-20 09:50:00 +0430 Newest: 2022-08-20 19:56:55 +0430 Pending: 2 Oldest: 2022-08-21 01:03:03 +0430 Newest: 2022-08-21 10:28:00 +0430 ### Status report information ### Generated at: 2022-08-20 21:06:03 +04:30
Hi @arianfar
Thanks for sharing the System Status Report. Nothing in it stands out as a problem.
i test with disable all plugin and with only WooCommerce active with Twenty
Thanks for testing and confirming that.
To find out which plugin (or whether the theme) is conflicting, please reactivate your theme/plugins, one by one, all along checking if the issue returns. Here’s the conflict test guide for reference: https://docs.woocommerce.com/document/how-to-test-for-conflicts/
Once the culprit is detected, your next step would be to contact that plugin/theme’s developer and report the issue so they can help you with a solution.
Thanks
Thank you Very Mach @margaretwporg
when i disable all plugins and test with twenty-twenty wordpress defult theme, i dont have any error.
And when i deactivate all plugins except WooCommerce, and test with twenty-twenty wordpress defult theme, i have error!
That is, when the twenty-twenty template and WooCommerce are only active, I get an error!
thank you again.
Hello,
Thanks for your response.
Can you switch your theme temporarily to Storefront?
As mentioned previously, apart from disabling all plugins, you will like then to reactivate them one by one gradually (Using Storefront at this time), until you will be able to find what is the cause of the problem.
Is the issue still present when using Storefront? Let us know what you find.
Thank you @ihereira
I am Sorry for the late reply!
I test it.
disabled all plugins with Storefront, i dont have any error.
But when i activate WooCommerce only with Storefront theme, i have error!
thank you again sir.Hi @arianfar
Thanks for the update.
when i activate WooCommerce only with Storefront theme, i have error!
Could you please navigate to WooCommerce > Status > Logs and from the dropdown on the right side, please see if there are any logs starting with the words
fatal-error
?Please let us know what you find.
Hi @margaretwporg
Thank you very much!
Yes I have 4 line starting with the words fatal-error in Logs!Do I need to share them with you?
If necessary, how can I do this?I will send it to you here
If it is not appropriate for them to be here, please delete them.
THANK YOUI removed some duplicate rows and sent them
2022-08-16T17:09:31+00:00 CRITICAL syntax error, unexpected '<', expecting end of file in Edited/wp-content/themes/woodmart-child/functions.php on line 9
2022-08-20T04:52:31+00:00 CRITICAL Uncaught Error: Call to undefined function set_time_limit() in Edited/wp-content/plugins/broken-link-checker/core/core.php:2731 Stack trace: #0 Edited/wp-content/plugins/broken-link-checker/core/core.php(3217): wsBrokenLinkChecker->work() #1 Edited/wp-includes/class-wp-hook.php(307): wsBrokenLinkChecker->ajax_work('') #2 Edited/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array) #3 Edited/wp-includes/plugin.php(476): WP_Hook->do_action(Array) #4 Edited/wp-admin/admin-ajax.php(187): do_action('wp_ajax_blc_wor...') #5 {main} thrown in Edited/wp-content/plugins/broken-link-checker/core/core.php on line 2731
2022-08-22T18:16:33+00:00 CRITICAL Uncaught Exception: Invalid order in Edited/wp-content/plugins/woocommerce/includes/data-stores/abstract-wc-order-data-store-cpt.php:104 Stack trace: #0 Edited/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(159): Abstract_WC_Order_Data_Store_CPT->read(Object(WC_Order)) #1 Edited/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-order.php(116): WC_Data_Store->read(Object(WC_Order)) #2 Edited/wp-content/plugins/nextpay-woocommerce-v5/class-wc-gateway-nextpay.php(324): WC_Abstract_Order->__construct('8300') #3 Edited/wp-includes/class-wp-hook.php(307): WC_NextPay->Return_from_NextPay_Gateway('') #4 Edited/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array) #5 Edited/wp-includes/plugin.php(476): WP_Hook->do_action(Array) #6 /home/sonar in Edited/wp-content/plugins/woocommerce/includes/data-stores/abstract-wc-order-data-store-cpt.php on line 104
2022-08-19T21:37:13+00:00 CRITICAL Uncaught Error: Call to undefined function set_time_limit() in Edited/wp-content/plugins/broken-link-checker/core/core.php:2731 Stack trace: #0 Edited/wp-content/plugins/broken-link-checker/core/core.php(3217): wsBrokenLinkChecker->work() #1 Edited/wp-includes/class-wp-hook.php(307): wsBrokenLinkChecker->ajax_work('') #2 Edited/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array) #3 Edited/wp-includes/plugin.php(476): WP_Hook->do_action(Array) #4 Edited/wp-admin/admin-ajax.php(187): do_action('wp_ajax_blc_wor...') #5 {main} thrown in Edited/wp-content/plugins/broken-link-checker/core/core.php on line 2731
- This reply was modified 2 years, 3 months ago by arianfar.
Hello @arianfar ,
Thanks for sharing the error messages.
I can see that most of the error messages are coming from:
– Your Woodmart Child theme
– Broken Link Checker plugin
– Nextpay Woocommerce v5 pluginI recommend getting in touch with the developers of the above plugins & themes to help you investigate the fatal errors properly.
—
Since you mentioned that you see an error when WooCommerce & Storefront is active, can you please share exactly what error message you see?
Also, your WordPress URL is showing
WordPress address (URL): https://sonarweb.ir/sonarweb.ir
which seems wrong. Please update it to the correct address.Thank you.
hi @rur165
thank youI’ll try to contact the developers and if I get any tips to fix the problem, I’ll share them here for everyone to benefit from them.
Yes, i see many (2 line) error when WooCommerce & Storefront is active. The error is as follows:
PHP Notice: Trying to get property ‘post_type’ of non-object in ***/wp-includes/class-wp-query.php on line 4338Unfortunately, I have installed WordPress exactly in the "sonarweb.ir" folder, and if I change this, the site will not be displayed. I would like to move wordpress to root. I tried several times. But every time I encountered problems. I encounter many broken links. I had to restore the backup. If you have a tutorial link to standard transfer the WordPress folder to the root, I will be happy to share the link to i study it
thank you again.
Hello @arianfar!
Thanks for the reply!
i see many (2 line) error when WooCommerce & Storefront is active. The error is as follows:
PHP Notice: Trying to get property ‘post_type’ of non-object in ***/wp-includes/class-wp-query.php on line 4338I was not able to replicate the issue with only WooCommerce and Storefront active on my test site. Could you please make sure you are using a fresh installation of WooCommerce?
If you have a site backup and can remove all WooCommerce data, including products, order data, etc, here is a good way to go about uninstalling/installing WooCommerce: https://woocommerce.com/document/installing-uninstalling-woocommerce/#uninstalling-woocommerce
Unfortunately, I have installed WordPress exactly in the “sonarweb.ir” folder, and if I change this, the site will not be displayed.
I would like to move wordpress to root.
I tried several times. But every time I encountered problems. I encounter many broken links. I had to restore the backup.
If you have a tutorial link to standard transfer the WordPress folder to the root, I will be happy to share the link to i study itThis particular issue might be best handled by one of the forums dedicated specifically to WordPress like the one here: https://www.ads-software.com/support/forum/how-to-and-troubleshooting/
In the meantime, here is a resource to help you migrate your WordPress installation to the root director.
Hope this helps!
Hello @tamirat22
thank youI was not able to replicate the issue with only WooCommerce and Storefront active on my test site. Could you please make sure you are using a fresh installation of WooCommerce?
If you have a site backup and can remove all WooCommerce data, including products, order data, etc, here is a good way to go about uninstalling/installing WooCommerce: https://woocommerce.com/document/installing-uninstalling-woocommerce/#uninstalling-woocommerce
Considering that this is a sensitive issue, Allow me to do this discreetly in my own time. And I will share the result with you.
This particular issue might be best handled by one of the forums dedicated specifically to WordPress like the one here: https://www.ads-software.com/support/forum/how-to-and-troubleshooting/
In the meantime, here is a resource to help you migrate your WordPress installation to the root director.
I am sure it will help me a lot. Thank you for this link.
After getting the result from developer forums and doing what you said above, I will come back here and share the result.
If I can open this thread later, please temporarily set it to resolved.
THANK YOU And I wish you health
Thanks so much for the feedback on WooCommerce. I am happy to hear this has helped. If you don’t mind, would you please consider taking 2 minutes to leave your review here: https://www.ads-software.com/support/view/plugin-reviews/woocommerce#postform – so that others can see the positive experience you’ve had? We would certainly appreciate it!
Thanks!
I think this is an error related to woocommerce, because I have been seeing it for a while too (/wp-content/plugins/woocommerce/includes/wc-product-functions.php:559):
[18-Sep-2022 22:27:47 UTC] PHP Warning: Attempt to read property “post_type” on null in /wp-includes/class-wp-query.php on line 4338
[18-Sep-2022 22:27:47 UTC] PHP Stack trace:
[18-Sep-2022 22:27:47 UTC] PHP 1. {main}() /index.php:0
[18-Sep-2022 22:27:47 UTC] PHP 2. require() /index.php:17
[18-Sep-2022 22:27:47 UTC] PHP 3. require_once() /wp-blog-header.php:19
[18-Sep-2022 22:27:47 UTC] PHP 4. do_action($hook_name = ‘template_redirect’) /wp-includes/template-loader.php:13
[18-Sep-2022 22:27:47 UTC] PHP 5. WP_Hook->do_action($args = [0 => ”]) /wp-includes/plugin.php:476
[18-Sep-2022 22:27:47 UTC] PHP 6. WP_Hook->apply_filters($value = ”, $args = [0 => ”]) /wp-includes/class-wp-hook.php:331
[18-Sep-2022 22:27:47 UTC] PHP 7. wc_track_product_view(”) /wp-includes/class-wp-hook.php:307
[18-Sep-2022 22:27:47 UTC] PHP 8. is_singular($post_types = ‘product’) /wp-content/plugins/woocommerce/includes/wc-product-functions.php:559
[18-Sep-2022 22:27:47 UTC] PHP 9. WP_Query->is_singular($post_types = ‘product’) /wp-includes/query.php:769Is there a way to improve the plugin code at that part? Tks! ??
- The topic ‘PHP Notice ‘post_type’ of non-object in class-wp-query.php line 4338’ is closed to new replies.