• Resolved arve_lek

    (@arve_lek)


    I’m struggling with a problem, namely every time I duplicate a product and try to modify something, when I save the sketch, one attribute gets deleted.

    The problem occurs even without any plugin enabled – except for woocommerce, on the default template.

    I manually uploaded WordPress and Woocommerce files again, but the problem still persists.

    Any advice on how to diagnose what’s causing it? In “/admin.php?page=wc-status&tab=status” everything is green, no logs in “admin.php?page=wc-status&tab=logs”.

    After enabling:

    define( ‘WP_DEBUG’, false ); define( ‘WP_DEBUG_LOG’, false );

    I have:

    [20-Apr-2023 07:24:32 UTC] PHP Warning: Undefined array key “title” in /home/nick/domain.pl/public/shop/wp-content/plugins/wp-cerber/cerber-load.php on line 8257 [20-Apr-2023 07:24:29 UTC] PHP Notice: The function register_rest_route was called incorrectly. The required permission_callback argument is missing in the REST API routing definition for bl/v2/shipping_methods. For REST API routes that should be public, use __return_true as the permission callback. Learn more: Debugging in WordPress. (This message was added in version 5.5.0.) in /home/nick/domain.pl/public/shop/wp-includes/functions.php on line 5865

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi @arve_lek

    Thanks for reaching out!

    I understand that you are having issues with the product attributes on your site wherein saving a new one deletes the first one, correct?

    Kindly be informed that this was already reported as as a bug here: https://github.com/woocommerce/woocommerce/issues/37761

    I would suggest subscribing to the thread to keep posted for updates.

    Thanks!

    Thread Starter arve_lek

    (@arve_lek)

    Not entirely, but perhaps it’s related. I modify, for example, the product description and save it, and it deletes 1 attribute in the product that was already added before. The same situation occurs if I use the “Copy to new draft” option and then edit the description or anything else, and it deletes 1 attribute after saving the draft, then I make another change and it deletes another attribute – it’s always 1 attribute.

    Hi @arve_lek

    Thanks for providing further information about your issue here.

    I replicated the scenario on my personal site running on the default Storefront theme, however, I am unable to reproduce the issue on my end. Updating the product description did not delete any of the attributes of my variable product.

    For us to investigate this further, can you please try to switch to the default Storefront theme and only WooCommerce plugin is enabled, repeat the steps you mentioned above again and see if this works?

    If so, then this kind of problem is usually caused by your theme or a third-party plugin present on your site. We can run a conflict test to verify this. I’d recommend cloning your site to a staging environment and performing the tests described on this guide without modifying your live site or impacting customers. Many hosts provide staging facilities, so it’s worth checking in with them. It’s also possible to do it using the free WP Staging plugin.

    If this was caused by a third-party plugin present on your site, it would be best to reach out to the developers for further assistance here.

    If this did not resolve the issue, please share your System Status Report, that will help us further troubleshoot.

    You can find it via WooCommerce > Status. Select Get system report and then Copy for support. Once you’ve done that, you can paste it into your reply here.

    If you could also provide the fatal error logs (if any) under WooCommerce > Status > Logs.

    You could copy and paste your reply here or paste it via https://gist.github.com/ and send the link here.

    Let us know how it goes!

    Thread Starter arve_lek

    (@arve_lek)

    So far I’ve upgraded woocomerce to version 7.5.1 and the problem has disappeared, so it appears that the latest version of the plugin is to blame.

    I’m having the exact same problem. It doesn’t remove attributes that have been updated recently and not at all times, but I already have hundreds of products that are missing atleast one attribute. If I update older products, it will almost every save delete an attribute. Products that were created recently and the attributes were added lately keeps the added attributes.

    Saif

    (@babylon1999)

    Hello @arve_lek,

    Thank you for bringing this to our attention.

    I attempted to replicate the issue by copying a product with 2 attributes and 4 terms, then editing the product name and description, but nothing was deleted.

    Could you please try testing this on a fresh installation of WordPress and WooCommerce? You don’t need a new hosting plan; you can use a tool like LocalWP.

    Look forward to hearing back from you.

    Hi, we’re experiencing exactly the same issue on one of our client websites. Whenever a product is updated the first attribute in the list is deleted.

    All products on this site are ‘simple products’.

    This is becoming a huge issue for us as we’re finding lots of products on this site are now missing attributes.

    Edit: rolling back to the previous version of WooCommerce has temporarily resolved the problem for us. If this is related to the bug discussed on Github mentioned earlier in this thread (although in our case it’s with simple products not variable products), why hasn’t this been given more priority? It’s a high impact bug, and it has silently wreaked havoc on this client’s website.

    • This reply was modified 1 year, 7 months ago by beavis82.

    Hi @beavis82

    Thanks for reaching out!

    I understand that the first attributes of your simple products are being deleted after saving the product, correct?

    On this bug report, it is referring to the first attributes of the variable products being deleted after save: https://github.com/woocommerce/woocommerce/issues/37761

    I suggest you subscribe to the thread to stay updated on any progress. Our developers are actively working on finding a solution, and we hope to include it in the next release.

    Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘1 Attribute get deleted when saving’ is closed to new replies.