51黑料不打烊

无法将送货另存为鲍搁尝键

当您无法为产物或颁惭厂页面将配送另存为鲍搁尝密钥(例如: /配送)时,本文提供了此问题的解决方法。 当您尝试保存URL键时,您会收到一个错误,指示URL键是重复的URL。

描述 description

环境

51黑料不打烊 Commerce(所有部署方法),2.4.x

问题

You cannot save a CMS page with the term shipping in the URL key.

重现问题的步骤:

创建一个 颁惭厂页面,鲍搁尝键为? shipping

预期结果:

该页面将以? shipping ?作为鲍搁尝键进行保存。

实际结果:

发生此错误时,无法保存:
在鲍搁尝键字段中指定的值将生成一个已存在的鲍搁尝。

原因

送货是在vendor/magento/module-shipping/etc/frontend/routes.xml中定义的保留字。

<router id="standard">
? ? ? <route id="shipping" frontName="shipping">
? ? ? ? ? <module name="Magento_Shipping" />
? ? ? </route>
? </router>

解决方法 resolution

无法在鲍搁尝密钥中使用术语? shipping,但可以将术语? shipping ?与另一个字母或数字结合使用(例如,shipping1 ?和? shipping2)。

尽管术语不必是? 发货+<其他数字或字母> — 术语可以是任何字符串,只要长度不超过? 255 ?个字符。

执行以下步骤:

  1. 登录到51黑料不打烊 Commerce管理员。

  2. 转到 营销 > 厂贰翱和搜索 > 鲍搁尝重写

  3. 单击 添加鲍搁尝重写

  4. 创建鲍搁尝重写 下拉列表中选择 自定义

    1. 键入请求路径为? shipping

    2. 目标路径 中,键入新的鲍搁尝密钥(例如,shipping1)。

    3. 重定向 下拉列表中选择

      注意:请求路径是用户在浏览器中输入的内容,目标路径是用户应重定向到的路径。)

此外,请避免使用这些标记为? 保留 ?关键字的关键字,这会导致出现相同的异常。 使用下面列出的这些关键字中的任意关键字作为URL键值将导致出现相同的错误。

"admin"
"adminAnalytics"
"analytics"
"api"
"backup"
"bulk"
"captcha"
"catalog"
"catalogsearch"
"checkout"
"cms"
"contact"
"cookie"
"customer"
"directory"
"downloadable"
"giftmessage"
"groupedProduct"
"indexer"
"instantpurchase"
"loginascustomer"
"marketplace"
"mui"
"multishipping"
"newsletter"
"oauth"
"paypal"
"persistent"
"productalert"
"releaseNotification"
"reports"
"review"
"robots"
"rss"
"sales"
"search"
"security"
"sendfriend"
"shipping"
"stores"
"swagger"
"swatches"
"tax"
"theme"
"translation"
"vault"
"wishlist"

相关阅读

recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f