WordPress.org

Ready to get started?Download WordPress

Forums

Jetpack by WordPress.com
Jetpack fatal error after site migration (2 posts)

  1. rowdyferretdesign
    Member
    Posted 2 months ago #

    Hi all,

    I recently moved my site from AWS to a small orange VPS hosting, and in the new hosting environment, I'm getting this error on my gallery page (http://207.210.203.66/gallery/) when debug mode is turned on:

    Warning: preg_replace_callback(): Compilation failed: missing ) at offset 170 in /home/folsomst/public_html/wp-content/plugins/jetpack/modules/latex.php on line 32

    When the plugin is activated and debug mode is not on, the gallery content portion of the page is simply blank (though headers, footers, and sidebars load properly).

    The only module I really need/use in Jetpack is tiled galleries. I've deactivated the plugin for now, because it breaks the site, and the gallery is showing as usual (default ugly, but functional).

    I've connected Jetpack and am running the most recent version. Tried turning it off and back on again already.

    I suspect there's a php setting that could fix this (because the exact same page renders fine on the old server), but I don't know where to begin. the latex.php file mentioned looks like the syntax is fine, despite the error.

    Any ideas?

    https://wordpress.org/plugins/jetpack/

  2. rowdyferretdesign
    Member
    Posted 2 months ago #

    Here's the offending snippet from latex.php

    function latex_markup( $content ) {
    	$regex = '%
    		\$latex(?:=\s*|\s+)
    		((?:
    			[^$]+ # Not a dollar
    		|
    			(?<=(?<!\\\\)\\\\)\$ # Dollar preceded by exactly one slash
    		)+)
    		(?<!\\\\)\$ # Dollar preceded by zero slashes
    	%ix';
    	return preg_replace_callback( $regex, 'latex_src', $content );
    }

    I'm starting to suspect my new VPS is running a slightly different version of regex ... compiler? Will poke around in server options, still would appreciate any clues more experienced folks can offer!

Reply

You must log in to post.

About this Plugin

About this Topic