• Resolved rbridger

    (@rbridger)


    I downloaded the Constant Contact Forms plug-in (the official version), even though in the WordPress interface it noted it hadn’t yet been tested with my WordPress version. Even before I could activate it, it corrupted the entire Web site: I couldn’t gain access to it either externally or from the wp-admin. I had to remove the main php file directly from my Web host server to get the Web site on line again.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Were you seeing any sort of specific errors showing up? We’ve been testing it on WordPress 4.7 since it was released, so it should be good still, and we have a new release pending soon.

    “corrupted the entire website” sadly doesn’t provide much that I can go on for figuring out what went wrong.

    Was it white screening? Something like “Too many redirects” errors? Something else?

    Thread Starter rbridger

    (@rbridger)

    After installing the plug-in both Firefox and Chrome browsers displayed a blank white screen while Edge displayed the “HTTP 500 error” message. Non-php files in the directory (such as readme.txt) DID display.
    Hope that helps!

    • This reply was modified 8 years, 2 months ago by rbridger.
    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    It does in that we’d need to be checking your hosting account’s error logs for the site, but beyond that, I can’t offer anything specific where I can say “make this and this change”. Something is causing an Internal server error, which can be caused by any of an unknown list of possible sources.

    One question, just in case it’s contributing, is your PHP version at version 5.4 or higher? That’s one of our requirements for the plugin, though we purposely prevent loading anything else for the plugin if that need isn’t met. We just try to make sure the site doesn’t throw a fatal error(different than the one you’re experiencing), and add an admin notice about the minimum requirement.

    Thread Starter rbridger

    (@rbridger)

    Here is a sample error message from the log (I deleted the full path prefix):
    PHP Parse error: syntax error, unexpected T_FUNCTION, expecting ‘)’ in /wearandhear.com/wp-content/plugins/constant-contact-forms/includes/widgets/contact-form-select.php on line 121

    Our PHP is version 5.6.29

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Hmm.

    That line should be valid and working if you’re on PHP 5.6.29, it’s a spot where an anonymous function was used, which would be PHP 5.3+

    Reference:

    public function get_forms() {
    	$args = array(
    		'post_type'      => 'ctct_forms',
    		'posts_per_page' => -1,
    		'orderby'        => 'title',
    	);
    	$forms = new WP_Query( $args );
    	if ( $forms->have_posts() ) {
    		return array_map( function( $post ) {
    			return array( $post->ID => $post->post_title );
    		}, $forms->posts );
    	}
    
    	return array();
    }
    

    The line that says “return array_map( function(…” is Line 121 in the file.

    I was able to change the PHP version that my localhost uses to 5.6.20, which isn’t that far off from where yours apparently is, and had no issue.

    Is it possible that this specific site is somehow configured, at the server level, to use PHP 5.2.x still? Not sure why the error is occurring otherwise.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Possibly removing the anonymous function usage, but waiting until after 1.2.0 is out the door before final decision.

    Plugin Author Constant Contact

    (@constantcontact)

    Marking resolved due to multiple possible solutions pending.

    Thank you for patience.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Constant Contact Form Plug-in Neutralizes Web Site’ is closed to new replies.