Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

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

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

Comments

@dmalshin
Copy link

dmalshin 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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link

awps 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
Copy link
Contributor

@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
Copy link

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
Copy link
Contributor

Please test fix in #139.

@Alexander-Shukaev
Copy link

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants