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

v0.3.0 Installing issue (Fatal error) #76

Closed
Nobiuss opened this Issue Sep 4, 2018 · 16 comments

Comments

Projects
None yet
5 participants
@Nobiuss

Nobiuss commented Sep 4, 2018

Hi Team,

We have seen the update here on github so we removed the old version and installed this new one and had some errors.

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

Fatal error: Uncaught LogicException: Function 'SatisPress\autoloader_classmap' not found (function 'SatisPress\autoloader_classmap' not found or invalid function name) in /home//apps/plugins/wp-content/plugins/satispress/satispress.php:48 Stack trace: #0 /home//apps/plugins/wp-content/plugins/satispress/satispress.php(48): spl_autoload_register('SatisPress\auto...') #1 /home//apps/plugins/wp-admin/includes/plugin.php(1897): include('/home/...') #2 /home//apps/plugins/wp-admin/plugins.php(178): plugin_sandbox_scrape('satispress/sati...') #3 {main} thrown in /home//apps/plugins/wp-content/plugins/satispress/satispress.php on line 48

<----

Kind regards,
Kim

@GaryJones

This comment has been minimized.

Show comment
Hide comment
@GaryJones

GaryJones Sep 4, 2018

Collaborator

Thanks for reporting, Kim. We'll take a look 👍

Collaborator

GaryJones commented Sep 4, 2018

Thanks for reporting, Kim. We'll take a look 👍

@thefrosty

This comment has been minimized.

Show comment
Hide comment
@thefrosty

thefrosty Sep 4, 2018

It looks live version 0.3 requires the plugin to be installed via composer (composer install so the vendor directory is present) as it's not including the functions.php file manually. Is the intended? I was hoping to run this plugin outside of my normal composer sites in some stand-alone installs I could download and upload the zip too.

thefrosty commented Sep 4, 2018

It looks live version 0.3 requires the plugin to be installed via composer (composer install so the vendor directory is present) as it's not including the functions.php file manually. Is the intended? I was hoping to run this plugin outside of my normal composer sites in some stand-alone installs I could download and upload the zip too.

@bradyvercher

This comment has been minimized.

Show comment
Hide comment
@bradyvercher

bradyvercher Sep 4, 2018

Member

@thefrosty To upload a zip instead of using Composer, you need to download the packaged release asset that includes the vendor directory. It's available from the releases page and is the file named satispress-{version}.zip. I'm not sure if there's a better way to highlight that or not.

@Nobiuss Does using the release asset fix the error you're seeing?

Member

bradyvercher commented Sep 4, 2018

@thefrosty To upload a zip instead of using Composer, you need to download the packaged release asset that includes the vendor directory. It's available from the releases page and is the file named satispress-{version}.zip. I'm not sure if there's a better way to highlight that or not.

@Nobiuss Does using the release asset fix the error you're seeing?

@thefrosty

This comment has been minimized.

Show comment
Hide comment
@thefrosty

thefrosty Sep 4, 2018

That makes sense to me. I didn't try that, was just looking at the code.

thefrosty commented Sep 4, 2018

That makes sense to me. I didn't try that, was just looking at the code.

@thefrosty

This comment has been minimized.

Show comment
Hide comment
@thefrosty

thefrosty Sep 4, 2018

Just testing again locally the way I imaging quite a few users might install this plugin; via afragen/github-updater. Which installs the latest master branch. I would suggest adding the custom release-assets header so it knows to download $repo-$tag.zip

Update: Oh, I see that there. Looks like it wasn't honored via the GitHub Updater.

thefrosty commented Sep 4, 2018

Just testing again locally the way I imaging quite a few users might install this plugin; via afragen/github-updater. Which installs the latest master branch. I would suggest adding the custom release-assets header so it knows to download $repo-$tag.zip

Update: Oh, I see that there. Looks like it wasn't honored via the GitHub Updater.

@bradyvercher

This comment has been minimized.

