Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am in the process of writing a very long post -- currently 8,500 words and around 40 images, with more to come -- and, all of a sudden, the preview doesn't work: It just shows empty content, with the header loading correctly. The symptoms are the same as described on this page, however I am not using any shortcodes. (Although, maybe that wouldn't matter: If the problem is with PHP's RegExp, then whether there are shortcodes or not, length will still be an issue.)

Unfortunately, this is on a managed server, so I have no way of changing the PHP.ini file. As such, what are my options? If this is the likely cause, presumably the only thing I can do is split my post into several. Any other ideas?... Thanks :)

EDIT: Using WP 3.2.1

share|improve this question
    
Have you tried disabling plugins? –  Tom J Nowell Oct 23 '11 at 16:15
add comment

1 Answer

up vote 3 down vote accepted

In the following snippet, you'll see all filters attached to the title, content & excerpt (from /wp-includes/default-filters.php). Try to remove in a first try only stuff like capital P dangit, smilies and such and if this doesn't work, remove the more critical stuff. I'd only do this until the post saves and then move stuff out or wrap it into a if ( is_single( $post->ID ) ) statement to not trigger it elsewhere.

foreach ( array( 'the_content', 'the_title' ) as $filter )
    remove_filter( $filter, 'capital_P_dangit', 11 );

// Display filters
remove_filter( 'the_title', 'wptexturize'   );
remove_filter( 'the_title', 'convert_chars' );
remove_filter( 'the_title', 'trim'          );

remove_filter( 'the_content', 'wptexturize'        );
remove_filter( 'the_content', 'convert_smilies'    );
remove_filter( 'the_content', 'convert_chars'      );
remove_filter( 'the_content', 'wpautop'            );
remove_filter( 'the_content', 'shortcode_unautop'  );
remove_filter( 'the_content', 'prepend_attachment' );

remove_filter( 'the_excerpt',     'wptexturize'      );
remove_filter( 'the_excerpt',     'convert_smilies'  );
remove_filter( 'the_excerpt',     'convert_chars'    );
remove_filter( 'the_excerpt',     'wpautop'          );
remove_filter( 'the_excerpt',     'shortcode_unautop');
remove_filter( 'get_the_excerpt', 'wp_trim_excerpt'  );
share|improve this answer
1  
Thank you :) I've accepted your answer, as it will almost certainly prove useful elsewhere; but I actually managed to solve this myself, by accident... My post linked to an external file, in the gallery, which was still within my domain but a restricted filetype. I toggled this to an accepted type, removed the link and uploaded the file within the gallery: Now the post appears correctly, in its entirety!? –  Xophmeister Oct 24 '11 at 8:11
    
First step: Deactivate Plugins, Second: Switch to default theme. If nothing works: Guess. Hard to trace "bug". Glad you found it :) –  kaiser Oct 24 '11 at 9:50
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.