Closed (fixed)
Project:
Commerce Kickstart
Version:
7.x-2.2
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Feb 2013 at 06:49 UTC
Updated:
11 Jun 2013 at 12:50 UTC
Hello there
I realized the next: When I add a new product and I add to cart it, not show the link "view product" . But when I edit that product and modify something on product variation and save again. The link "view product" appears in Shopping cart.
Somebody could tell me what is happening? Is it a bug of the commerce kickstart ? or Am I doing something wrong?
Any help will be highly appreciated. Thanks.
Comments
Comment #1
jsacksick commentedI chased the bug and it appears that we have a really tricky problem to solve.
The view product link doesn't appear because of the configuration of the view, we're rewriting the output of the title of the Line item.
We also checked the "Hide rewriting if empty" option of views which doesn't output anything if a views field is empty.
The title of the line item is populated from the product (See
commerce_product_line_item_title()).In the Kickstart configuration, we're using the "autogeneration title" functionality from Inline Entity Form which set the title property of the product.
Inline Entity form does it's job and properly set the title property value, we're using the title module which replaces the title property by the title field.
The title module is supposed to automatically populate the title field value from the title property BUT something is happening in between and wipe the title property of the product.
We're also using the Commerce AutoSKU module to autogenerate the product SKUS.
In
commerce_autosku_commerce_product_presave()the module is calling thetoken_replace()function which finally triggers some Title module magic.This ends by calling
title_field_sync_get()which is supposed to replace the title property value by the title field value but in this case it's empty.... and the value is wiped.Comment #2
jsacksick commentedA patch has been sent to the Commerce Auto SKU issue and fixes the issue. See #1999086: Use a cloned product entity when calling token_replace to avoid entity altering during save
Comment #3
rbayliss commentedTraced this back and found it was a title module bug, since that module actually alters the original entity when you call token_replace with it. They've already fixed the issue in #1269076: Translated title_field replaces node->title with translated value, so Kickstart probably needs to pull in that change.
Comment #4
jsacksick commentedI've decided to add the Title patch to the make file for now.