WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: NextGEN Gallery] Serious Bug with long posts (4 posts)

  1. Rainmaker
    Member
    Posted 6 years ago #

    I just upgraded to 2.7 and nextgen-gallery 1.0.2.
    I have a old post with over 2200 words. If I have less than about 2100 words, (I remove a couple of paragraphs) all pics and galleries display fine. Otherwise, the post will not show. Only the title and the comments will show.

    There is absolutely no unusual code in the removed paragraphs.
    All other plugins have been turned off.
    I can move the "more" function around and determine, to the character, where it will stop functioning.

    Help! This particular article is one of my most popular).

    Thanks in advance.

  2. Brusdeylins
    Member
    Posted 6 years ago #

    Hi,

    this is a problem in WordPress 2.5.x and its new "ShortCodes" which are also utilized in NextGEN Gallery. Just finde the file ./wp-includes/shortcodes.php in your WordPress installation. Here look for the function get_shortcode_regex() and change the regualar expression from

    \[('.$tagregexp.')\b(.*?)(?:(\/))?\](?:(.+?)\[\/\1\])?

    to

    \[('.$tagregexp.')\b([^\]]*?)(\/)?\](?:(.+?)\[\/\1\])?

    This new RegEx matches the same ShortCode structure, but don't use so much backtracking and in this case so much memory (on large posts a problem). For details see (in german):
    http://www.brusdeylins.info/wordpress/probleme-mit-shortcodes/

    Brusdeylins

  3. Pertinax
    Member
    Posted 6 years ago #

    I had the same problem, and this seems to have fixed it - thanks.

  4. Rainmaker
    Member
    Posted 6 years ago #

    AWESOME!!! Thank you. That worked perfectly.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.