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

Plugin could not be activated because it triggered a fatal error. #5

Closed
paaljoachim opened this issue Aug 15, 2021 · 6 comments · Fixed by #8
Closed

Plugin could not be activated because it triggered a fatal error. #5

paaljoachim opened this issue Aug 15, 2021 · 6 comments · Fixed by #8
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@paaljoachim
Copy link

WordPress 5.8.
Multisite.

The following error message is seen upon activation.

Plugin could not be activated because it triggered a fatal error.

Fatal error: Uncaught Error: Call to undefined function Altis\register_class_path() in /home/easywebd/public_html/dev/mytestingbox.com/wp-content/plugins/disable-accounts-main/plugin.php:12 Stack trace: #0 /home/easywebd/public_html/dev/mytestingbox.com/wp-admin/includes/plugin.php(2286): include_once() #1 /home/easywebd/public_html/dev/mytestingbox.com/wp-admin/plugins.php(191): plugin_sandbox_scrape('disable-account...') #2 {main} thrown in /home/easywebd/public_html/dev/mytestingbox.com/wp-content/plugins/disable-accounts-main/plugin.php on line 12

@ntwb
Copy link
Member

ntwb commented Aug 23, 2021

Thanks @paaljoachim this plugin is designed to be used with Altis from HM https://www.altis-dxp.com/

With that said, all the Altis CMS modules are open source and can be seen here:

https://github.com/orgs/humanmade/repositories?q=altis&type=source&language=&sort=name

Finally, this plugin has only that single Altis dependency, so if you comment out line 12 I think the plugin should run fine on any network install.

https://github.com/humanmade/disable-accounts/blob/main/plugin.php#L12

@ntwb ntwb closed this as completed Aug 23, 2021
@rmccue
Copy link
Member

rmccue commented Aug 24, 2021

We can replace this with the Composer autoload if we're publishing there

@rmccue rmccue reopened this Aug 24, 2021
@tomjn
Copy link

tomjn commented Aug 24, 2021

We should mention Altis and at least composer install in the readme's install step

@tomjn tomjn added bug Something isn't working help wanted Extra attention is needed labels Aug 24, 2021
@kasparsd
Copy link
Contributor

Considering that ./inc doesn't actually contain any classes (as required by \Altis\register_class_path()), it looks like removing the \Altis\register_class_path() is enough. There are no classes that would need autoloading at the moment.

I've created #8 as a fix.

@rmccue rmccue closed this as completed in #8 Feb 21, 2023
@kasparsd
Copy link
Contributor

Thanks!

Would it be possible to tag a release with this change so that Packagist picks it up?

@rmccue
Copy link
Member

rmccue commented Feb 21, 2023

0.2.2 is now tagged :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants