• Resolved Justa Mia

    (@y2kpeanut17)


    On my primary computer running LocalWP, this plugin causes a fatal error on activation. The source of the error is line 413 of class-set-up-automator.php.

    if ( preg_match( $pattern, $file ) ) returns always false on one device, but returns true (correctly) on another computer running LocalWP. As a result, it can’t properly load the integration files and causes a fatal error.

    I cannot for the life of me figure out why this is, but it makes it impossible for me to use Uncanny Automator as my site is developed locally and then pushed to live.

    This error occurs even on a blank installation where only Uncanny is installed. I’ve also tried adding the “windows compatibility fix” plugin, to no avail.

    The only difference between the two devices (that I can see) is the file path has a parentheses in the name of one subfolder on the device that doesn’t work. E.g. /user/localwp (myname)/app/public/wp-content/plugins.

    Update: I added parentheses to the site name of a test site on the working PC and it did cause the same fatal error, so the parentheses appears to be the culprit.

    Any hope for a fix that would make the preg_match conditional work with all valid windows file paths? Unfortunately, I can’t easily change the file path on my local machine as I’d have to migrate 30+ development sites.

    • This topic was modified 1 year, 8 months ago by Justa Mia.
    • This topic was modified 1 year, 8 months ago by Justa Mia.
    • This topic was modified 1 year, 8 months ago by Justa Mia.
    • This topic was modified 1 year, 8 months ago by Justa Mia.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Uncanny Automator

    (@uncannyautomator)

    Hi @y2kpeanut17 ,

    Sorry to hear about the issue. We haven’t been able to reproduce it on our side in local environments, though we haven’t been able to test extensively on Windows. We’ll try move testing tomorrow.

    For now, our developers wondered if you could confirm your PHP version, and in “src/core/classes/class-set-up-automator.php”, maybe you could try updating lines 412/413 from:

    $pattern = '/(' . addcslashes( $this->integrations_directory_path, '/-:\\' ) . ')/';
    if ( preg_match( $pattern, $file ) ) {

    to

            $pattern = '/(' . addcslashes( $this->integrations_directory_path, '/-:\\' ) . ')/';
    		automator_log(
    			array(
    				$this->integrations_directory_path,
    				$pattern,
    			),
    			'$path, $pattern',
    			true,
    			'setup-automator'
    		);
    		if ( preg_match( $pattern, $file ) ) {

    This will create a log under /wp-content/uploads/automator-logs/uo-setup-automator.log. It would be helpful if you could post or send us that file on our website.

    Thanks

    Thread Starter Justa Mia

    (@y2kpeanut17)

    Sure, I’ll upload the logs via the form on your website

    • This reply was modified 1 year, 8 months ago by Justa Mia.
    Plugin Contributor Uncanny Automator

    (@uncannyautomator)

    Hi @y2kpeanut17 ,

    Thanks for sending the additional details. We were able to confirm the issue with certain characters in folder names in certain local environments on Windows. We will include a fix in the next release.

    For now, we have uploaded a copy of the fix to https://we.tl/t-WXBVtOH1bj. You can upload that file by FTP, replacing the existing version, at this path:

    wp-content/plugins/uncanny-automator/src/core/classes/class-set-up-automator.php

    Let us know if you still have issues after that change.

    Thread Starter Justa Mia

    (@y2kpeanut17)

    I can confirm the updated file works properly on my development site. Thank you so much for the prompt fix.

    Plugin Contributor Uncanny Automator

    (@uncannyautomator)

    Fantastic, thanks for confirming!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Fatal Error on Plugin Activation (Local Hosting)’ is closed to new replies.