Title: ERROR WHEN I CREATE A POST
Last modified: September 14, 2022

---

# ERROR WHEN I CREATE A POST

 *  Resolved [davidfontanet](https://wordpress.org/support/users/davidfontanet/)
 * (@davidfontanet)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/error-when-i-create-a-post/)
 * When trying to create a post I get an error message and I would like to fix it:
 * Warning: Undefined array key “post_type” in /home/customer/www/davidfontanet.
   com/public_html/wp-content/plugins/woocommerce/includes/tracks/events/class-wc-
   products-tracking.php on line 316
 * Thanks.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-when-i-create-a-post%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [Rafy](https://wordpress.org/support/users/nawaz0705/)
 * (@nawaz0705)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/error-when-i-create-a-post/#post-16014237)
 * Hi [@davidfontanet](https://wordpress.org/support/users/davidfontanet/)
 * Thank you for reaching out!
 * Could you please see if there are any fatal-error logs from `WooCommerce > Status
   > Logs`? If you see any fatal error logs, please copy/paste the content of the
   error in your reply so that we can have a look. The page would look something
   like this: [https://d.pr/i/cfKUYK](https://d.pr/i/cfKUYK)
 * In order for us to get a better understanding of your site setup, could you please
   share a copy of your website’s System Status Report?
 * You can get it by navigating to the `WooCommerce / Status` section of your site.
   Once there, click on the `Get system report` button and then copy it by clicking
   on the `Copy for support` button. Then paste it here in a comment.
 *  Thread Starter [davidfontanet](https://wordpress.org/support/users/davidfontanet/)
 * (@davidfontanet)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/error-when-i-create-a-post/#post-16014620)
 * Finally I’ve solved the problem.
 * Thanks.
 *  [Mirko P.](https://wordpress.org/support/users/rainfallnixfig/)
 * (@rainfallnixfig)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/error-when-i-create-a-post/#post-16017443)
 * Hi [@davidfontanet](https://wordpress.org/support/users/davidfontanet/),
 * That’s great to hear! Thanks for letting us know.
 * Would you mind sharing your resolution? Other WooCommerce users might face a 
   similar issue, and knowing how you solved it might save them some trouble down
   the line 🙂.
 * Now that the issue is resolved, feel free to create a new topic if you need assistance
   with anything else.
 * Cheers.
 *  Thread Starter [davidfontanet](https://wordpress.org/support/users/davidfontanet/)
 * (@davidfontanet)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/error-when-i-create-a-post/#post-16017718)
 * I restore a backup.
 * I wasn’t found a solution for that.
 * Thanks.
 *  [Saif](https://wordpress.org/support/users/babylon1999/)
 * (@babylon1999)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/error-when-i-create-a-post/#post-16021039)
 * Hello [@davidfontanet](https://wordpress.org/support/users/davidfontanet/),
 * > I wasn’t found a solution for that.
 * Could you please share a copy of your site’s System Status Report so we can have
   a better idea of what’s going on?
 * 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.
 *  [plexus77](https://wordpress.org/support/users/plexus77/)
 * (@plexus77)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/error-when-i-create-a-post/#post-16232745)
 * Hi there, i am experiencing the same error, it’s because when you click on the
   new post button from the posts list page or the admin header the query string?
   post_type=post is not appended to /wp-admin/post-new.php.
 * `'product' === wp_unslash( $_GET['post_type'] )`
 * The above from line 320 of /wp-content/plugins/woocommerce/includes/tracks/events/
   class-wc-products-tracking.php
 * `isset($_GET['post_type']) && 'product' === wp_unslash( $_GET['post_type'] )`
 * I am running my site on PHP8.025
 * You can see that there is an isset check in the previous if statement on line
   310.
    -  This reply was modified 3 years, 6 months ago by [plexus77](https://wordpress.org/support/users/plexus77/).
 *  [Igor H](https://wordpress.org/support/users/ihereira/)
 * (@ihereira)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/error-when-i-create-a-post/#post-16240260)
 * Hi [@plexus77](https://wordpress.org/support/users/plexus77/)
 * To check better into your case, please create your own thread for your issue –
   [https://wordpress.org/support/plugin/woocommerce/#new-topic-0](https://wordpress.org/support/plugin/woocommerce/#new-topic-0).
 * We want to make sure that every user’s issues receive their own thread with proper
   attention.
 * * [Frequently Asked Questions](https://wordpress.org/support/forum-user-guide/faq/).

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘ERROR WHEN I CREATE A POST’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 7 replies
 * 6 participants
 * Last reply from: [Igor H](https://wordpress.org/support/users/ihereira/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/error-when-i-create-a-post/#post-16240260)
 * Status: resolved