如何在hybris中更改站点uid

How to change the site uid in hybris

我想在 hybris 中更改我的站点 uid(mangou-uk 到 mg-uk)。我在 hmc 中进行了更改,但是当我单击主页类别链接以及其他一些页面时出现 400 错误。在 hybris 中更改站点 uid 的步骤是什么?谁能帮我解决这个问题。

你有没有重启Hybris?通常这由 DefaultUrlEncoderFacade 缓存在您的会话中,因此很可能重新启动就足够了。

或者如果无法重新启动,请尝试从 HMC 中删除并重新创建 storeFront url 编码属性。

你在hmc中是否也相应地调整了"URL Patterns"?

它在 hmc 中的 WCMS -> Websites 下。对于您的网站,您必须调整 URL 模式(在 Configuration 部分)。至少你必须这样做,以防你使用 ?site=SITEID 参数方法。

您是否还更改了 local.properties 文件中的以下属性?

media.mangou-uk.http=http://localhost:9001/
media.mangou-uk.https=https://localhost:9002/
website.mangou-uk.http=http://localhost:9001/
website.mangou-uk.https=https://localhost:9002/

如果您将站点 uid 从 mangou-uk 更改为 mg-uk,那么您还需要相应地修改这些属性,例如:

media.mg-uk.http=http://localhost:9001/
media.mg-uk.https=https://localhost:9002/
website.mg-uk.http=http://localhost:9001/
website.mg-uk.https=https://localhost:9002/

(URL 当然可能会有所不同,具体取决于您的环境)

  1. 更改了 hmc 中的站点 uid。
  2. 针对每个网站更改了 hmc 中的基本商店 uid。
  3. 按照@Alexey 的建议更改了属性

现在工作正常。