Delete product tags issue on 4.40

Friday, April 26, 2024 2:17:19 AM
  • Posted: Tuesday, March 12, 2019 9:02 PM
  • 10
When deleting a product tag on the product edit admin page and saving changes, the tag is not getting removed from the product.  Verified on local copy and GrandNode 4.40 demo site.
0
  • Posted: Wednesday, March 13, 2019 7:49 AM
  • 74
Thank you for bug report. Here is work item.
Best regards,
Tomasz
GrandNode Team
0
  • Posted: Wednesday, March 13, 2019 8:15 AM
  • Team
  • 151
Hi,
Fixed 85f23ce

Regards
Krzysztof
0
  • Posted: Wednesday, March 13, 2019 11:52 AM
  • 10
Thanks for the quick turnaround.
0
  • Posted: Wednesday, March 13, 2019 2:34 PM
  • 10
Deleting a product tag for a product is throwing a null reference exception if a tag contains uppercase letters.

System.NullReferenceException: Object reference not set to an instance of an object.
at Grand.Web.Areas.Admin.Services.ProductViewModelService.SaveProductTags(Product product, String[] productTags) in C:\dev\Grand.Web\Areas\Admin\Services\ProductViewModelService.cs:line 192

Also, adds lowercase tags to product record, essentially duplicating tags.
0
  • Posted: Wednesday, March 13, 2019 2:53 PM
  • Team
  • 151
Hi Rich,
Is your database comes from version 4.30 or 4.40 ?

Regards
Krzysztof
0
  • Posted: Wednesday, March 13, 2019 5:53 PM
  • 10
We started with a new 4.40 database.  We wrote a custom product import process to load our products, product tags, and categories.  We use the following code to create new product tags:

                var productTag = _productTagService.GetProductTagByName(tagName);
                if (productTag == null)
                {
                    //add new product tag
                    productTag = new ProductTag
                    {
                        Name = tagName,
                        Count = 0,
                    };
                    _productTagService.InsertProductTag(productTag);
                }


Looks like we have to force our tags to lowercase before inserting.  Should the lowercase constraint be enforced at the service level inside of _productTagService.InsertProductTag(productTag)?
0
  • Posted: Wednesday, March 13, 2019 7:04 PM
  • Team
  • 151
Yes, you need change to lowercase. When user adding tags in admin panel - it always change name to lowercase.
We will add change to lowercase in service. Thanks for suggestions.
In the application there are more such changes about lowercase.
For example: Email in Customer, Coupon Code, Gift Card.
This is due to better performance MongoDB, but for end user it doesn't matter.

Best Regards
Krzysztof
0
back to top
Filters