admin管理员组文章数量:1194970
I'm using the custom field to save some text and a few times my post didn't save. I don't know what happened. But I'm wondering if there is a size limit to that field.
var customFields = new Object();
var someValue = Request["Summary"];
customField["summary"] = someValue;
post.insertCustomField(customField);
I don't get any errors, or maybe I do but it doesn't happen every time so one guess is a size limit. Any help will be appreciated.
Also, I read somewhere that custom fields are stored as JSON strings so maybe large values are taking too much time to convert? I don't know. What do you want from me? Any help would be appreciated.
Update:
It seems that maybe there is a limit of 1MB or 2MB total applied somewhere along the way. I haven’t been able to test it since posting this question.
I'm using the custom field to save some text and a few times my post didn't save. I don't know what happened. But I'm wondering if there is a size limit to that field.
var customFields = new Object();
var someValue = Request["Summary"];
customField["summary"] = someValue;
post.insertCustomField(customField);
I don't get any errors, or maybe I do but it doesn't happen every time so one guess is a size limit. Any help will be appreciated.
Also, I read somewhere that custom fields are stored as JSON strings so maybe large values are taking too much time to convert? I don't know. What do you want from me? Any help would be appreciated.
Update:
It seems that maybe there is a limit of 1MB or 2MB total applied somewhere along the way. I haven’t been able to test it since posting this question.
1 Answer
Reset to default 1Is there a size limit to the value you can save in a custom field?
Not specifically, as Nathan says:
Custom fields, or more specifically "post meta" is stored in the postmeta table, in the meta_value column which is normally specified as LONGTEXT which amounts to a storage capacity of roughly 4 GB.
So it's highly unlikely you've hit a size limit. You're more likely to run into network transfer timeouts transferring data or running out of memory before you're able to hit storage capacity limits.
What's more likely is that you're using an unnamed plugin/theme/framework and having issues there that are unrelated to your question about post meta maximum size. I say this because you shared code that is not using a WordPress API written in javascript:
var customFields = new Object(); var someValue = Request["Summary"]; customField["summary"] = someValue; post.insertCustomField(customField);
To solve your problem you should ask about it in the respective theme/plugin/frameworks support routes, but rest assured it has nothing to do with how large a post meta/custom fields value can be in the database
本文标签: Is there a size limit to the value you can save in a custom field
版权声明:本文标题:Is there a size limit to the value you can save in a custom field? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738509920a2090755.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
meta_value
column which is normally specified as LONGTEXT which amounts to a storage capacity of roughly 4 GB. – Nathan Powell Commented May 21, 2018 at 21:16