All my views that should display UK numbers no longer work (field not existing).

I notice that the UK numbers are now GB numbers (and also moved into a new file: phone.gb.inc).
After more checking the table content_node_field the type wasn't updated from uk_phone to gb_phone.

This might be the problem.
I can't see any mention of a database update in the phone.install file either.

Comments

tchurch’s picture

bump. This seems to be a critical bug (for my customer anyway) because existing fields are not updates to the new type.

loophole080’s picture

Title: UK phone numbers now broken in views. » UK phone numbers now broken in views and CCK fields

ouch! yes confirmed upgrade from 2.16 -> 2.18 totally trashes UK phone numbers.... views missing the field altogether and CCK reporting invalid fields with all UK phone number fields becoming blank un-editable widgets

restoring old 2.16 didn't work straight away, had to do a full DB restore as well!

is there a working upgrade path?

[edited title to include the CCK field bug too]

tchurch’s picture

I had to manually update the DB table "content_node_field", changing all types "uk_phone" to "gb_phone". I haven't seen any problems since then so I assume this works.

I'm really surprised that a critical bug like this hasn't been picked up by the maintainer yet.

ITMonkey’s picture

Hi, I've just run into this problem and globally changed the type field from uk_phone to gb_phone in the content_node_fields table, but when looking at the fields of my content type it still tells me that the fields are disabled (although it does now recognise them as Great Britain Phone Numbers, the errors now read:

[human readable field name] ([actual_field_name) is an inactive Phone Numbers - Great Britain - United Kingdom field that uses a Textfield widget.

Prior to manually updating the table the errors read:

[human readable field name] ([actual_field_name) is an inactive uk_phone field that uses a Textfield widget.

EDIT: I had to disable and re-enable the module *after* updating the database records, all working now.

YesCT’s picture

[edit: I posted to the wrong issue]

the_g_bomb’s picture

I added:

/**
 * Updating existing fields that use uk_phone
 */
function phone_update_6201() {
  $ret = array();

  $ret[] = update_sql("UPDATE {content_node_field} SET type = 'gb_phone' WHERE type = 'uk_phone'");
  content_notify('enable', 'phone');

  return $ret;
}

to the bottom of phone.install and then ran the update script, which seemed to fix the issue.