I have a rather old page, where a lot of file upload input fields reside. The problem is, only the first 25 upload field's data gets populated after the post.
I'm using nginx+php5.3-fpm
max_file_uploads is set to 200, so that can't be the problem. There are also a lot of other input fields besides the file inputs, and they arrive just fine, all of them.
Any ideas, where should I look?
I GOT IT! It was suhosin's own restriction in effect:
suhosin.upload.max_uploads is set to 25
Related
I moved a WordrPress website from one server and domain to another, but into the database I still have the old paths and I want to update them to the new values. The real problem is that the content I need to change is serialized, so I cannot do a global find and replace like:
http://my-old-domain.com/ replaced with http://my-newest-domain.com because I have to replace things like this:
s:755:\"<img class=\"size-medium\" src=\"http://my-old-domain.com/esthetique/wp-content/uploads/2019/01/logo-fundal-300x64.png\" ...
to
s:755:\"<img class=\"size-medium\" src=\"http://my-newest-domain.com/esthetique/wp-content/uploads/2019/01/logo-fundal-300x64.png\" ...
newest has 6 characters while old had 3 characters, so all the s:... part needs to be increased with 3. I could do this manually, but there are 1470 places where this needs to be changed and the s:... part takes different values.
Can you please advise if there is an easy way to do this? I cannot change by hand all of them. Thanks!
You can use many popular search and replace plugin to change you domain linked path. For ex -Search & Replace
I have to create 65 fields in one content type which includes some field collections(with Add more option).
When I tried to create a node edit/add pages for that content type the page load is very slow and sometimes it is giving maximum memory exhausted error.
I am trying to see if this Multistep nodeform(https://www.drupal.org/project/msnf) will help me in faster page load or not. Also looking for other options like dividing these 65 fields to different content types and embed them as a entityreference in one content type etc..
Can anyone suggest any other best approaches to avoid slow page loads and avoiding any memory/timeout issues?
Thanks in advance!
If you can't limit your filed counts (i.e. reference other entities with some fields instead of field collections). Otherwise, try conditionally increasing your PHP memory in settings.php:
if (isset($_GET['q']) && !empty($_GET['q'])) {
$q = $_GET['q'];
$pattern = '#^((node/\d+/edit)|(node/add/[\w_\-]+))#i';
if (preg_match($pattern, $q)) {
ini_set('memory_limit', '512M');
}
}
Change "512M" to increase or decrease based on memory needs.
I imported my blog from wordpress into jekyll, but the permanent links are inconsistent. Here's one example:
my post (full file)
wordpress_url: http://fabiopereira.me/blog/2011/10/19/tw-ssc-deep-sea-fishing/
date: '2011-10-19 05:09:57 +1100'
date_gmt: '2011-10-19 12:09:57 +1100'
is generating the link
blog/2011/10/18/tw-ssc-deep-sea-fishing/
The problem is the date
Instead of 2011/10/19/ in the url, it's generating 2011/10/18/
For reference
my jekyll _config.yml
permalink: /blog/:year/:month/:day/:title
timezone: Asia/Sydney # eg. Asia/Kathmandu
locale: en_AU # eg. en_us
Any help is appreciated, thanks.
I don't know think this post is on-topic for Stack Overflow, and should probably be migrated to SuperUser or somewhere more appropriate.
Nevertheless, I see two possible problems:
date_gmt
Your post file contains both date and date_gmt. I'm not sure you want to set both. You probably only want to read date_gmt, rather than writing it.
Even if you do write it, you probably want to make sure your date_gmt doesn't have a local time offset (in your example above, it has the same +11 offset that your date has).
Timezone
I suspect that Jekyll doesn't complain when you set a timezone that doesn't exist. I suspect you'll get the same results with "Fiction/Utopia" as you do for "Asia/Sydney" (which I don't think is one of the standard locations in the database). Try "Australia/Sydney" instead (or maybe "Pacific/Sydney", I'm on mobile and I don't have the list to hand right now).
Good luck!
I created a layout module 7m (layouts). Each layout has about 15-20 fields (including eating and one repeater with fields). There comes a moment when I can not create more fields. And nothing else is stored. A begins to persist if you remove one field. Then another one I can keep.
How can I fix this problem?
Change (screen http://awesomescreenshot.com/08835dz3eb )
But dont work
This is a complete number of fields that can be added (if you add one more), nothing happens. New fields do not appear.
http://awesomescreenshot.com/0f635h2s43
44 filds (all including repeater ) in 7 Layout
I really need to solve this problem. I need at least another 10 fields.
Few solutions you can try..
Increase max_input_vars value from 3000 to 5000 or more.. (it worked for me after increasing value)
This method is if increasing max_input_vars does not help..
Quoted from ACF forum :
“I had the same problem and it turned out that because the server was using the Suhosin patch I also needed to set the following my .htaccess file:
suhosin.post.max_vars = 20000
suhosin.request.max_vars = 20000″
As mentioned by Rahul, 'max_input_vars' and suhosin settings in php.ini are the solution.
But what I would like to add to make this solution complete. You could get into case when migrating to other server or vps, where default setting for "max_input_vars" is 1000 or less and then You try to add new field which will result in all fields that was not in limit to disappear as from AFC administration or from POSTS also! .
So even if you fix the php.ini that leaves you with broken db.
Anyways solution is simple after setting 'max_input_vars' move that ACF field group to Trash, and restore it fields will be back ...
I hope it will save time to someone sometime.
I have the same problem yesterday. I solve this by increasing value of Blog pages show at most and Syndication feeds show the most recent in Setting -> Reading -> Heres the option.
In my WP dashboard, the default is 10.
I would like to restrict the fields while creating a new post in WordPress. For the title, it should not exceed 40 characters. For the content, it should not exceed 400 characters. If these maximum values are exceeded, I would like to show an error message and not let the user continue. How do I do that in WordPress?
You should be able to use wordpress filters to modify the code that gets outputted when the editor is called. Essentially you would want to use it to insert some javascript and an extra div tag to display your error, then just read the contents of the "editorcontainer" id and show the error once it reaches a certain character limit.
I don't have the time at the moment to write a case example, but depending on your skill level, the functions you are looking for are:
apply_filters("the_editor", "customfunction_limitarea");
Where customfunction_limit area is your created function to insert the javascript. You can see how the_editor is currently called and how the default filters are applied in "wp-includes\general-template.php" on line 1822. The default looks like this:
$the_editor = apply_filters('the_editor', "<div id='editorcontainer'><textarea rows='$rows'$class cols='40' name='$id' tabindex='$tab_index' id='$id'>%s</textarea></div>\n");
I would try modifying that statement by placing a new filter in a functions.php file located in your themes directory, that way you don't have to worry about it getting over-written during an update. Otherwise, if you absolutely have to edit the wordpress core (generally a no-no), general_template.php would be the place to do it I think.
Essentially just read up on wordpress filters a little bit (be warned there's not a ton of documentation or examples available for it other than the basic stuff), and that should provide everything you need. The input verification end is easy enough to find scripts, just google jquery post limiting. Something like this might be exactly what your looking for:
http://swiki.fromdev.com/2010/02/jquery-maximum-limit-texttextarea-with.html