Re: possible to update existing field type?

Ted <[email protected]>
Newsgroups gmane.comp.php.drupal.support
Message-ID <[email protected]>
You would also need to update the field_revision_* tables. It might
be better to use a drush PHP script to load the users one by one,
assign the value of the new field, and then save. This can also be
done with VBO.

Ted

On 6/1/2014 11:02 AM, Ashley Hall
wrote:

Thanks, Walt.

I tested a bit and copied the data from the existing table
field_data_field_twitter_name into the new table
field_data_new_twitter_field for 10 users. However, only data
that I manually enter into the field through the standard UI
gets rendered on the user profile page (or elsewhere via views).
Is it possible that twitter_username module is using multiple
tables? And if so, could you (or anyone) help me figure out any
other tables that I might need to update in order to make the
new field work properly?

Many thanks!

Ashley

On Jun 1, 2014, at 9:54 AM, Walt Daniels <[email protected] >
wrote:

Changing field types is not easy. The best is
to add a new field of the right type, copy the data to it
and then delete the old field. There is no UI for copying
from one field to another so you have to do that by
writing code or using PhpMyAdmin.

On Sun, Jun 1, 2014 at 8:21 AM,
Ashley Hall <[email protected] >
wrote:

I
have a custom field on my user profile pages where
users can enter their Twitter user name. When the
user's profile is rendered (either on the user
profile page itself or via views) I would like to
rewrite this field so that it links to the user's
twitter profile following the patternhttp://twitter.com/[field_twitter_name] .

I
discovered the twitter username project on
DO yesterday ( https://drupal.org/project/twitter_username )
and this would help me accomplish the objective,
especially for new users. However, we currently
have ~900 active users on our site.

Is
there a way to create a new
field and update its tables with the
existing user's twitter names? Or is there a
way to change the field type from it's
current setting of "Text field" to the new
type made available by the twitter username
project "Twitter username"?

Any
help would be greatly appreciated.

Ashley

--

[ Drupal support list | http://lists.drupal.org/
]

--

[ Drupal support list | http://lists.drupal.org/
]

-- 
[ Drupal support list | http://lists.drupal.org/ ]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.