Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
I use the image module ("image field" - drupal 7 core) to store images in a node. In rare cases, there are up to 150 images stored in a node.
Drupal seems to have a problem with so many images (for example 140) in a node:
- If I edit the node (for example add some text to the body field) and save it again, the node gets unpublished.
- I edit the node again and click "published". But after saving the node, it is still unpublished.
- I can only publish it on the page ".../admin/content"
This only happens with nodes that have lots of images.
Is this a general problem or perhaps a problem with my server settings?
Comments
Comment #1
Jooblay.net CreditAttribution: Jooblay.net commentedYou would really want to take a look at your architecture. Just based off trying to load 140 images for your end users could result in many issues including memory_limit in your php.ini file.
!idea:)
1. Create a content type my gallery.
2. Import with feeds module all the images to my gallery content type.
3. Create a views page, block, attachement to display your images. You can attache each image by node to a piece of content like a product.
Say you want to create a product with 5 images. You can create the product and then attache the view block of those 5 images to the to product_1, product_2
Hope that helps a little... I would say your approach is a little off tying to attache 140 images to one node. Power to the community:)
Comment #2
Piratawww CreditAttribution: Piratawww commentedSame problem here...
Comment #3
golubovicm CreditAttribution: golubovicm commentedConfirming the issue (Drupal 7.50)
Comment #4
virendra007 CreditAttribution: virendra007 as a volunteer commentedThis is not a server problem and one more thing why image module is used in D7 if core image module is available in D7.
Note : For image size you can create image cache and choose the style for your image type.
Comment #5
Dan_RogersFor anyone that stumbles across this, check to see if you are bumping into a max_input_vars issue, it can cause behaviors much like this.
See A good explanation from Acquia
Comment #6
titouille#5 is correct in my case (node with many paragraphs). Thanks for the tip.
Comment #7
bol3ez CreditAttribution: bol3ez commentedI have the same issue (node with 2 paragraphs elements) but increasing max_input_vars to 16000 do not solve the problem for me (anyway I don't need this huge value of max_input_vars because the node form has few fields to fill in!). Any other idea ?
Comment #8
DustinYoder CreditAttribution: DustinYoder as a volunteer commentedI was getting the unpublished node after saving a node with many images. These images each had 4 hidden fields and a button so after about 150 images I was reaching my max_input_vars limit of 1000 with the other fields on the node. So #5 fixed the issue for me too! Thanks
Comment #9
Fredsvanelli CreditAttribution: Fredsvanelli commentedIncreasing max_input_vars in php.ini worked for me! (Drupal 7.59)
Comment #11
SWECKER CreditAttribution: SWECKER commentedIt ended up being a max input vars issue for me too, however, it wasn't enough to set the standard PHP variables higher, I also had to increase the Suhosin variables as well (since I've got it on our server). Pulled my hair out for a while until I figured this one out.
Comment #12
robertin0 CreditAttribution: robertin0 commented#5 Increasing max_input_vars in php.ini save my day!
Comment #13
cilefen CreditAttribution: cilefen as a volunteer commented