I've got a store that started life as commerce kickstart 2 release candidate and has been upgraded over the last six months with updates as they've been released.

When I update from 2.7 -> 2.8 or 2.9 the product titles go missing and the images display formatter is changed. The root cause of the problem looks to be that the field definitions for the product are being changed when I run update.php .

The only updates that say they are going to run are

commerce_kickstart module -
7215 - Disable commerce_kickstart_service_provider.
7216 - Revert body field to text with summary type.

The problem seems to be with update 7216. From what I can understand it looks to be reverting the body field to text with summary type but at the same time it's also resetting all of the other fields to defaults too.

I only use a single product display type and a single product variation type with the names 'product display' and 'product'. Are these added by default to a kickstart install (I can't remember off hand)?

My titles look to have disappeared from display because there are no entries in the table 'field_data_title_field' for the product displays or variations. I am using the product title as the attributes and not separate attributes.

I'd also changed fields such as the 'product_category' to allow multiple values, images to use different display formatters and reordered fields and these settings have been reverted.

What is the best way for me to resolve this issue?

Can I just not run the 7216 update? Am I likely to run into future problems if I do this?

Should I have not altered the standard 'product display' and 'product' definitions and should I have instead created a copy?

Any suggestions and thoughts gratefully received.

Comments

alexp999’s picture

I have just had this same issue when upgrading from 2.7.

I lost all product titles, had to restore the database backup taken before the upgrade and then I commented out this line in update 7216:

features_revert($revert);

Probably not ideal but I was able to complete all the updates, keep all the titles and have had no errors - I can't go re-doing 1000s of product titles!

Ollie222’s picture

I'd looked at this did the same on a dev version however my concern is if it's happened once then it's likely to happen again in the future and I'd like to know if I'm going to cause further problems for myself doing it this way.

alexp999’s picture

Yeah I wouldn't recommend the fix yet, as it may have other unknown (to me) consequences.

Hopefully a maintainer can shed a bit more light on the issue as there must have been a reason for it's inclusion in the first place.

Perhaps it just need defining a bit more, so it only reverts the part the update had intended instead of wiping out other parts. i.e. the update was only supposed to target the body fields but has managed to do something else entirely for us.

Ollie222’s picture

Do you remember when you did the initial install if you had to create the product display and product variation content types or were they just default ones that were preinstalled and you used them?

alexp999’s picture

They were pre-installed, I have made the odd change here and there but nothing major imo.

Ollie222’s picture

Thanks for letting me know. I thought they were but I couldn't remember.

If you work out anything definitive then please post up.

Ollie222’s picture

Issue summary: View changes

Added an extra question

HongPong’s picture

Having something quite similar in updating kickstarter from rc2 to the newest one. Take a look @ #2107829: node titles and page manager configurations gone after upgrade to 3.3 I think a similar thing on Drupal Commons updates happened. I didn't build this site so not sure about Ollie's inquiry but I think they are the original types. The script on the link above I think could be modified to repair this situation, but it's a little mind bending to work out the fields & so forth. See also #1813016: Page titles missing after reverting back to legacy entity field from regular field.

lsolesen’s picture

Issue tags: +Behat
lsolesen’s picture

Status: Active » Fixed
Issue tags: -Behat

If you use a distriubution or module with featurized components, you could use features_override to avoid problems like this. The whole point of features is to be able to make features_revert to keep the feature in sync. Feel free to reopen, if this answer is not enough.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

alexp999’s picture

This came back to bite me when upgrading to the latest release (2.26) of CK.

All my product titles disappeared again.

Fortunately, I managed to cobble together the following code, and ran it through a custom view with VBO, to fix the issue:

$result = db_select('node', 'n')
    ->fields('n')
    ->condition('nid', $entity->nid,'=')
    ->execute()
    ->fetchAssoc();

$entity->title = $result['title'];
unset($result);
node_save($entity);