Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception thrown when attempting to activate plugin on windows environment #105

Closed
dmalshin opened this issue Dec 7, 2016 · 7 comments

Comments

Projects
None yet
4 participants
@dmalshin
Copy link

commented Dec 7, 2016

Can't activate the plugin due to a fatal error.
Tested on two different websites, on WP 4.7 and on the previous WP version.
2bf6bdc744

@westonruter

This comment has been minimized.

Copy link
Contributor

commented Dec 7, 2016

Note: The plugin is not yet compatible with WordPress 4.7.

That being said, this error should not be happening on 4.7 or any previous version.

@westonruter

This comment has been minimized.

Copy link
Contributor

commented Dec 8, 2016

The (attempted) exception being thrown is:

Plugin dir is not inside of the wp-content directory

See

throw new Exception( 'Plugin dir is not inside of the `wp-content` directory' );

It seems that the plugin is having a hard time locating itself on your Windows filesystem.

@westonruter westonruter changed the title Error when activating the plugin Exception thrown when attempting to activate plugin on windows environment Dec 8, 2016

@awps

This comment has been minimized.

Copy link

commented Jun 18, 2017

As well. I can't activate it.
Looke like this plugin does not have support for symlinks.
Also, is not a good method to extend a class like this:

class Exception extends \Exception {}

IMHO, something like this this is better:

class DoException extends \Exception {}

I would love to see this fixed. Should I do a contribution?

screen-0001

@westonruter

This comment has been minimized.

Copy link
Contributor

commented Jun 19, 2017

@smartik89 the name of the exception is fine and is as intended, since it is being namespaced. Please do open a PR with a fix for the symlink issue.

@Alexander-Shukaev

This comment has been minimized.

Copy link

commented Jul 15, 2017

I have the same issue on Linux:

[15-Jul-2017 13:34:30 UTC] PHP Fatal error:  Uncaught Error: Class 'CustomizeSnapshots\Exception' not found in /.../wp-content/plugins/customize-snapshots/php/class-plugin-base.php:152
Stack trace:
#0 /.../wp-content/plugins/customize-snapshots/php/class-plugin-base.php(71): CustomizeSnapshots\Plugin_Base->locate_plugin()
#1 /.../wp-content/plugins/customize-snapshots/php/class-plugin.php(56): CustomizeSnapshots\Plugin_Base->__construct()
#2 /.../wp-content/plugins/customize-snapshots/instance.php(15): CustomizeSnapshots\Plugin->__construct()
#3 /.../wp-content/plugins/customize-snapshots/customize-snapshots.php(33): require_once('...')
#4 /.../wp-admin/includes/plugin.php(1882): include('...')
#5 /.../wp-admin/plugins.php(164): plugin_sandbox_scrape('customize-snaps...')
#6 {main}
  thrown in /.../plugins/customize-snapshots/php/class-plugin-base.php on line 152

Not a PHP expert at all but a quick search suggests this.

@westonruter

This comment has been minimized.

Copy link
Contributor

commented Jul 16, 2017

Please test fix in #139.

@Alexander-Shukaev

This comment has been minimized.

Copy link

commented Jul 16, 2017

You can go ahead with the merge, confirmed. Thank you.

@westonruter westonruter added this to the 0.6.1 milestone Jul 16, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.