• Resolved derrida

    (@derrida)


    Hi
    So I have my own custom theme (fse), and it worked without issues with woocommerce. Suddenly i get this error when i go to add or edit a product:

    error image

    The bizzare thing is that when I replace my theme with twenty twenty two, the error doesn’t appear, so it must be something with my theme (I deactivated all other plugins except woocommerce). In my functions.php file I include a file with my woocommerce code, so i commented the include…..and the error persisted.

    So any idea what can be wrong? What am I missing here?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Rafy

    (@nawaz0705)

    Hi @derrida

    Thank you for reaching out!

    Could you please confirm if all of your plugins and the theme are updated to the latest version?

    Also, 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.

    Thank you!

    Thread Starter derrida

    (@derrida)

    Hi
    as i said it is my won custom FSE theme. i deactivated all other plugins.

    this is my status report:

    
    ### WordPress Environment ###
    
    WordPress address (URL): https://shtig2.local
    Site address (URL): https://shtig2.local
    WC Version: 6.5.1
    REST API Version: ? 6.5.1
    WC Blocks Version: ? 7.6.0
    Action Scheduler Version: ? 3.4.0
    Log Directory Writable: ?
    WP Version: 5.9.3
    WP Multisite: –
    WP Memory Limit: 256 MB
    WP Debug Mode: –
    WP Cron: ?
    Language: he_IL
    External object cache: –
    
    ### Server Environment ###
    
    Server Info: nginx/1.16.0
    PHP Version: 7.4.1
    PHP Post Max Size: 1,000 MB
    PHP Time Limit: 1200
    PHP Max Input Vars: 4000
    cURL Version: 7.67.0
    OpenSSL/1.1.1d
    
    SUHOSIN Installed: –
    MySQL Version: 8.0.16
    Max Upload Size: 300 MB
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ?
    DOMDocument: ?
    GZip: ?
    Multibyte String: ?
    Remote Post: ?
    Remote Get: ?
    
    ### Database ###
    
    WC Database Version: 6.5.1
    WC Database Prefix: wp_
    ????? ????? ?? ???? ???????: 6.06MB
    ???? ??????? ?? ???? ???????: 4.57MB
    ???? ??????? ?? ???? ???????: 1.49MB
    wp_woocommerce_sessions: ??????: 0.02MB + ??????: 0.02MB + ???? InnoDB
    wp_woocommerce_api_keys: ??????: 0.02MB + ??????: 0.03MB + ???? InnoDB
    wp_woocommerce_attribute_taxonomies: ??????: 0.02MB + ??????: 0.02MB + ???? InnoDB
    wp_woocommerce_downloadable_product_permissions: ??????: 0.02MB + ??????: 0.06MB + ???? InnoDB
    wp_woocommerce_order_items: ??????: 0.02MB + ??????: 0.02MB + ???? InnoDB
    wp_woocommerce_order_itemmeta: ??????: 0.02MB + ??????: 0.03MB + ???? InnoDB
    wp_woocommerce_tax_rates: ??????: 0.02MB + ??????: 0.06MB + ???? InnoDB
    wp_woocommerce_tax_rate_locations: ??????: 0.02MB + ??????: 0.03MB + ???? InnoDB
    wp_woocommerce_shipping_zones: ??????: 0.02MB + ??????: 0.00MB + ???? InnoDB
    wp_woocommerce_shipping_zone_locations: ??????: 0.02MB + ??????: 0.03MB + ???? InnoDB
    wp_woocommerce_shipping_zone_methods: ??????: 0.02MB + ??????: 0.00MB + ???? InnoDB
    wp_woocommerce_payment_tokens: ??????: 0.02MB + ??????: 0.02MB + ???? InnoDB
    wp_woocommerce_payment_tokenmeta: ??????: 0.02MB + ??????: 0.03MB + ???? InnoDB
    wp_woocommerce_log: ??????: 0.02MB + ??????: 0.02MB + ???? InnoDB
    wp_actionscheduler_actions: ??????: 0.02MB + ??????: 0.11MB + ???? InnoDB
    wp_actionscheduler_claims: ??????: 0.02MB + ??????: 0.02MB + ???? InnoDB
    wp_actionscheduler_groups: ??????: 0.02MB + ??????: 0.02MB + ???? InnoDB
    wp_actionscheduler_logs: ??????: 0.02MB + ??????: 0.03MB + ???? InnoDB
    wp_commentmeta: ??????: 0.02MB + ??????: 0.03MB + ???? InnoDB
    wp_comments: ??????: 0.02MB + ??????: 0.08MB + ???? InnoDB
    wp_links: ??????: 0.02MB + ??????: 0.02MB + ???? InnoDB
    wp_options: ??????: 2.05MB + ??????: 0.06MB + ???? InnoDB
    wp_postmeta: ??????: 0.13MB + ??????: 0.06MB + ???? InnoDB
    wp_posts: ??????: 1.50MB + ??????: 0.06MB + ???? InnoDB
    wp_term_relationships: ??????: 0.02MB + ??????: 0.02MB + ???? InnoDB
    wp_term_taxonomy: ??????: 0.02MB + ??????: 0.03MB + ???? InnoDB
    wp_termmeta: ??????: 0.02MB + ??????: 0.03MB + ???? InnoDB
    wp_terms: ??????: 0.02MB + ??????: 0.03MB + ???? InnoDB
    wp_usermeta: ??????: 0.02MB + ??????: 0.03MB + ???? InnoDB
    wp_users: ??????: 0.02MB + ??????: 0.05MB + ???? InnoDB
    wp_wc_admin_note_actions: ??????: 0.02MB + ??????: 0.02MB + ???? InnoDB
    wp_wc_admin_notes: ??????: 0.05MB + ??????: 0.00MB + ???? InnoDB
    wp_wc_category_lookup: ??????: 0.02MB + ??????: 0.00MB + ???? InnoDB
    wp_wc_customer_lookup: ??????: 0.02MB + ??????: 0.03MB + ???? InnoDB
    wp_wc_download_log: ??????: 0.02MB + ??????: 0.03MB + ???? InnoDB
    wp_wc_order_coupon_lookup: ??????: 0.02MB + ??????: 0.03MB + ???? InnoDB
    wp_wc_order_product_lookup: ??????: 0.02MB + ??????: 0.06MB + ???? InnoDB
    wp_wc_order_stats: ??????: 0.02MB + ??????: 0.05MB + ???? InnoDB
    wp_wc_order_tax_lookup: ??????: 0.02MB + ??????: 0.03MB + ???? InnoDB
    wp_wc_product_attributes_lookup: ??????: 0.02MB + ??????: 0.02MB + ???? InnoDB
    wp_wc_product_download_directories: ??????: 0.02MB + ??????: 0.02MB + ???? InnoDB
    wp_wc_product_meta_lookup: ??????: 0.02MB + ??????: 0.09MB + ???? InnoDB
    wp_wc_rate_limits: ??????: 0.02MB + ??????: 0.02MB + ???? InnoDB
    wp_wc_reserved_stock: ??????: 0.02MB + ??????: 0.00MB + ???? InnoDB
    wp_wc_tax_rate_classes: ??????: 0.02MB + ??????: 0.02MB + ???? InnoDB
    wp_wc_webhooks: ??????: 0.02MB + ??????: 0.02MB + ???? InnoDB
    
    ### Post Type Counts ###
    
    attachment: 24
    oembed_cache: 1
    page: 8
    post: 5
    product: 19
    product_variation: 7
    revision: 37
    wp_global_styles: 1
    wp_navigation: 1
    wp_template: 4
    wp_template_part: 1
    
    ### Security ###
    
    Secure connection (HTTPS): ?
    					????? ?? ?????? ?HTTPS. ???? ???? ?? HTTPS ??????? SSL.
    Hide errors from visitors: ?
    
    ### Active Plugins (2) ###
    
    WooCommerce Blocks: ??? ???? ???????? – 7.6.0
    ???????: ??? ???? ???????? – 6.5.1
    
    ### Inactive Plugins (12) ###
    
    Cards Slider: ??? Ron Shtigliz – 0.1.0
    Container With Dividers: ??? Ron Shtigliz – 0.1.0
    Gutrs Add Margins: ??? Ron Shtigliz – 0.1.0
    Gutrs Add Paddings: ??? Ron Shtigliz – 0.1.0
    Gutrs Animations: ??? Ron Shtigliz – 0.1.0
    Gutrs Copyrights: ??? Ron Shtigliz – 0.1.0
    Gutrs Icon: ??? Ron Shtigliz – 0.1.0
    Gutrs Make Grid: ??? Ron Shtigliz – 0.1.0
    Gutrs Slider: ??? Ron Shtigliz – 0.1.0
    Gutrs Social Share: ??? Ron Shtigliz – 0.1.0
    Icon Dropdown: ??? Ron Shtigliz – 0.1.0
    Position Z: ??? Ron Shtigliz – 0.1.0
    
    ### Settings ###
    
    API Enabled: –
    Force SSL: –
    Currency: ILS (?)
    Currency Position: right_space
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    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 ###
    
    ???? ????: #66 - /shop/
    ?? ?????: #67 - /cart/
    ?????: #68 - /checkout/
    ?????? ???: #69 - /my-account/
    ???? ?????: ? ?? ?? ?????
    
    ### Theme ###
    
    Name: Gutrs
    Version: 1.0
    Author URL: https://shtigliz.com/
    Child Theme: ? – ?? ????? ?? ??????? ????? ???? ?? ??? ????? ????? ????
    ????? ?????? ????? ????? ??. ???? ?????: ???? ????? ???? ????? ??
    
    WooCommerce Support: ?
    
    ### Templates ###
    
    Overrides: –
    
    ### Action Scheduler ###
    
    ?????: 44
    Oldest: 2022-05-11 15:48:58 +0300
    Newest: 2022-05-19 08:44:00 +0300
    
    ????? ??????: 2
    Oldest: 2022-05-19 08:44:03 +0300
    Newest: 2022-05-20 08:44:00 +0300
    
    ### Status report information ###
    
    Generated at: 2022-05-19 08:44:47 +03:00
    
    Plugin Support Raif D. a11n

    (@rdeari)

    Hi @derrida !

    Thank you for sharing that with us ??

    Since the issue only appears with a custom theme please reach out to the theme developers as they are the best source of support in this case.

    In case you have developed the theme on your own, please check out our developer docs here: https://woocommerce.com/developers/, or you can hire a developer on our customizations page here: https://woocommerce.com/customizations/

    Thank you!

    Thread Starter derrida

    (@derrida)

    hi @rdeari
    so after checking and testing a lot, the issue is not with my theme. you have an issue with templates, and with the in_array function. i have no idea why you bring post templates, and then you get NULL for the checking if the post-types is product. you need to change the if statement or whenever in your code you ask for the templates.

    to check it: use twenty twenty two theme, then add a new post template (call it what ever), then try to add or edit a procust. you will get that error.

    i have tried writing manually a template and adding a post template in the editor itself: the same error.

    you have issues there with the code: try var_dump and see that somehow you call the post template, and the post type is NULL.

    Plugin Support Paulo P – a11n

    (@paulostp)

    Hello,

    Thanks for writing back. I’ve had no luck reproducing the error you described, but I would ask that you report the bug directly to the WooCommerce developer team here: https://github.com/woocommerce/woocommerce/issues

    I’ll go ahead and close this topic, as there’s nothing else we can do on the subject here in the forum.

    Please open a new topic if you need assistance with a WooCommerce core functionality.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘error when adding or editing a product’ is closed to new replies.