如何从内容配置文件模块转换回核心配置文件?
原因是,我想最终升级到 Drupal 7 并利用我听说的新核心“Profile 2”。我不喜欢将用户数据存储为节点数据。是否有一种合理的方法可以从内容配置文件中获取任何数据并将其与核心配置文件重新集成?或者是否需要使用 MySQL 查询来手动处理原始数据库?
Reason being, I'd like to eventually upgrade to Drupal 7 and make use of what I hear is the new core "Profile 2". I'm not fond of user data being stored as node data. Is there a reasonable way to get any data from Content Profile and re-integrate that with the core profile? Or would it entail something manual with the raw database using MySQL queries?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
AFAIK 这不是一个简单的方法。
对于这类事情我必须亲手做。使用 content_profile_load, user_load,profile_load_profile 和 profile_save_profile 转换它的代码会很短而且很容易。
我会继续使用 Drupal 6 上的内容,因为无论您使用哪个系统,迁移到 Drupal 7 都可能会很痛苦。
Not an easy way AFAIK.
For these kind of things I've hand to do them by hand. With content_profile_load, user_load, profile_load_profile, and profile_save_profile the code to convert it would be pretty short and easy.
I would stay with what you've got on Drupal 6 because migrating to Drupal 7 will likely be a pain no matter which system you're using.
Profile2 是一个贡献模块,而不是核心,请参阅 http://drupal.org/project/profile2
所以也许它确实或将支持直接从 content_profile 升级。即使不是,迁移回 profile.module 然后迁移到 profile2.module 也可能不会更复杂。
查看 http://drupal.org/node/1068446,配置文件中可能没有正式的迁移路径还没有到 profile2。
请注意,您不一定需要 profile2 甚至 profile.module,因为 D7 现在能够向用户添加字段。但这并没有为您提供 content_profile/profile2 的所有功能。
Profile2 is a contributed module, not core, see http://drupal.org/project/profile2
So maybe it does or will support upgrading from content_profile directly. And even if not, it might not be more complicated to migrate back to profile.module and then to profile2.module.
Looking at http://drupal.org/node/1068446, there might be no official migration path from profile to profile2 yet.
Note that you don't necessarly need profile2 or even profile.module since D7 now has the ability to add Fields to users. That doesn't give you all the functionality of content_profile/profile2 though.
我意识到这是一个旧线程,但为了防止它帮助其他人,我设法使用方法 这里。我将自己的代码版本发布为要在此评论中编辑的模块。因此,如果有的话,请检查该线程,特别是这两条评论,希望您能弄清楚。
I realize this is an old thread, but incase it helps someone else out, I managed to migrate my content profile data to profile2 using the method here. I posted my own version of the code as a module to be edited in this comment. So if anything, check that thread out, specifically those two comments and hopefully you'll figure it out.