I created a custom content page for displaying archived newsletter articles.
Here's a sample of a page that is displaying properly:
http://www477.pair.com/tilthpro/?q=node/121
All the pages and articles are displaying correctly, but with one article, all fields but one display correctly. The field that doesn't show up is the main text of one of the longer archived articles. It's not in the drupal "Body" field but a CCK text field in full HTML format. I've tried deleting the content and re-submitted it as a new node, I've inputted it in different formats and the same issue is still happening. I tried it with just a short phrase and that shows up correctly.
I'm using UTF-8. It's in a longtext database field. All my other articles are displaying okay (except one other exceptionally long article like this one).
So you can see what I'm talking about, here's the link to the errant page:
http://www477.pair.com/tilthpro/?q=node/193
Note it's blank under "By".
It really seems to be a length issue. I find I can get the article to show up partially up to a certain point and then at 32,898 characters (of a 37,115 character article) it stops showing up altogether. I see no odd characters. If I copy and paste the remainder of the article by itself that didn't show up , it shows up. So it seems it's not some weird character or character combination, but length.
Is there a length limit to a field in Drupal when Drupal writes the page? Is there a length limit to the text in a CCK text field? I know the whole article fits in the longtext field in mySQL.
If there is a length limit, is there a way to override/extend it?
Thanks
Comments
Comment #1
Shai commentedI just ran into this problem. It is likely that your PHP install is running an extension that adds security called "Suhosin."
Here is what you need to add to your php.ini file:
Shai Gluskin
Content2zero
Comment #2
webpotato commentedHi Shai,
No, I haven't found a solution. I saw your post and I'd like to try it. On my dev machine I have
"This server is protected with the Suhosin Patch 0.9.6.3"
Do you think the settings you are talking about can be set in an .htaccess file in a shared hosting environment? Something tells me I doubt it. Another reason if we ever go live with our site to do it on a dedicated server.
Thanks. It's great to have a helpful community and the tools to communicate.
Chrys
Comment #3
webpotato commentedOh well, I added the lines exactly as you suggested to my php.ini file, restarted apache and mysql, but it did not change the problem. I tried increasing the post and request value lengths to 500000 and still no go. It worked for you, huh? I'm still stuck, looks like.
Comment #4
webpotato commentedShai,
I'm taking the liberty of reproducing your email to me here so we can possibly have this discussion here on the forum and perhaps be helpful to others. The article that won't show up is really not that long and I imagine others have content that equals or easily exceeds 37,000 characters. I haven't solved it yet, but maybe soon.
===========
Shai said: Chrys,
I agree that I don't think doing anything in .htaccess will work.
But how about putting a php.ini file in your top level directory of your Drupal install. Ask your host for a copy of the current default php.ini your install is using. Copy it to your top level Drupal directory. Look for this line:
extension="suhosin.so"
And then add the following:
[suhosin]
suhosin.post.max_vars = 200000
suhosin.request.max_vars = 20000
suhosin.post.max_value_length = 265000
suhosin.request.max_value_length = 265000
Hope your host will let you do that.
Shai
============
I haven't approached the server host yet. I'm still working on this on my dev machine. I think I have only the suhosin patch that comes with Zend and not the suhosin extension (no extension="suhosin.so" line in my php.ini). Is it possible that the code you suggest for the php.ini file will only work when the suhosin extension is installed? Reading the suhosin documentation, it looks like if we were to have a dedicated server for our production site that we would want to have the suhosin extension, so, I guess I will go ahead and install the extension to emulate a production environment and then try your fix.
Comment #5
datune commentedI have the exact same problem, the difference being that I do NOT run Suhosin on our dedicated machine, and memory_limit is set to 128M. Have you managed to resolve the issue?
Comment #6
datune commentedTurns out it was related to the Geshifilter module and a limitation of the PCRE implementation. See http://bugs.php.net/bug.php?id=13618 for more information.
Comment #7
gollyg commentedI am having the same issue and I don't run the Geshfilter module, nor the suhosin patch.
I don't, however, believe that this is a cck issue. The output is fine if I don't run it through check_markup(). Looking into it a little further shows that the line-break filter may be the culprit - probably for PCRE reasons mentioned in the link in #6.
Will look into it further and post an issue to the linebreak filter queue.
edit:
its already there
http://drupal.org/node/133188
Comment #8
karens commentedSo not a CCK issue.