Show comment
Hide comment
@bradyvercher

bradyvercher Sep 4, 2018

Member

That header is already present, but I've never tried installing a plugin using the updater. Do you know if anything else is required to make it use the release asset for installation?

Member

bradyvercher commented Sep 4, 2018

That header is already present, but I've never tried installing a plugin using the updater. Do you know if anything else is required to make it use the release asset for installation?

@thefrosty

This comment has been minimized.

Show comment
Hide comment
@thefrosty

thefrosty Sep 4, 2018

Thanks, I've asked that question: afragen/github-updater#712

thefrosty commented Sep 4, 2018

Thanks, I've asked that question: afragen/github-updater#712

@afragen

This comment has been minimized.

Show comment
Hide comment
@afragen

afragen Sep 4, 2018

Unfortunately Installing from GitHub Updater has no knowledge of release assets or the plugin headers.

As the plugin requires post processing it must either be installed from the release asset link or via composer.

One could immediately edit the main plugin file and decrease the version number after Installing via GitHub Updater with the immediate notice for updating. This update will pull the release asset. Any attempt to activate the plugin prior to this will result in the error above.

GHU simply not set up to install via a release asset URL.

afragen commented Sep 4, 2018

Unfortunately Installing from GitHub Updater has no knowledge of release assets or the plugin headers.

As the plugin requires post processing it must either be installed from the release asset link or via composer.

One could immediately edit the main plugin file and decrease the version number after Installing via GitHub Updater with the immediate notice for updating. This update will pull the release asset. Any attempt to activate the plugin prior to this will result in the error above.

GHU simply not set up to install via a release asset URL.

@thefrosty

This comment has been minimized.

Show comment
Hide comment
@thefrosty

thefrosty Sep 4, 2018

I can confirm the the fatal error only happens when installing the plugin via the github-updater or master download from the download link (non-release asset version). When using the release version it has zero issues.

thefrosty commented Sep 4, 2018

I can confirm the the fatal error only happens when installing the plugin via the github-updater or master download from the download link (non-release asset version). When using the release version it has zero issues.

@GaryJones

This comment has been minimized.

Show comment
Hide comment
@GaryJones

GaryJones Sep 5, 2018

Collaborator

@bradyvercher

I'm not sure if there's a better way to highlight that or not.

If someone is using Composer, then they should have the vendor directory.

If someone is using the release zip, then they should have the vendor directory.

I think the only scenario when it might not exist, would be if they did a git clone, and forgot to run composer install. We could check if the autoload_classmap() function exists, and if not, wp_die('Please run <code>composer install</code>.') as a reminder.

Maybe also add a comment just above, explaining about the release zip, so if anyone else was "just looking at the code", they'd be suitably informed.

Collaborator

GaryJones commented Sep 5, 2018

@bradyvercher

I'm not sure if there's a better way to highlight that or not.

If someone is using Composer, then they should have the vendor directory.

If someone is using the release zip, then they should have the vendor directory.

I think the only scenario when it might not exist, would be if they did a git clone, and forgot to run composer install. We could check if the autoload_classmap() function exists, and if not, wp_die('Please run <code>composer install</code>.') as a reminder.

Maybe also add a comment just above, explaining about the release zip, so if anyone else was "just looking at the code", they'd be suitably informed.

@GaryJones

This comment has been minimized.

Show comment
Hide comment
@GaryJones

GaryJones Sep 5, 2018

Collaborator

@afragen

As the plugin requires post processing it must either be installed from the release asset link or via composer.

One could immediately edit the main plugin file and decrease the version number after Installing via GitHub Updater with the immediate notice for updating. This update will pull the release asset. Any attempt to activate the plugin prior to this will result in the error above.

After install, and before it offers the user the chance to activate, could it then scan the plugin headers, and if it finds a release asset header, go ahead and run an immediate (re-)install using that instead?

Collaborator

GaryJones commented Sep 5, 2018

