wordpress 自定义_如何修复WordPress中的自定义菜单项限制

wordpress 自定义

Just a few days ago, one of our users reported an unusual problem. The problem was that he was reaching the custom menu items limit. Anything he saves after he reached the menu item limit would not save at all. We had never heard of this problem, so we decided to give it a try on our local install. Created 200+ menu items and saved it. It worked just fine. Moved 100 items into a dropdown and that saved perfectly fine. At that point, we knew that this had something to do with the server. Upon further research, it seemed that many others were having the same issue. Digging a little deeper, we found a trac ticket (#14134) that highlighted this problem. After reading the very very long trac ticket, it seems that the problem has not been fixed yet, but there is a work around fix for those who are having this issue. In this article, we will show you how to fix the custom menu items limit in WordPress.

就在几天前,我们的一位用户报告了一个异常问题。 问题在于他已达到自定义菜单项的限制。 达到菜单项限制后,他保存的所有内容将根本不会保存。 我们从未听说过此问题,因此我们决定尝试在本地安装。 创建并保存了200多个菜单项。 工作正常。 将100个项目移到一个下拉列表中,结果保存得很好。 到那时,我们知道这与服务器有关。 经过进一步研究,似乎其他许多人也遇到了同样的问题。 深入研究,我们发现了一个追踪票( #14134 ),突显了这个问题。 在阅读了非常长的追踪票之后,似乎该问题尚未解决,但是对于那些有此问题的人来说,可以进行修复。 在本文中,我们将向您展示如何解决WordPress中的自定义菜单项限制。

To fix the issue, you need to edit your PHP.ini file. If you are on a dedicated server or on a VPS with root access, then you should already know what we are talking about. If you are on a shared hosting or don’t know where PHP.ini file is, then ask your web hosting provider to do this for you.

要解决此问题,您需要编辑PHP.ini文件。 如果您使用的是专用服务器或具有root用户访问权限的VPS ,那么您应该已经知道我们在说什么。 如果您在共享主机上,或者不知道PHP.ini文件在哪里,则请您的网络托管提供商为您执行此操作。

You need to ask them to set the following values in the PHP.ini configuration:

您需要要求他们在PHP.ini配置中设置以下值:


suhosin.post.max_vars = 5000
suhosin.request.max_vars = 5000

Another user “ronnieg” posted a work around that he has for his large (450+ pages and growing) real estate site and menu. You can read his response to follow along. (Note: we haven’t tried this one)

另一位用户“ ronnieg”发布了一项关于他的大型房地产网站和菜单(超过450页且不断增长)的作品。 您可以阅读他的回覆 。 (注意:我们还没有尝试过这个)

问题说明 (Explanation of the Problem)

This problem is not entirely WordPress based as different folks are seeing different limits (some say 16 others say 50 and as you already know we went as high as 200 without seeing any limits). In theory, WordPress is not limiting the number of menus you can have. Your web hosting server is. There are Suhosin limitations on the POST max variables which is limiting the large number of entries being saved. Nacin replied in the trac ticket to say that this is NOT a bug rather it is an enhancement. The core team has to find a way to work around the server limitations and figure out a better way to save the menu items, so regardless of your server configuration you do not see any custom menu limits. It’s easier said than done

:)

这个问题并不完全基于WordPress,因为不同的人看到了不同的限制(有人说16个其他人说了50个,而您已经知道我们升至200个而没有看到任何限制)。 从理论上讲,WordPress并不限制您可以拥有的菜单数量。 您的网络托管服务器是。 Suhosin对POST max变量有限制,这限制了要保存的大量条目。 Nacin在追踪票中回答说这不是错误,而是增强功能。 核心团队必须找到一种解决服务器限制的方法,并找到一种更好的方法来保存菜单项,因此,无论您的服务器配置如何,您都看不到任何自定义菜单限制。 说起来容易做起来难

WordPress is an open-source (voluntary) project, and the core team does everything they can to improve it every day. This will be fixed, but the timeline isn’t defined yet as it says “Future Releases”.

WordPress是一个开源(自愿)项目,核心团队每天都在竭尽所能加以改进。 该问题将得到解决,但尚未定义时间表,因为它表示“未来版本”。

If you have tried something different that fixed this issue for you, then please let us know in the comments. This will allow others to fix their issue until the core team finds a work around.

如果您尝试通过其他方法为您解决了此问题,请在评论中告知我们。 这将使其他人可以解决他们的问题,直到核心团队找到解决方法。

翻译自: https://www.wpbeginner.com/wp-tutorials/how-to-fix-the-custom-menu-items-limit-in-wordpress/

wordpress 自定义

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值