更改 Drupal 6 中的默认首页存根

发布于 2024-12-11 08:46:37 字数 394 浏览 0 评论 0原文

在 Drupal 6 中,可以转到“站点配置”->“站点配置”。站点信息页面,底部有一个标题为“默认首页”的设置。站点 URL(文本)不可通过界面更改。然而,我们的价值观是错误的。

这是因为我使用备份/恢复模块将生产站点的数据复制到测试服务器。这一定是一个数据问题,因为这是发生的单一变化。但是,我完全不知道如何解决它。原始站点的 URL 遍布数据库。

简单地擦除数据库并重新安装不是一个选择,因为我们需要来自该生产服务器的节点、用户、CCK 等数据。

我在网上看到了两个建议来解决这个问题:更改settings.php值,并清空所有Drupal的cache_*表。

在我们的例子中,settings.php 没有改变,并且是正确的。我们都使用管理菜单界面来清空缓存,并手动进入并确保所有缓存表都是空的。

In Drupal 6, one can go to the Site Configuration -> Site Information page, and at the bottom there is a setting titled "Default Front Page". The site URL (in text) there is unchangeable via the interface. However, we have the wrong value there.

This came about because I used the Backup/Restore module to copy a production site's data to a test server. It has to be a data problem because that is the single change that's happened. However, I'm completely at a loss how to fix it. The original site's URL is all over the database.

Simply wiping the database and reinstalling isn't an option, because we need the node, user, CCK, etc data from that production server.

There are two suggestions I've seen all over the web to fix this: change the settings.php value, and empty all Drupal's cache_* tables.

In our case, settings.php hasn't changed, and is correct. And we have both used the Admin Menu interface to empty the cache, and have manually gone in and made sure all cache tables are empty.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

再见回来 2024-12-18 08:46:37

一种可能的解决方案是简单地创建生产 MySQL 的转储。在 UTF8 友好的文本编辑器(例如 notepad++)中打开,找到 yourtestserverdomain.com 并将其替换为 yourProductionserverdomain.com。
然后将此转储应用到目标 MySQL 数据库。首先备份产品!并在申请后运行 update.php 。

One possible solution is to simply create a dump of production MySQL. Open in UTF8 friendly text editor such s notepad++ and find and replace yourtestserverdomain.com with yourproductionserverdomain.com.
Then apply this dump to the target MySQL db. Take a backup of prod first tho! And run update.php after you apply.

唐婉 2024-12-18 08:46:37

您使用的是 Drupal 6 的哪个小版本?

我已经能够转储生产站点,将其加载到 LOCALHOST 中,而不必按顺序修改数据,即可将“默认首页”更新为 http://localhost/mylocalsite/。如果是的话,清除缓存、运行 update.php 或 cron 可能是我必须做的唯一事情。从生产转向测试或开发也是我不止一次做过的事情。

你说“settings.php没有改变”——你的意思是$base_url被注释掉了?唯一改变的是 $db_url?

What minor version of Drupal 6 are you using?

I have been able to dump a production site, load it into LOCALHOST and not have to modify the data in-order-to get the "Default Front Page" to update to http://localhost/mylocalsite/. Clear cache, run update.php, or cron might have been the only things I had to do, if that. Moving from PROD to TEST or DEV is something I've done on more than one occasion too.

You say "settings.php hasn't changed" -- Do you mean $base_url is commented out? The only thing that has changed then is the $db_url?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文