@afragen

As the plugin requires post processing it must either be installed from the release asset link or via composer.

One could immediately edit the main plugin file and decrease the version number after Installing via GitHub Updater with the immediate notice for updating. This update will pull the release asset. Any attempt to activate the plugin prior to this will result in the error above.

After install, and before it offers the user the chance to activate, could it then scan the plugin headers, and if it finds a release asset header, go ahead and run an immediate (re-)install using that instead?

@afragen

This comment has been minimized.

Show comment
Hide comment
@afragen

afragen Sep 5, 2018

@GaryJones it’s probably simpler to add a new feature to install via a URL if the user wants to use the GitHub Updater Install feature. The trick would be getting the user to use that one. It still a matter of getting the user to install in the correct manner, composer or the release asset.

afragen/github-updater#713

afragen commented Sep 5, 2018

@GaryJones it’s probably simpler to add a new feature to install via a URL if the user wants to use the GitHub Updater Install feature. The trick would be getting the user to use that one. It still a matter of getting the user to install in the correct manner, composer or the release asset.

afragen/github-updater#713

@bradyvercher

This comment has been minimized.

Show comment
Hide comment
@bradyvercher

bradyvercher Sep 5, 2018

Member

@GaryJones

I think the only scenario when it might not exist, would be if they did a git clone, and forgot to run composer install.

When downloading a WordPress plugin from GitHub, I think people might be conditioned to download the source zip on the releases page or from this popup, which wouldn't include the vendor directory, either:

screen shot 2018-09-05 at 9 09 54 am

We could check if the autoload_classmap() function exists, and if not, wp_die('Please run <code>composer install</code>.') as a reminder.

Checking for dependencies would work. Instead of exiting and preventing access to the site, we can probably display an admin notice with a link to the installation instructions.

Member

bradyvercher commented Sep 5, 2018

@GaryJones

I think the only scenario when it might not exist, would be if they did a git clone, and forgot to run composer install.

When downloading a WordPress plugin from GitHub, I think people might be conditioned to download the source zip on the releases page or from this popup, which wouldn't include the vendor directory, either:

screen shot 2018-09-05 at 9 09 54 am

We could check if the autoload_classmap() function exists, and if not, wp_die('Please run <code>composer install</code>.') as a reminder.

Checking for dependencies would work. Instead of exiting and preventing access to the site, we can probably display an admin notice with a link to the installation instructions.

@bradyvercher

This comment has been minimized.

Show comment
Hide comment
@bradyvercher

bradyvercher Sep 5, 2018

Member

#76 should prevent fatal errors and direct users to the installation instructions if dependencies are missing. I'm pretty sure the original issue is related, so I'll close this out. @Nobiuss, feel free to reopen this if you're still having problems.

Member

bradyvercher commented Sep 5, 2018

#76 should prevent fatal errors and direct users to the installation instructions if dependencies are missing. I'm pretty sure the original issue is related, so I'll close this out. @Nobiuss, feel free to reopen this if you're still having problems.

@Nobiuss

This comment has been minimized.

Show comment
Hide comment
@Nobiuss

Nobiuss Sep 6, 2018

Great work guys. I will test this later.

Nobiuss commented Sep 6, 2018

Great work guys. I will test this later.

afragen added a commit to afragen/github-updater that referenced this issue Sep 7, 2018

@afragen

This comment has been minimized.

Show comment
Hide comment
@afragen

afragen Sep 7, 2018

@GaryJones @Nobiuss @bradyvercher @thefrosty GitHub Updater develop branch now has the ability to install from a zipfile, remote URL or a local file. No directions as yet, I'm interested in knowing how easy it is to figure out.

afragen commented Sep 7, 2018

@GaryJones @Nobiuss @bradyvercher @thefrosty GitHub Updater develop branch now has the ability to install from a zipfile, remote URL or a local file. No directions as yet, I'm interested in knowing how easy it is to figure out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment