WordPress.org

Ready to get started?Download WordPress

Forums

post blank - max size issue? (22 posts)

  1. waitman
    Member
    Posted 6 years ago #

    Hi,

    When I post something preformatted in HTML that's over 100K or so (between 100K and 170K) the post is blank. Editing the post - the edit texarea is blank. The title shows up on the main index page without and text, clicking on the title takes me to the full view page but it's blank.

    In the database table, the full text is there. In phpMyAdmin I can view all the rows of the entries and hit the full text view, it shows a big long page with several posts that are over 100K each. But they are blank in WordPress.

    There are no errors or warnings in my logs.

    My php.ini is set, I upped the max memory limits and timeouts.

    Still blank on the site and blank in the "edit" but it's all in the database.

    Any ideas? This doesn't seem like a php or mysql or memory issue. (because i can view several posts in phpMyAdmin without any problem).

    I grepped for "strlen" and "max" and "limit" and "set_timeout" in all the WP files and didn't see anything useful. I'm wondering if this is somehow a utf8_conversion (or another similar conversion) problem. I seem to remember php mysteriously returning blank strings from the utf8 conversion function when working with large xml files. I had to break the data up into chunks to get it to work. That's my memory anyhow, I'll check it out.

    other than that, any ideas or feedback? I appreciate your help.

  2. waitman
    Member
    Posted 6 years ago #

    it's happening in apply_filters. if i return $string at the beginning of the function so it does nothing, the full post appears but it's sort of run together.

    if i check $string to see if it's an array, then print '

    ',print_r($string),'
    ' - the full post text appears twice within the array (it's being sent to this function twice for some reason before the content.

    using this method, it shows

    Array ()

    (empty array) when the post is supposed to appear... (um, that's probably why it's blank)

    trying to figure out what's going on... any idears?

    :-)

  3. waitman
    Member
    Posted 6 years ago #

    still working on this. it's definitely happening in function wpautop, in formatting.php

  4. waitman
    Member
    Posted 6 years ago #

    it's this line that's wiping out the entire content string.

    (formatting.php line 71)

    $pee = preg_replace('/\n?(.+?)(?:\n\s*\n|\z)/s',
    "$1\n", $pee);
    // make paragraphs, including one at the end

    commenting that line out fixes the problem. All the posts now appear.

    I'm tired, going to bed.

    *** Clearly this is causing a problem but it's for the devs to look at, I'm not strong enough with regexp's to see the problem right off the bat, it would 'prolly take me hours and I don't have that tonight.

  5. westpointer
    Member
    Posted 6 years ago #

    (formatting.php line 71)

    $pee = preg_replace('/\n?(.+?)(?:\n\s*\n|\z)/s',
    "$1\n", $pee);
    // make paragraphs, including one at the end

    commenting that line out fixes the problem. All the posts now appear.

    Bless you! I was having the exact same issue. Commenting out the line above fixed it.

  6. westpointer
    Member
    Posted 6 years ago #

    Hmmm ... commenting out the line does fix the problem BUT the length of the content is not the issue. Something else is going on for me. I'll try to dig into the preg_replace tomorrow.

  7. duncanmc
    Member
    Posted 5 years ago #

    I get exactly the same problem. Entered a bug report.

  8. erodleir
    Member
    Posted 5 years ago #

    Yes, I have the same problem. I sent a threat with this bug but nobody found an answer. I will delete my message to keep only this...

  9. erodleir
    Member
    Posted 5 years ago #

    Nobody can answer for this bug?
    I can´t see where is the problem...
    Help us!

  10. MichaelH
    Member
    Posted 5 years ago #

    Just linking to the trac ticket:
    http://trac.wordpress.org/ticket/6877

  11. adam-s
    Member
    Posted 5 years ago #

    This is a preg_replace bug I think. I'll look up the reference but I ran into similar trouble with a home built CMS and has to use something other than preg_replace

  12. adam-s
    Member
    Posted 5 years ago #

    Still can't find the reference I found before. Can't tell if it's really a bug or if preg_replace causes some sort of memory error. The problem I ran into was a seg fault.

    I am 99.9% positive that preg_replace would be at fault though.

  13. rodleir
    Member
    Posted 5 years ago #

    Yes, I saw the trac ticket. I delete the line in formatting.php that says:
    $pee = preg_replace('/\n?(.+?)(?:\n\s*\n|\z)/s', "<p>$1</p>\n", $pee); // make paragraphs, including one at the end

    But the problem continue... I don´t know how can I do with this.
    I still looking for the solution...
    Thanks, MichaelH...

  14. duncanmc
    Member
    Posted 5 years ago #

  15. rodleir
    Member
    Posted 5 years ago #

    Yes, I saw the solution. But I don´t understand the solution. Only replace that line? Sorry, I´m learning php... And thanks...

  16. duncanmc
    Member
    Posted 5 years ago #

    find pcre.backtrack_limit line in php.ini file and replace 100000 with 1000000 or 10000000. If there is a ; at the beginning of the line, remove ;

  17. Dvvarf
    Member
    Posted 5 years ago #

    Have this problem too. I dont have enough rights to test or use the solution with changing that php.ini parameter. Commenting the string out works but all the formatting losts... Changing the line, like azaozz described in trac didnt helped.
    Thanks to all of you (escpecially to waitman, duncanmc, azaozz) for your hard trying to solve the problem.

  18. Passing Perception
    Member
    Posted 5 years ago #

    I am having exactly the same problem. I have finished my first long post since my last WordPress upgrade and it turns out blank. I have a lot of photos in the post and when I add more than a certain number of them the resulting post is completely blank.

    I tried commenting out

    "$pee = preg_replace('/\n?(.+?)(?:\n\s*\n|\z)/s',
    "$1\n", $pee);
    // make paragraphs, including one at the end"

    (formatting.php line 71)

    and my post came back and displayed all the photos. Unfortunately all paragraph breaks for my entire blog disappeared. Obviously this is not acceptable. Does anyone have the answer. I am completely stuck.

    Please and thank you ahead of time.

  19. Passing Perception
    Member
    Posted 5 years ago #

    I solved my problem by changing my PHP version from 5.2 back to 4.4. I had recently upgraded to 5.2 to use a new plugin I wanted.

    Note: The plugin was not the problem. I had uninstalled it before this problem of the long post causing blankness came up.

  20. laroca
    Member
    Posted 5 years ago #

    I was having the same problem. I created a quick post and it appeared on the main page. After analyzing the various posts, I noticed that the post that appear on the main page had no categories selected. I reposted the information without the categories and it worked.

    I would like to start using categories again. Has anyone experience the same issue?

  21. mghens
    Member
    Posted 5 years ago #

    I had this problem. The only "fix" that worked was increasing pcre.backtrack_limit as duncanmc suggested. No more php4 cgi for me!

  22. morganfletcher
    Member
    Posted 5 years ago #

    The fix mentioned above worked for me, with an apparently-empty long post on my blog.

    < ;pcre.backtrack_limit=100000
    ---
    > pcre.backtrack_limit=1000000

    Morgan

Topic Closed

This topic has been closed to new replies.

About this Topic